Commit Graph

11298 Commits

Author SHA1 Message Date
Gregory Nutt
b2c978dc83 This commit brings the SAMDL2 USB driver into the SAMD5E5 port.
Squashed commit of the following:

    arch/arm/src/samd5e5/sam_usb.c:  USB driver now compiles with some issues.

    arch/arm/src/samd5e5/chip/sam_fuses.h:  Add fuse definition header file.

    arch/arm/src/samd5e5:  Bring USB driver in from SAMD2L2.
2018-07-30 10:43:11 -06:00
Gregory Nutt
c3d0f65529 configs/metro-m4: Review clock settings and make some corrections to the board.h header file. 2018-07-30 08:01:45 -06:00
Gregory Nutt
c14d97a921 ARMv7-M/ARMv6-M: Review last PR. Rename CONFIG_DEBUG_HARDFAULT to OHNFIG_DEBUG_HARDFAULT_ALERT for consistency. 2018-07-30 06:46:44 -06:00
Masayuki Ishikawa
382a829657 Merged in masayuki2009/nuttx.nuttx/hardfault_info (pull request #699)
hardfault info

* arch/arm: Introduce CONFIG_DEBUG_HARDFAULT_INFO to Kconfig

    Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>

* arch/arm/src/armv7-m: Introduce CONFIG_DEBUG_HARDFAULT_INFO to up_hardfault.c

    Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>

* arch/arm/src/armv6-m: Introduce CONFIG_DEBUG_HARDFAULT_INFO to up_hardfault.c

    Also, replace _alert() with hfalert()

    Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>

Approved-by: GregoryN <gnutt@nuttx.org>
2018-07-30 12:32:55 +00:00
Gregory Nutt
54db2cadd2 arch/arm/src/samd5e5/sam_start.c: Fix a typo/error when debug features are enabled. 2018-07-29 17:14:51 -06:00
Gregory Nutt
65e102ee6b configs/metro-m4: Fix Metro M4 compile and link. This rippled back to more changes in arch/arm/src/samd5e5, like the sercom logic was not in the compile! Also a great opporunity to improve some naming. 2018-07-29 16:29:54 -06:00
Gregory Nutt
41666dafa8 drivers/usbhost/usbhost_max3421e.c: Fix an error in reading the pending interrupts. Aos fix a number of typos and update a README. 2018-07-29 15:06:44 -06:00
Gregory Nutt
754c8493ff arch/arm/src/samd5e5: Leverage the SAMD2L2 DMA controller. 2018-07-29 11:31:26 -06:00
Gregory Nutt
a29223c156 arch/arm/src/samd5e5: Fix some compilation issues introduced with last commit. 2018-07-29 08:08:42 -06:00
Gregory Nutt
5e4c63ed58 arch/arm/src/samd5e5: Bring in untested SPI and I2C drivers from SAMD2L2. 2018-07-29 07:43:21 -06:00
Gregory Nutt
9a24e7b724 arch/arm/src/samd5e5/chip/sam_dmac.h: Add DMA register definitions. 2018-07-28 11:41:55 -06:00
Gregory Nutt
5c1a633fbc Squashed commit of the following:
arch/arm/src/samd5e5/sam_clockconfig.c:  Implement DFLL support.  This completes coding the the re-architected clock configuration logic.
    arch/arm/src/samd5e5/sam_clockconfig.c:  Add data structures and definitions to support the FDLL and the DFPLL0/1.
2018-07-28 10:07:35 -06:00
Gregory Nutt
6e1c292400 Squashed commit of the following:
arch/arm/src/samd5e5:  Completes GCLK configuration logic.  Still FDPLL and FDLL support.
    arch/arm/src/samd5e5:  A little more GCLK configuratino logic.  Still incomplete.
    arch/arm/src/smad5e5:  Beginning of GCLK configuration logic.
    arch/arm/src/samd5e5:  Add MCLK configuration logic.
    arch/arm/src/samd5e5:  Add XOSC0/1 configuration logic.
    arch/arm/src/samd5e5:  Add XOSC32 configuration logic.
    arch/arm/src/samd5e5:  Rip out all of the leveraged clock configuration logic and start from scratch.
2018-07-27 15:52:02 -06:00
Gregory Nutt
ad10e7a872 arch/arm/src/samd5e5: Remove redundant sam_eic_irq_enable() function. 2018-07-26 12:40:27 -06:00
Gregory Nutt
a9d713bbcc This is the initial commit the port to the SAMD5x/E5x MCU family and also support for the Adafruit Metro M4 board. It port is untested and unfinished. It currently will not even link due to some missing clock related logic.
Squashed commit of the following:

    arch/arm/src/samd5e5: Clean-up EIC logic.
    arch/arm/src/samd5e5:  Fix some compilation issues; Still issues with the EIC logic from samd2x.
    arch/arm/src/samd5e5:  Fix some compilation issues; bring in some EIC logic from samd2x.
    arch/arm/src/samd5e5:  Add NVMCTRL header file, fix some compiler problems, misc. clean-up.
    configs/metro-m4:  Add LED support.
    arch/arm/src/samd5e5:  Bring in SAML21 clock configuration.  This is a WIP; it cannot possible even compile yet.
    arch/arm/src/samd5e5:  Leverage Cortex-M4 interrupt and SysTick logic from the SAM3/4.
    arch/arm/src/samd5e5: Add SERCOM utility function.
    arch/arm/src/samd5e5:  Bring all SERCOM USART logic from SAMD2L2 to SAMD5E5.  This is a brute coy with nothing more than more that name changes and extension from 5 to 7 SERCOMs.
    arch/arm/src/samd5e5: Add sam_config.h header file
    arch/arm/src/samd5e5/:  Add Generic Clock (GCLK) utility functions.
    arch/arm/src/samd5e5:  Add EVSYS register definition file
    arch/arm/src/samd5e5 and configs/metro-m4:  Use SERCOM3 for the Arduino serial shield as console.
    arch/arm/src/samd5e5/chip:  Add SERCOM USART, SPI, I2C master, and slave register defintions header files
    arch/arm/src/samd5e5/chip:  Add AES, PM, TRNG, and WDT header files.
    arch/arm/src/samd5e5/chip:  Add pin multiplexing header files.
    Various fixes to configuration system; fix metro-m4/nsh defconfig file.
    configs/metro-m4:  Add initial support for the Adafruit Metro M4 board.
    arch/arm/src/samd5e5:  Add peripheral clock helpers.
    arch/arm/src/samd5e5/chip:  Add PAC register definition header file.  Fix some errors in the memory map header file.
    arch/arm/src/samd5e5:  Add chip.h headerf file.
    arch/arm/src/samd5e5:  Add PORT register definitions and support from SAML21.
    arch/arm/include/samd5e5:  Add interrupt vector definitions.
    arch/arm/src/samd5e5:  Add some boilerplate files.  Correct some typos.
    arch/arm/src/samd5e5/chip/sam_eic.h:  Add EIC register definitions.
    arch/arm/src/samd5e5/chip:  Add OSC32KCTRL and OSCCTRL register definitions.
    arch/arm/src/samd5e5/chip:  Add GCLK, MCLK, and RSTC header files.
    arch/arm/src/samd5e5/chip/sam_cmcc.h:  Add CMCC register definitions
    arch/arm/src/samd5e5/chip/sam_supc.h:  Add SUPC header file.
    arch/arm/src/samd5e5:  Add start-up logic.
    arch/arm/src/samd5e5:  Add Make.defs file
    arch/arm/src/samd5e5/chip:  Add memory map header file.
    arch/arm/include/samd5e5:  Add chip.h header file.
    arch/arm/Kconfig and arch/arm/src/samd5e5/Kconfig:  Add configuration logic for the SAMD5x/Ex family.
2018-07-26 12:12:08 -06:00
Jake Choy
bf2a61b8cf I finally got the CRC32 to work properly after the FAE pointed me in the right direction. Here is a patch for the enet driver:
- Added CRC32 functions for multicast address filtering.
- Do not reset PHY settings when doing an ifup
- Use chip's unique id as the device MAC
- Enable discard enet frames with errors at PHY layer
2018-07-26 08:31:40 -06:00
Gregory Nutt
f2d3dc152e arm/src/stm32f0/chip/stm32f0_rcc.h: Fix some typos. 2018-07-26 08:31:40 -06:00
Ivan Ucherdzhiev
579e984d8a arch/arm/src/imxrt/imxrt_serial.c: IMXRT1050 LPUART TERMIOS support added. 2018-07-26 07:08:17 -06:00
Ivan Ucherdzhiev
35fbaf7c4c arch/arm/src/imxrt/chip/imxrt_lpspi.h: IMXRT1050 LPSPI register and bit definitions added. 2018-07-26 07:03:57 -06:00
Gregory Nutt
5a0733d0d6 arch/arm/src/samd2l2: Fix a couple of logic error/typos found in reviewing code for port to SAMD51. 2018-07-25 13:41:09 -06:00
Gregory Nutt
6dc25e1150 arch/arm/src/samd2l2/chip/saml_evsys.h: Complete some unfinished settings. 2018-07-25 11:44:41 -06:00
Gregory Nutt
830faf355b arch/arm/src/samd2l2/Kconfig: Cosmetic re-ordering of some options. 2018-07-25 09:55:04 -06:00
Gregory Nutt
444445744a arch/arm/src/samd2l2/chip: Correct some typos noted in SAML21 header files 2018-07-25 08:46:18 -06:00
Gregory Nutt
e428f3852a arm/Kconfig: Add spurious 'invisible' configuration settings to avoid prompting users for hardfault or memfault debug on systems where such debug is not available. 2018-07-24 05:54:30 -06:00
Masayuki Ishikawa
3b15cae493 Merged in masayuki2009/nuttx.nuttx/debug_memfault (pull request #693)
arch/arm: Add CONFIG_DEBUG_MEMFAULT to Kconfig

Also, fix src/armv7-m/up_memfault.c

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>

Approved-by: GregoryN <gnutt@nuttx.org>
2018-07-24 11:42:54 +00:00
Gregory Nutt
1c31036e94 Remove spurious blank line from last PR. 2018-07-23 13:43:07 -06:00
David Sidrane
82fc9986bf Merged in david_s5/nuttx/master_kinetis_sdhc_dma (pull request #692)
kinetis:sdhc fix SDIO driver so that DMA works

There were 2 problems. The first was that the interrupt did
   test DINT and raise a completion events. But since DINT is
   just an indication of DMA completion, TC is a valid way to
   determine that the transfer is complete.

   The second problem is that Software Reset For DAT Line
   SDHC_SYSCTL[RSTD] clears the bits 24-0 in SDHC_PROTO
   this looses the wide bus setting DTW

Approved-by: GregoryN <gnutt@nuttx.org>
2018-07-23 19:41:23 +00:00
Frank Benkert
524602fb51 arch/arm/src/samv7/sam_mcan.c: Correct an error in the BUS_OFF reporting. In case of BUS_OFF the old implementation was leading to a package storm. Now it reports the error condition BUS_OFF only once. 2018-07-23 08:21:06 -06:00
Gregory Nutt
62ea8f5805 arm/Kconfig and arm/src/samd2l2/Kconfig: Rename ARCH_CHIP_SAMD to ARCH_CHIP_SAMD2X and ARCH_CHIP_SAML to ARCH_CHIP_SAML2X. 2018-07-22 16:41:13 -06:00
Gregory Nutt
c3b406826e Rename all usage of samdl/SAMDL to samd2l2/SAMD2L2 to make room in the name space for the forthcoming samd5e5/SAMD5E5
Squashed commit of the following:

    Change all remaining occurrences of SAMDL to SAMD2L2.

    configs/:  Change all remaining occurrences of SAMDL to SAMD2L2

    configs/:  Change all occurrences of CONFIG_SAMDL_* to CONFIG_SAMD2L2_*
    arch/arm/src and include:  Rename all directories from samdl to samd2l2.  Change all configuration variable names and other usage from SAMDL to SAMD2L2.
2018-07-22 15:54:12 -06:00
Bob Feretich
f9f56aa254 arch/arm/src/stm32f7/: Fix data timeout errors with multiblock transfers. 2018-07-20 09:52:32 -06:00
Masayuki Ishikawa
9ea6d9aec5 Merged in masayuki2009/nuttx.nuttx/lc823450_protected_build (pull request #689)
lc823450 protected build

* arch/arm/src/lc823450: Add support for mpu and userspace

    Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>

* configs/lc823450-xgevk: Add support for userspace

    Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>

* configs/lc823450-xgevk: Add kostest

    Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>

* configs/lc823450-xgevk: Add knsh

    Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>

Approved-by: GregoryN <gnutt@nuttx.org>
2018-07-20 10:43:07 +00:00
David Sidrane
e9cd6089c9 Merged in david_s5/nuttx/master_kinetis_usbhang (pull request #688)
kinetis:USB0 fix interrupt storm on error

The ERROR bit of USBx_ISTAT needed to be cleared once an
   error occured.

Approved-by: GregoryN <gnutt@nuttx.org>
2018-07-19 20:13:47 +00:00
Masayuki Ishikawa
4bc2ba3bee Merged in masayuki2009/nuttx.nuttx/lc823450_spi_flash (pull request #687)
lc823450 spi flash

* arch/arm/src/lc823450: Add SPI flash driver for lc823450

    NOTE: Only bus accelerator mode is supported.

    Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>

* arch/arm/src/lc823450: Remove unnecessary settings in Kconfig

    Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>

Approved-by: GregoryN <gnutt@nuttx.org>
2018-07-18 11:45:20 +00:00
Daniel P. Carvalho
9223123cd2 arch/arm/src/stm32l4: Added custom pin mapping for STM32L4X2XX processors. 2018-07-16 15:42:13 -06:00
Gregory Nutt
4d648625e3 arch/arm/src/stm32fy: IO compensation is non longer an inline function, just a plain callable function. Not really necessary for the F7, but now the implementation is identical to the F2 and F4. 2018-07-16 09:50:10 -06:00
Gregory Nutt
871bface28 arch/arm/src/stm32: Use of inline function for I/O compensation causes too many issues. No just a plain callable function. 2018-07-16 09:05:53 -06:00
Gregory Nutt
c1a2c55764 arch/arm/src/stm32/stm32_gpio.h: Correct a recently introduced compilation error: Not all STM32s have chip/stm32_syscfg.h 2018-07-16 08:43:28 -06:00
Gregory Nutt
f09f186375 arch/arm/src/stm32f7: Port Bob Feritich's change (2c699d7812) to STM32 F2 and F4 which appear to have identical SD support and I/O compensation requirements. 2018-07-15 17:46:58 -06:00
Gregory Nutt
0c093f800d arch/arm/src/stm32f7: Port Bob Feritich's change (2c699d7812) to SDMMC2 and to all other STM32F7 architectures. Also add a conifiguration option to automatically enable I/O compensation. 2018-07-15 16:17:41 -06:00
Gregory Nutt
2c699d7812 arch/arm/src/stm32f7/chip/stm32f72xx73xx_pinmap.h: All of the SDMMC pins were set to 50 MHz, but not the clock. This sets the clock to 50 MHz also. This combined with turning on I/O compensation makes intermittent failures go away. 2018-07-15 15:23:39 -06:00
Gregory Nutt
a74246d14e Squashed commit of the following:
Update some comments
    drivers/usbhost/usbhost_max3421e.c:  Fix issue with uninitialized data.
2018-07-14 13:40:13 -06:00
Gregory Nutt
38073a523a drivers/usbhost/husbhost_max3421e.c: Corret how VBUS power is controlled. 2018-07-14 08:50:08 -06:00
Gregory Nutt
859d032938 This commit adds support for the MAX3421E to the viewtool-stm32107 board support
Squashed commit of the following:

    configs/viewtool-stm32f107:  Clean up some compilation errors.  Now all builds correctly and is ready for test.

    arch/arm/src/stm32:  Do not condition building STM32 USB host logic on CONFIG_USBHOST.  That then precludes building STM32 platforms with external USB host chips like the MAX3421E.  Add an new, STM32-internal variable CONFIG_STM32_USBHOST that does the same job without such side-effects.

    configs/viewtool-stm32f107:  Add support for MAX3421E USB host.
2018-07-13 10:45:08 -06:00
David Sidrane
6e6583f5a3 Merged in david_s5/nuttx/master_singlewire (pull request #680)
Added Single Wire Kconfig knob for H7

Approved-by: GregoryN <gnutt@nuttx.org>
2018-07-12 19:47:12 +00:00
David Sidrane
fbe5f56dd5 Merged in david_s5/nuttx/master_singlewire (pull request #679)
Added Single Wire Kconfig knob

* stm32f0:Added Kconfig knob for STM32F0_USART_SINGLEWIRE

* stm32f7:Added Kconfig knob for STM32F7_USART_SINGLEWIRE

* stm32l4:Corrected comment in Kconfig STM32L4_USART_SINGLEWIRE

* stm32:Added Kconfig knob for STM32_USART_SINGLEWIRE

Approved-by: GregoryN <gnutt@nuttx.org>
2018-07-12 19:30:43 +00:00
Gregory Nutt
c09efb2603 arch/arm/src/stm32h7: Correct naming of global variables that violations the naming requirements of the coding standard. 2018-07-12 13:19:57 -06:00
Gregory Nutt
e569872358 arch/arm/Kconfig: Since the basic STM32H7 port is working, let's remove the EXPERIMENTAL dependency. 2018-07-12 12:35:35 -06:00
Mateusz Szafoni
82e5c6ceea Merged in raiden00/nuttx_h7 (pull request #677)
stm32h7: fix some definitions for uart, add serial driver with FIFO enabled

* stm32h7: stm32_irq.c: extend irqinfo to support H7 family

* stm32h7: fix some definitions for uart, add serial driver with FIFO enabled

Approved-by: GregoryN <gnutt@nuttx.org>
2018-07-12 18:31:59 +00:00
Gregory Nutt
f3c12215cf arch/arm/src/stm32, stm32f0, stm32f7, stm32: Correct naming of global variables that violations the naming requirements of the coding standard. 2018-07-12 10:54:51 -06:00
Masayuki Ishikawa
562637391c Merged in masayuki2009/nuttx.nuttx/lc832450_elf_test (pull request #675)
lc832450 elf test

* arch/arm/src/lc823450: Change CONFIG_DEBUG to CONFIG_DEBUG_FEATURES in lc823450_start.c

    Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>

* configs/lc823450-xgevk: Call elf_initialize() in lc823450_bringup.c

    Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>

* configs/lc823450-xgevk: Add ELF related parameters in Make.defs

    Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>

* configs/lc823450-xgevk: Add elf configuration

    Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>

Approved-by: GregoryN <gnutt@nuttx.org>
2018-07-12 12:05:55 +00:00
Mateusz Szafoni
639d75ca3a Merged in raiden00/nuttx_h7 (pull request #674)
stm32h7: stm32_irq.c: extend irqinfo to support H7 family

Approved-by: GregoryN <gnutt@nuttx.org>
2018-07-11 19:13:55 +00:00
Daniel Pereira Carvalho
8432164e52 arch/arm/src/stm32l4/chip/: Corrects some mistakes in pin definitions for the STM32L4 family. According to datasheet of STM32L496xx, STM32L475xx and STM32L443XX the AF2 of PE14 is TIM1_BKIN2 not TIM2_BKIN. 2018-07-10 08:01:00 -06:00
Mateusz Szafoni
8271f72b72 Merged in raiden00/nuttx_h7 (pull request #672)
stm32h7: add lowputc, more cosmetic in stm32h7x3xx_rcc.h

Approved-by: GregoryN <gnutt@nuttx.org>
2018-07-09 16:32:22 +00:00
Alan Carvalho de Assis
283b73edc5 Fix lots of typos in C comments and Kconfig help text 2018-07-08 18:24:45 -06:00
Gregory Nutt
1783d344dc Eliminate some new warnings found in build testing. 2018-07-08 13:44:39 -06:00
Mateusz Szafoni
fa56b1bbc7 Merged in raiden00/nuttx_h7 (pull request #671)
stm32h7

stm32h7: compile with stm32_rcc.c

stm32h7: some PWR definitions

stm32h7: add some RCC defs and change some code style to be more like in other STM ports

stm32h7: basic clocks configuration

Approved-by: GregoryN <gnutt@nuttx.org>
2018-07-08 18:28:14 +00:00
Mateusz Szafoni
9e63080b4b Merged in raiden00/nuttx/stm32h7 (pull request #670)
stm32h7x3xx: add flash definitions

* libdsp: initial commit

* libdsp: cosmetics

* stm32f334-disco/buckboost: use a PID controller from libdsp

* stm32_adc.h: fix typo

* stm32_dac.c: set OUTEN bit for DAC1CH2 and DAC2CH1

* stm32_hrtim: cosmetic changes

* power/motor: direction parameter is now int8 + add overload fault

* libdsp: all floats with f-sufix

    libdsp: add precision option for library

    libdsp: add debug option for library and assertions in functions

    libdsp: add current samples correction for SVM3

    libds: add some motor control specific functions

    libdsp: add basic speed observer

    libdsp: fix phase shift in SMO observer

    libdsp: add more logic to FOC

    config/sim/dsptest: add dsptest configuration

* libdsp/lib_motor.c: remove unused comparation

* libdsp/lib_observer.c: update some comments

* stm32h7x3xx: add flash definitions

Approved-by: GregoryN <gnutt@nuttx.org>
2018-07-08 13:15:44 +00:00
kxjiang
70dc642da3 The LPC54608 can only run at a maximum frequency of 180Mhz. This configuration requires uses the clk_in, external crystal clock, to drive the PLL. When that input was selected, the board bootup failed waiting for the PLL to lock. After referring the driver from NXP, we should turn on power sources for the ext clock if system pll input select clk_in. NOTE that the LPC54628 did not require this step... perhaps because the system oscillator power was already enabled. 2018-07-08 06:58:14 -06:00
Gregory Nutt
1450c0c2f2 arch/arm/src/stm32f7/stm32_sdmmc.c: Fix some missing right parentheses. 2018-07-07 15:23:46 -06:00
Mateusz Szafoni
8416d9a966 Merged in raiden00/nuttx (pull request #668)
Master

* libdsp: initial commit

* libdsp: cosmetics

* stm32f334-disco/buckboost: use a PID controller from libdsp

* stm32_adc.h: fix typo

* stm32_dac.c: set OUTEN bit for DAC1CH2 and DAC2CH1

* stm32_hrtim: cosmetic changes

* power/motor: direction parameter is now int8 + add overload fault

* libdsp: all floats with f-sufix

    libdsp: add precision option for library

    libdsp: add debug option for library and assertions in functions

    libdsp: add current samples correction for SVM3

    libds: add some motor control specific functions

    libdsp: add basic speed observer

    libdsp: fix phase shift in SMO observer

    libdsp: add more logic to FOC

    config/sim/dsptest: add dsptest configuration

* libdsp/lib_motor.c: remove unused comparation

* libdsp/lib_observer.c: update some comments

Approved-by: GregoryN <gnutt@nuttx.org>
2018-07-07 17:04:57 +00:00
Gregory Nutt
6cb9f8001c Squashed commit of the following:
lpc17, sam34:  Rename some improperly scoped configuration variables; fix some duplicate configuration variable names.
    lpc11, lpc17, lc823450:  Rename some improperly scoped configuration variables; fix some duplicate configuration variable names.
    lpc11, lpc17, lpc43:  Rename some improperly scoped configuration variables; fix one duplicate configuration variable.
2018-07-06 09:15:57 -06:00
Ramtin Amin
f39c611d64 arch/arm/src/stm32f7/stm32_sdmmc.c: Add SDIO coard support. 2018-07-05 07:31:41 -06:00
Gregory Nutt
22cd0d47fa This commit attempts remove some long standard confusion in naming and some actual problems that result from the naming confusion. The basic problem is the standard MTU does not include the size of the Ethernet header. For clarity, I changed the naming of most things called MTU to PKTSIZE. For example, CONFIG_NET_ETH_MTU is now CONFIG_NET_ETH_PKTSIZE.
This makes the user interface a little hostile.  People thing of an MTU of 1500 bytes, but the corresponding packet is really 1514 bytes (including the 14 byte Ethernet header).  A more friendly solution would configure the MTU (as before), but then derive the packet buffer size by adding the MAC header length.  Instead, we define the packet buffer size then derive the MTU.

The MTU is not common currency in networking.  On the wire, the only real issue is the MSS which is derived from MTU by subtracting the IP header and TCP header sizes (for the case of TCP).  Now it is derived for the PKTSIZE by subtracting the IP header, the TCP header, and the MAC header sizes.  So we should be all good and without the recurring 14 byte error in MTU's and MSS's.

Squashed commit of the following:

    Trivial update to fix some spacing issues.
    net/: Rename several macros containing _MTU to _PKTSIZE.
    net/: Rename CONFIG_NET_SLIP_MTU to CONFIG_NET_SLIP_PKTSIZE and similarly for CONFIG_NET_TUN_MTU.  These are not the MTU which does not include the size of the link layer header.  These are the full size of the packet buffer memory (minus any GUARD bytes).
    net/: Rename CONFIG_NET_6LOWPAN_MTU to CONFIG_NET_6LOWPAN_PKTSIZE and similarly for CONFIG_NET_TUN_MTU.  These are not the MTU which does not include the size of the link layer header.  These are the full size of the packet buffer memory (minus any GUARD bytes).
    net/: Rename CONFIG_NET_ETH_MTU to CONFIG_NET_ETH_PKTSIZE.  This is not the MTU which does not include the size of the link layer header.  This is the full size of the packet buffer memory (minus any GUARD bytes).
    net/: Rename the file d_mtu in the network driver structure to d_pktsize.  That value saved there is not the MTU.  The packetsize is the memory large enough to hold the maximum packet PLUS the size of the link layer header.  The MTU does not include the link layer header.
2018-07-04 14:10:40 -06:00
Frank Benkert
317c7c2aff arch/arm/src/samv7: Add ability for CAN BUS_OFF autorecovery according ISO11898-1:2015. With this change we added an ioctl for triggering the autorecovery sequence for BUS_OFF to the CAN-driver and the SAMV7 low-level driver. According the datasheet: If the device goes Bus_Off, it will set MCAN_CCCR.INIT of its own accord, stopping all bus activities. Once MCAN_CCCR.INIT has been cleared by the processor (application), the device will then wait for 129 occurrences of Bus Idle (129 * 11 consecutive recessive bits) before resuming normal operation. At the end of the Bus_Off recovery sequence, the Error Management Counters will be reset. During the waiting time after the resetting of MCAN_CCCR.INIT, each time a sequence of 11 recessive bits has been monitored, a Bit0 Error code is written to MCAN_PSR.LEC, enabling the processor to readily check up whether the CAN bus is stuck at dominant or continuously disturbed and to monitor the Bus_Off recovery sequence. MCAN_ECR.REC is used to count these sequences. 2018-07-04 07:48:59 -06:00
Masayuki Ishikawa
88f8a09a25 Merged in masayuki2009/nuttx.nuttx/lc823450_i2s_tx_threshold (pull request #667)
arch/arm/src/lc823450: Add tx start threshold to lc823450_i2s.c

In addition, lc823450_i2s_send() now accepts byte-aligned stream.

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>

Approved-by: GregoryN <gnutt@nuttx.org>
2018-07-03 12:59:03 +00:00
Marcin Wyrwas
898fdbded0 Merged in plwm/nuttx/stm32f746g-disco-sdram (pull request #665)
Add support for STM32F746G-disco board SDRAM

* add support for STM32F746G-disco board SDRAM

* changed fb config to use SDRAM and fixed compilation

Approved-by: GregoryN <gnutt@nuttx.org>
2018-07-02 23:49:55 +00:00
Alan Carvalho de Assis
8a1f3d6fa1 arch/arm/src/xmc4/xmc4_gpio.c: Add a specific bit encoding for openprain GPIO pin. 2018-07-02 10:56:58 -06:00
Gregory Nutt
824f1dd3fe Squashed commit of the following:
lpc17:  Removed duplicate configuration variable definitions from Kconfig:  CONFIG_USBHOST_BULK_DISABLE, CONFIG_USBHOST_INT_DISABLE, and USBHOST_ISOC_DISABLE.  These are global USBHOST configurations and are all defined in drivers/usbhost/Kconfig.
    lpc17:  Correct scope of naming of configuration variables:  CONFIG_USBHOST_TDBUFFERS->CONFIG_LPC17_USBHOST_TDBUFFERS, CONFIG_USBHOST_TDBUFSIZE->CONFIG_LPC17_USBHOST_TDBUFSIZE, and CONFIG_USBHOST_IOBUFSIZE->CONFIG_LPC17_USBHOST_IOBUFSIZE
    lpc17:  Correct scope of naming of configuration variables:  CONFIG_USBHOST_NEDS->CONFIG_LPC17_USBHOST_NEDS and CONFIG_USBHOST_NTDS->CONFIG_LPC17_USBHOST_NTDS
    lpc17:  Correct scope of naming of configuration variable:  CONFIG_USBHOST_OHCIRAM_SIZE->CONFIG_LPC17_OHCIRAM_SIZE
2018-07-01 08:38:05 -06:00
Gregory Nutt
d52b65b06d Fix several configuration varaibles that were defined in multiple Kconfig files and/or lacked any scoping and the naming.
Squashed commit of the following:

    lpc17, pic32mx, pic32mz:  Fix duplicated, improperly scoped configuration variable names:  CONFIG_PHY_SPEED100 and CONFIG_PHY_AUTONEG.
    lpc17, pic32mx, pic32mz:  Fix another duplicated configuration variable name:  CONFIG_PHY_FDUPLEX.
    lpc17:  Fix naming scope: CONFIG_NET_HASH -> CONFIG_LPC17_ETH_HASH.
    lpc17:  Fix naming scope: CONFIG_NET_WOL -> CONFIG_LPC17_ETH_WOL.
    lpc17, pic32mx, pic32mz:  Fix naming scope: CONFIG_NET_ -> CONFIG_LPC17_ETH_PRIORITY.
    lpc17, pic32mx, pic32mz:  Fix another duplicated configuration variable name:  CONFIG_NET_NTXDESC and CONFIG_NET_NRXDESC.
    lpc17:  Fix naming scope: CONFIG_NET_EMACRAM_SIZE -> CONFIG_LPC17_EMACRAM_SIZE.
2018-06-30 11:55:41 -06:00
Gregory Nutt
576b8b1841 stm32, stm32f0, stm32f7, stm32h7, stm32l4: Fix another duplicated configuration variable name: CONFIG_SERIAL_DISABLE_REORDERING. 2018-06-30 09:43:51 -06:00
Gregory Nutt
f159f1089a tools/refresh.sh: Add a --prompt option that will let you use --silent but will prompt before overwriting the original defconfig. arch/arm/src/stm32/Kconfig: Fix a HRTIM configuration error found in build testing. 2018-06-28 17:12:30 -06:00
Gregory Nutt
67810d70d9 arch/arm/src/stm32l4: Fix typo errors found in build testing. 2018-06-28 16:24:21 -06:00
Gregory Nutt
f24f523e4e arch/arm/src/imxrt,stm32,stm32f0,stm32f7,stm32l4: Fix scope of naming. CONFIG_PM_SERIAL_ACTIVITY->CONFIG_STM32_PM_SERIAL_ACTIVITY, for example. 2018-06-28 16:18:15 -06:00
Gregory Nutt
ceaafc2019 arch/arm/src/stm32: Fix scope of naming. CONFIG_RTC_LSECLOCK->CONFIG_STM32_RTC_LSECLOCK, for example. Fix some usage. Although CONFIG_STM32L4_RTC_xxxCLOCK was defined in the Kconfig, CONFIG_RTX_xxxCLOCK was used in numerous places in the code 2018-06-28 15:58:08 -06:00
Gregory Nutt
500d2c2289 arch/arm/src/lpc11,lpc17,lpc43,stm32,stm32l4: Fix scope of naming. CONFIG_CAN_TSEG1->CONFIG_LPC17_CAN_TSEG, for example. 2018-06-28 15:44:42 -06:00
Gregory Nutt
2552bfd2ef arch/arm/src/lpc43: Fix lpc43 CAN configuration. Configuration settings were used and documented in README.txt files, but never in any Kconfig file. Also fix the scoping name of CAN variable naming. CONFIG_CANx_BAUD->CONFIG_LPC43_CANx_BAUD. 2018-06-28 15:11:23 -06:00
Gregory Nutt
45cdc3a3d0 arch/arm/src/lpc11,lpc17,stm32,stm32l4: Fix scopy of nameing. CONFIG_CANx_BAUD->CONFIG_LPC17_CANx_BAUD, for example. 2018-06-28 14:47:14 -06:00
Gregory Nutt
8c3aa99742 arch/arm/src/lpc11 and lpc17: Fix scopy of nameing. CONFIG_CAN_SAM->CONFIG_LPC17_CAN_SAM, for example. 2018-06-28 13:46:35 -06:00
Gregory Nutt
8281dc1ed8 arch/arm/src/lpc11 and lpc17 and several README.tst files in configs/: Fix scopy of nameing. CONFIG_CANx_DIVISOR->CONFIG_LPC17_CANx_DIVISOR, for example. 2018-06-28 13:10:02 -06:00
Gregory Nutt
2c78adf529 arch/arm/src/lpc11 and lpc17: Remove duplicate configuration variable CAN_LOOPBACK. The architecture-indendent version is selectable in drivers/can/Kconfig. 2018-06-28 12:52:02 -06:00
Gregory Nutt
104860560d arch/arm/src/lpc11 and lpc17: Remove duplicate configuration variable CAN_EXTID. The architecture-indendent version is selectable in drivers/can/Kconfig. 2018-06-28 12:50:10 -06:00
Gregory Nutt
7dec38b18f drivers/Kconfig: Global configuration variable CONFIG_FB_TRANSPARENCY is only defined in architecture-specific Kconfig files and then multiple times. Add the single global definition in drivers/Kconfig. arch/arm/src/stm32, stm32f7, and same5: Rename the architecture-specific variables appropriately. Selecting the architecture-specific version will also select the global version. 2018-06-28 12:31:51 -06:00
Gregory Nutt
ba53219821 drivers/Kconfig: Global configuration variable CONFIG_FB_CMAP is only defined in architecture-specific Kconfig files and then multiple times. Add the single global definition in drivers/Kconfig. arch/arm/src/stm32 and stm32f7: Rename the architecture-specific variables appropriately. Selecting the architecture-specific version will also select the global version. 2018-06-28 12:01:55 -06:00
Gregory Nutt
5d6e6d66e2 Fix another improperly qualified configuration varaible: CONFIG_HRTIM -> CONFIG_STM32_HRTIM. This is necessary to avoid conflict and confusion with other Kconfig files that may have the save variable definition. 2018-06-28 11:37:29 -06:00
Gregory Nutt
b030209532 arch/arm/src/imxrt: Trivial SNVS from Rev 1. of the Reference Manual. 2018-06-28 10:54:56 -06:00
Juha Niskanen
044d538da3 Fix some errors found during upstream merge 2018-06-28 07:06:57 -06:00
Gregory Nutt
9038cac4eb arch/arm/src/imxrt: Fix some early testing bugs. The HPRTC is now functional. However, if the LPSRTC is enabled, then there is a hang during LPSRTC initialization. It appears that there is some problem in providing clocking and initializing the LPSRTC domain. 2018-06-27 15:27:56 -06:00
David Sidrane
06c7b9a5bc Merged in david_s5/nuttx/master_f7_i2cfix (pull request #664)
stm32f7:I2C reset Configure I2C pins as GPIO output

Pins were reset to inputs in the deinit. This resets
   them to outputs.

Approved-by: GregoryN <gnutt@nuttx.org>
2018-06-27 18:35:34 +00:00
Gregory Nutt
5889a2397c This commit addes support for the i.MXRT RTC. This initial commit is code complete (with limited featurs and options) but untested.
Squashed commit of the following:

    arch/arm/src/imxrt:  Fix some first time compile issues.
    arch/arm/src/imxrt:  This brings the RTC implement to code complete but still untested.
    arch/arm/src/imxrt:  Add some RTC initialization logic.
    arch/arm/src/imxrt:  Flesh out most of the RTC driver lower half and LPSRTC support.
    arch/arm/src/imxrt:  Some inital, partial implementation of the HPRTC and LPSRTC.
    arch/arm/src/imxrt:  Add HPSRTC/HPRTC file framework (no logic, just skeleton files).
    arch/arm/src/imxrt:  Add HPRTC header file.
    Some initial configuration logic for SNVS LPRTC and HP RTC.
2018-06-27 11:19:12 -06:00
Gregory Nutt
691470c1cd arch/arm/src/stm32,stm32l4,stm32f7: Fix duplicated configuration options. All should be unique. 2018-06-27 10:20:14 -06:00
Masayuki Ishikawa
529ac8dd9b arch/arm/src/lc823450: Fix setintstack macro in chip.h. In case of CONFIG_SMP=y, g_cpu0_instack_base and g_cpu1_instack_base
are not allocated just after g_instack_alloc but these values show the addresses for interrupt stack of each CPU. So to set the stack
pointer based on these variables, temporal register has to be used.
2018-06-27 06:50:00 -06:00
Gregory Nutt
d6ed50a370 arch/arm/src/stm32f7/chip/stm32f72xx73xx_dma.h: Macros did not account for the increase from 8 to 16 DMA channels. 2018-06-26 10:12:35 -06:00
Marcin Wyrwas
1c76e10c06 Merged in plwm/nuttx/stm32f746g-disco-lcd (pull request #661)
add support for STM32F746G-disco board LCD

Approved-by: GregoryN <gnutt@nuttx.org>
2018-06-25 23:44:31 +00:00
Gregory Nutt
bdb73a60ca Fix some errors found in build testing. 2018-06-25 17:06:29 -06:00
Gregory Nutt
872a11b4a0 Correct some errors found in build testing. 2018-06-25 14:16:19 -06:00
Daniel Agar
68418262a5 Merged in dagar/nuttx/pr-fixCompileError (pull request #660)
stm32f7: Fix compile error caused by intentional use of fall through

Approved-by: Sebastien Lorquet <sebastien@lorquet.fr>
Approved-by: GregoryN <gnutt@nuttx.org>
2018-06-25 16:33:56 +00:00
Gregory Nutt
579d1b898b Trivial update to some comments. 2018-06-22 07:53:34 -06:00
Gregory Nutt
82ff00fabf arch/arm/src/imxrt/chip: Add SNVS/RTC register definition header file. 2018-06-21 12:36:12 -06:00
Gregory Nutt
bb88f8d0bb Squashed commit of the following:
A few bugfixes in initial testing on the i.MX6.  Behavior seems a little more stable, but there are still memory corruption issues.  Also print CPU number on assertion.
    Add a file missed in the last big commit.
    arch/arm/src/armv7a and imx6:  Add support for per-CPU IRQ and FIQ interrupt stacks (bugfix).  Add support so that up_assert will print the correct interrupt stack on an assertion (FIQ stack is still not printed).
    arch/arm/src/lc823450: Combine the content of smp_macros.h into chip.h.  Add support so that up_assert will print the correct interrupt stack on an assertion.
2018-06-21 10:59:58 -06:00