Commit Graph

15059 Commits

Author SHA1 Message Date
Gregory Nutt
e5c3874a3b Tiva directories: Fix TM4C129XNCZAD part number in Kconfig and identifiers. Rationale: Fully specify that this is the 212-pin BGA package (ZAD ending) and for consistency with earlier changes to other Tiva TM4C12x part numbers in Kconfig names and identifiers. 2019-08-30 08:46:57 -06:00
Matous Pokorny
2236916be6 arch/arm/src/stm32/stm32_adc.c: Add ADC calibration procedure for IP_ADC_V1. Tested on STM32F100, and it magically increased result accuracy. STM32F103 has the same calibration procedure. I am not sure about others. 2019-08-29 19:01:22 -06:00
Jukka Laitinen
938e8b4ce7 arch/arm/src/stm32h7/stm32_ethernet.c: Correct memory corruption error. The Ethernet driver initialization incorrectly wrote to DMACRXCR instead of DMACSR when trying to clear the stopped flags. This caused invalid buffer length in the DMACRXCR, causing DMA to overflow the RX buffers when large packets are sent to the device. 2019-08-28 08:42:41 -06:00
Jukka Laitinen
cf5c02aa4e arch/arm/src/stm32h7/stm32_ethernet.c: Correct stm32h7 mac address filtering. Correct the MAC address 0 register definition and remove the 'receive all' flag. Now the Ethernet driver only receives packets addressed to correct MAC. 2019-08-28 08:41:06 -06:00
Gregory Nutt
6c5b8a70a7 arch/arm/src/imxrt/hardware/imxrt_enc.h: Fix some errors in register bit definitions. Noted by Arie de Muijnck. 2019-08-28 08:11:10 -06:00
Markus Bernet
1726f79a0f arch/arm/src/stm32h7/stm32_ethernet.c: Fix some errors in Ethernet MAC configuration. 2019-08-28 08:06:45 -06:00
David Sidrane
8493312f00 arch/arm/src/stm32f7/stm32_sdmmc.c: Fix warning when DMA is not enabled. 2019-08-28 06:47:54 -06:00
Gregory Nutt
ac151e05e7 Fix warnings found in build testing. 2019-08-27 16:20:39 -06:00
Nicholas Chin
f40aac87e8 arch/arm/src/imxrt: Adds quadrature encoder driver for IMXRT. 2019-08-27 15:01:09 -06:00
Gregory Nutt
9bd850295e arch/sim/src/Makefile: Fix dependency problem due to reorganization of some directories. 2019-08-26 17:31:29 -06:00
David Sidrane
a3bea40c46 Merged in david_s5/nuttx/master_h7 (pull request #1025)
stm32h7: bbsram issues causing no writes and  hardfaults

* stm32_pwr:Ensure data is flushed on backup domain access changes

* stm32h7:bbsram convince compiler to perform 32 bit write

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-08-26 18:34:25 +00:00
Alin Jerpelea
3806a01c5d Merged in alinjerpelea/nuttx (pull request #1024)
noards: arm: cxd56xx: migrate common code

* boards: arm: cxd56xx: common: move boot to common

    This is a common function and can be reused by all boards.

    Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>

* boards: arm: cxd56xx: common: move flash to common

    This is a common function and can be reused by all boards.

    Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>

* boards: arm: cxd56xx: common: move I2C driver to common

    This is a common function and can be reused by all boards.

    Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>

* boards: arm: cxd56xx: common: move uid to common

    This is a common function and can be reused by all boards.

    Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>

* boards: arm: cxd56xx: common: move usbmsc to common

    This is a common function and can be reused by all boards.

    Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>

* arch: arm: cxd56: add SPH

    The SPH is used by the ASMP implementation from the SDK.

    Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-08-26 14:29:55 +00:00
Bernd Walter
f9e80c4a1e arch/arm/src/samd2l2/sam_i2c_master.c: Correct time calculation. 2019-08-26 08:08:56 -06:00
Michael Jung
decd07725f arch/arm/src/stm32/stm32_spi.c: TI Synchronous Serial Frame Format. The SPI macros on STM32 MCUs do support the Texas Instruments Synchronous Serial Frame Format protocol (TI protocol). Defined a new SPIDEV_MODETI and add support for it in stm32_spi.c. 2019-08-25 09:07:09 -06:00
Michael Jung
b395cde043 arch/arm/src/stm32: PLLI2S support for F427/F437. Enable support of the I2S Phase Locked Loop on STM32F427 and STM32F437 MCUs. 2019-08-25 09:01:35 -06:00
David Sidrane
e2d76e21d5 Merged in david_s5/nuttx/master_h7_typo (pull request #1023)
stm32h7:Memory Map DBGMCU is @ 0x5c001000

Fixtypo

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-08-24 11:27:23 +00:00
David Sidrane
c7dab20318 Merged in david_s5/nuttx/master_h7 (pull request #1022)
stm32h7:Memory Map DBGMCU is @ 0x5c001000

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-08-23 22:00:43 +00:00
Gregory Nutt
b3d609959c arch/arm/src/s32k1xx/hardware/s32k1xx_flexcan.h: Add an incomplete FlexCAN register definition header file. Still missing some bitfield definition. Also updates some README files. 2019-08-23 07:35:49 -06:00
Alin Jerpelea
6ecee7e403 Merged in alinjerpelea/nuttx (pull request #1021)
boards: cxd56xx: add SCU sensors (2/2)

* boards: cxd56xx: add cxd56_bh1721fvc initialization

    We are adding the sensor initialization for cxd56xx boards in the
    common board folder.

    Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>

* boards: cxd56xx: add cxd56_bh1745nuc initialization

    We are adding the sensor initialization for cxd56xx boards in the
    common board folder.

    Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>

* boards: cxd56xx: add cxd56_bm1383glv initialization

    We are adding the sensor initialization for cxd56xx boards in the
    common board folder.

    Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>

* boards: cxd56xx: add cxd56_bm1422gmv initialization

    We are adding the sensor initialization for cxd56xx boards in the
    common board folder.

    Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>

* boards: cxd56xx: add cxd56_bmi160 initialization

    We are adding the sensor initialization for cxd56xx boards in the
    common board folder.

    Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>

* boards: cxd56xx: add cxd56_bmp280 initialization

    We are adding the sensor initialization for cxd56xx boards in the
    common board folder.

    Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>

* boards: cxd56xx: add cxd56_kx022 initialization

    We are adding the sensor initialization for cxd56xx boards in the
    common board folder.

    Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>

* boards: cxd56xx: add cxd56_lt1pa01 initialization

    We are adding the sensor initialization for cxd56xx boards in the
    common board folder.

    Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>

* boards: cxd56xx: add cxd56_rpr0521rs initialization

    We are adding the sensor initialization for cxd56xx boards in the
    common board folder.

    Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>

* boards: cxd56xx: add cxd56_sensors initialization

    We are adding the sensor initialization for cxd56xx boards in the
    common board folder.

    Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>

* arch: arm: cxd56: add Backup Log driver

    The driver will be used to backup logs on crash.

    Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>

* boards: arm: cxd56xx: common: add crashlog driver

    Add Crashlog driver with support for reset on crash

    Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>

* boards: arm: cxd56xx: move gs2200m initialization

    Move the board gs2200m initalization to the common board folder

    Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>

* boards: arm: cxd56xx: move ili9340 initialization

    Move the board ili9340 initalization to the common board folder

    Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>

* boards: arm: cxd56xx: move lpm013m091a initialization

    Move the board lpm013m091a initalization to the common board folder

    Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>

* boards: arm: cxd56xx: common: typo fixes

    HEADER: Updates on file location
    Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-08-23 13:28:35 +00:00
Gregory Nutt
686ef9b317 arch/arm/src/s32k1xx: Clocking logic was including the wrong 'clock name' files for the S32K11x family. 2019-08-22 10:57:28 -06:00
Gregory Nutt
50e56f1d50 arch/arm/src/s32k1xx/Kconfig: Remove a duplicate configuration setting. Noted by Fabio Balzano. 2019-08-22 10:22:40 -06:00
Gregory Nutt
04dda09ed1 arch/arm/src/s32k1xx/Kconfig: Add Ethernet configuration options that were supposed to have been included in a previous commit. 2019-08-21 17:43:36 -06:00
Nathan Hartman
92bf3bfece arch/arm/src/tiva/hardware/tm4c: Fix wrong description on define TIVA_1WIRE_BASE: Was "EEPROM and Key Locker" (same as the item above). Now "1-Wire Master Module." Make DMACTL symbols visible for TM4C123: Remove "#ifdef CONFIG_ARCH_CHIP_TM4C129" guard around UART DMA Control (DMACTL) symbols. These bits are valid on TM4C123 devices, as well as on TM4C129. Also, improve the comment on UART_DMACTL_DMAERR. 2019-08-21 17:41:24 -06:00
Gregory Nutt
962ccb0f68 arch/arm/src/s32k1xx: This is a rough port of the i.MXRT Ethernet driver to the S32K1xx. The i.MXRT uses the same IP. Completely untested at this point. 2019-08-21 17:33:54 -06:00
Gregory Nutt
b4ee19f5bd arch/arm/src/s32k1xx: This commit brings in the LPSPI and LPI2C peripheral drivers from the i.MXRT which used the identical IP.
Squashed commit of the following:

    arch/arm/src/s32k1xx:  Update peripheral input clocking for the way that things are done for the S32K1XX.  Fix other misc. compilation/configuration issues.

    arch/arm/src/s32k1xx:  Clean up LPSPI and LPI2C naming for S32K1XX.  Using S32K1XX clock functions to get peripheral input clock.

    arch/arm/src/s32k1xx:  Clone i.MXRT LPSPI and LPI2C support.  i.MXRT uses the same IP as S32K1XX.
2019-08-21 11:18:40 -06:00
Nathan Hartman
be5a40c656 Fix typos in comments. 2019-08-21 09:32:59 -06:00
Ivan Ucherdzhiev
19c070e0d1 drivers/mmcsd: Added support for MMC(eMMC) bigger than 2 GB (Tested with IMXRT1050EVKB and samsung eMMC 16GB). arch/arm/src/imxrt: IMXRT uSDHC driver cmd line reset logic modified. 2019-08-21 09:23:29 -06:00
Gregory Nutt
c6026d7500 With these changes the S32K146EVB minimal NSH is function. Only verifed while running from SRAM.
arch/arm/src/s32k1xx/s32k1xx_lowputc.c:  Fix a typo that prevented LPUART1 from working.
    arch/arm/src/s32k1xx/s32k1xx_periphclocks.c and related files:  Fix yet another case of confusion between pre-decremented and non-decremented divider values.  Enforce the rule that dividers are not decremented until the moment they are written into registers.
    arch/arm/src/s32k1xx/s32k1xx_clockconfig.c:  Fix another problem related to whether a divider is pre-decremented or not.  The answer must be the divder values are never pre-decremented.  They are decremented just before being written to hardware.
    arch/arm/src/s32k1xx/s32k1xx_clockconfig.c:  Clean up some bad conditional logic.  Precedence of operators problem.
    boards/arm/s32k1xx/s32k118evb:  Add support for execution out of SRAM.  This is helpful for bringup when you want to avoid putting a lethal image in FLASH.
    arch/arm/src/s32k1xx/s32k1xx_clockconfig.h:  Remove crystal frequency, it is not used.
    arch/arm/src/s32k1xx/s32k1xx_wdog.h:  Fix a typo in a register name.i
    boards/arm/s32k1xx/s32k*evb/configs/nsh/defconfig:  Create Motorola SREC output format.
2019-08-20 14:35:36 -06:00
David Sidrane
64fb11c1b8 Merged in david_s5/nuttx/master_h7 (pull request #1012)
Master h7

* stm32h7:spi allow more clock sources

* stm32h7 has ARCH_HAVE_I2CRESET

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-08-20 14:41:13 +00:00
David Sidrane
0f6db4e1db Merged in david_s5/nuttx/master_h7 (pull request #1011)
Master h7

* stm32h7: DMA Fix compiler warning

* stm32h7: DMA Fix coding style

* stm32h7:serial fix undefined with TERMIOS

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-08-20 11:49:38 +00:00
Gregory Nutt
faf8bdcbf8 Eliminate some new warnings found in build testing 2019-08-19 17:50:04 -06:00
David Sidrane
d20d0227ae Merged in david_s5/nuttx/master_h7 (pull request #1008)
stm32h7:Ported UID from F7

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-08-19 22:21:11 +00:00
David Sidrane
a9e72bb58d Merged in david_s5/nuttx/master_h7 (pull request #1007)
stm32h7:Port DTCM from F7

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-08-19 20:42:52 +00:00
Gregory Nutt
df1294906d arch/arm/src/s32k1xx/s32k1xx_clockconfig.c and related files: Fix confusion about who decrements the rster value. Some dividers may have a function range of 1..8 but the register value is 0..7. There were several places where values were getting decremented twice: Once by higher up logic and once by the register access logic. A such dividers were reviewed and, hopefully, all were fixed. 2019-08-19 13:07:45 -06:00
Ivan Ucherdzhiev
a383a86e72 arch/arm/src/imxrt/imxrt_usdhc.c: uSDHC typo fixes and command transfer error handling modified. 2019-08-19 11:01:58 -06:00
Nathan Hartman
198723b90d arch/arm/src/tiva/common/tiva_serial.c: Fix some typos in comments. 2019-08-19 10:57:00 -06:00
Gregory Nutt
33ab25ae14 arch/arm/src/s32k1xx/s32k14x and boards/arm/s32k1xx/s32k146evb/src: Numerous fixes to get a clean build of the S32K146EVB. 2019-08-19 10:49:50 -06:00
Gregory Nutt
c3f16a46f0 This commit brings the S32K118EVB board to code complete and ready for testing. This commit adds some minor initialization fixes (like disabling the WDOG, enabling the I-cache, and initializing the MPU. It brings more files in from the Kinetis port for the IDLE loop and for GPIO functionality. This also address register definition header file for LMEM and MPU. 2019-08-18 17:26:10 -06:00
Gregory Nutt
db0641556e boards/arm/s32k1xx/s32k118evb: Implement board support for LEDs and buttons. This is taken from the Freedom-K66f with has the same LED and button configuation as the S32K116EVB and uses the same GPIO IP.
boards/arm/s32k1xx/s32k118evb/include/board.h:  Add LPUART0 pin disambiguation.

arch/arm/src/s32k1xx/hardware:  Add pin mux definitions for S32K116, 118, 142, 144, 146, and 148.

arch/arm/src/s32k1xx/s32k1xx_pin.c and .h:  Add support for PIDR register that disables a gneral purpose pin from acting as an input.

arch/arm/src/s32k1xx/s32k1xx_pin.c and .h:  The device does not support slew rate controls or open drain (on all the pins).  Only pins that are configured for a protocol that requires open-drain (e.g;, LPI2C, LPUART single-wire) will work in open-drain mode.
2019-08-18 12:02:54 -06:00
Gregory Nutt
e0d1535a1e arch/arm/src/s32k1xx/s32k1xx_edma.c: Leverage eDMA logic from i.MXRT to S32K1XX. Appears to be the same IP but with fewer channels and features than the i.MXRT implementation. 2019-08-17 16:44:13 -06:00
Gregory Nutt
be55a6542f Squashed commit of the following:
arch/arm/src/s32k1xx/:  Add logic to look up the peripheral clock frequency.  Fix baud calcuation logic in s32k1xx_lowputc.c:  In no longer tries to enable clocking.  That must be done with board logic.  Now gets the peripheral functional clock frequency to determine the baud rate.

    arch/arm/src/s32k1xx:  Add peripheral feature arrays.
2019-08-17 14:36:40 -06:00
Gregory Nutt
e7a3231d7a Squashed commit of the following:
Finishes peripheral clock initialization:

      arch/arm/src/s32k1xx/s32k11x/s32k11x_clockmapping.c
      arch/arm/src/s32k1xx/s32k14x/s32k14x_clockmapping.c
        Provide MCU-specific mapping of clock names to PCC control registers.

      boards/arm/s32k1xx/s32k118evb/src/s32k118_periphclocks.c
        Provides initial clocking for for the S32K118EVB

    arch/arm/src/s32k1xx/s32k1xx_periphclocks.c:  Add logic to initialize peripheral clocking.

    arch/arm/src/s32k1xx/s32k1xx_clockconfig.c:  Add SIM clock configuration.
2019-08-17 11:50:32 -06:00
Gregory Nutt
1f021add53 arm/arm/src/stm32f7 and h7: Fix coding standard problems found by tools/nxstyle in files modified/added in last PR. 2019-08-17 08:20:31 -06:00
David Sidrane
1bbf5c9449 Merged in david_s5/nuttx/master_h7 (pull request #1002)
stm32h7 RTC and friends  support

* stm32h7:Removed f7 in file path

* stm32f7:Fix overwritten IRQ enabled

       System boot order calls clock_initialize then up_initalize.
       clock_initialize was setting up the alarm IRQ
       up_initalize is initializing the NVIC.

       This most likely worked in the past due to a bug in the
       NVIC init code that failed to clear the Interrupt enables.
       That was fixed in 510b0f7e arch/arm/src: Correct all ARMv7-M
       architectures.  Interrupts were not be disabled correctly
       on power up.

* stm32h7:Ported over F7 RTC

* nucleo-h743zi:Add RTC

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-08-17 14:01:28 +00:00
Gregory Nutt
f32c72f0e5 arch/arm/src/s32k1xx/hardware/s32k1xx_pmc.h: Add PMC register definition header file. 2019-08-16 17:36:27 -06:00
Gregory Nutt
5b102ff848 Squashed commit of the following:
arch/arm/src/s32k1xx/s32k1xx_clockconfig.c:  Finishes the implementation of the core clock configuration logic.
    arch/arm/src/s32k1xx/hardware/s32k1xx_smc.h:  Add SMC register definition header file.
    arch/arm/src/s32k1xx:  Bring in GPIO logic from Kinetis.  Looks like the same IP.
2019-08-16 16:18:15 -06:00
Nathan Hartman
223722d6d3 arch/arm/src/tiva: Modify preprocessor logic to support configs with no UART. Now similar to logic for other archs, such as arch/arm/src/a1x/a1x_lowputc.c and arch/arm/src/am335x/am335x_lowputc.c. This change eliminates compiler errors and warnings that were breaking the build with "No CONFIG_UARTn_SERIAL_CONSOLE Setting" when no UARTs / console were configured. 2019-08-15 18:16:24 -06:00
Gregory Nutt
a584865b47 arch/arm/src/s32k1xx/s32k1xx_clockconfig.c: First feeble fragments of clock configuration logic. 2019-08-15 18:08:35 -06:00
Gregory Nutt
74d76786de arch/arm/src/s32k1xx/Kconfig: Break out some feature configurations instead of relying os MCU selections for conditional logic. 2019-08-15 17:17:38 -06:00
Nathan Hartman
b7f1c21b36 arch/arm/src/tiva/common/tiva_irq.c: Add handling for IRQs 128 thru 159. Handling was missing for these IRQs, resulting in compiler warning(s) for 'Missing logic' and/or 'Missing output.' 2019-08-15 16:59:35 -06:00