Commit Graph

11387 Commits

Author SHA1 Message Date
Petteri Aimonen
ec6c7839d3 Merged in paimonen/nuttx/pullreq_STM32_NDAC_fix (pull request #752)
NuttX: STM32F407VG has only one DAC

NDAC=2 causes compilation error when trying to use e.g. STM32_DAC1_CR macro.

Approved-by: GregoryN <gnutt@nuttx.org>
2018-11-09 12:15:57 +00:00
David Sidrane
f6e21619e2 Merged in david_s5/nuttx/master_imxrt_boards (pull request #751)
imxrt:Clock config fixes and board.h sets sources and divisors

* imxrt:clockconfig bug fix & Board config set clocks

      Fixed logic that was not clearing bits as ~ was
      mising in &= mask operations.

      Use valuse from the board.h file so set the Mux that
      selects the clock sources.

      Use board defined PODF values to select clock.

      Only configure USDHC2 clocks when board defines clocks.

* imxrt1050-evk:Board setting used to set  LSPI and USDHC Clocks

Approved-by: GregoryN <gnutt@nuttx.org>
2018-11-09 00:52:50 +00:00
Xiang Xiao
247414c6ad drivers/mtd and other MTD drivers: Remove mtd_procfsoperations since we can now get the same information from inode 2018-11-08 09:46:11 -06:00
Gregory Nutt
e640635c41 arch/arm/src/imxrt/imxrt_gpioirq.c: Fix some inconsistent spacing and indentation noted in review of previous commit. 2018-11-06 16:51:46 -06:00
David Sidrane
a0745bbef6 Merged in david_s5/nuttx/master_imxrt (pull request #748)
Adding imxrt 106x

* imxrt:Fix comment in imxrt105x_memorymap

* imxrt:Add imxrt1060 memory map

* imxrt:Add imcrt106x to imxrt_memorymap

* imxrt:Add i.MX RT 106x to Kconfig

* imxrt:Moved IMXRT_GPIO_NPORTS to chip.h & fixed comments

* imxrt:105x IRQ fix comment

* imxrt:gpioirq GPIO4,5 using wrong boundry

* imxrt:Add RT106x irq headers & Kconfig

* imxrt:Add rt106x GPIO chip headers

* imxrt:Extend Number of GPIO ports

* imxrt:Add 106x DMAMUX header

* imxrt:iomuxc add 106x

* imxrt:106x iomuxc extend Indexes

* imxrt:pinmux Add 106x

* imxrt:clockconfig use imxrt_memorymap.h

* imxrt:allocateheap use OCRAM2 as BASE when avaialbe

Approved-by: GregoryN <gnutt@nuttx.org>
2018-11-06 22:47:20 +00:00
Anthony Merlino
7f10234468 Merged in antmerlino/nuttx/spi-initialize (pull request #746)
This change is needed specifically for the case where a bootloader sets the SPE bit before starting NuttX.  In that case, the test in the SPI driver is bogus.  This change fixes that by assuring that NuttX has booted and initialized at least once (whether or not SPE is set) before the driver starts refusing to initialize.

arch/arm/stm32*: Don't rely on SPI_CR1_SPE to determine if peripheral has been initialized yet.

Approved-by: GregoryN <gnutt@nuttx.org>
2018-11-01 16:00:27 +00:00
Dave Marples
ae054b93bb arch/arm/src/imxrt/imxrt_usdhc.c: Initial commit of the i.MXRT SDHC driver. This driver is partially functional, working in PIO mode. DMA support and additional testing are needed. 2018-11-01 06:26:51 -06:00
Gregory Nutt
6d93658ff8 Add new configuratin CONFIG_NET_MCASTGROUP. This option is selected automatically if either CONFIG_NET_IGMP or CONFIG_NET_MLD are selected. Most conditional logic based on CONFIG_NET_IGMP replaced with conditioning on CONFIG_NET_MCASTGROUP. 2018-10-31 15:03:51 -06:00
Gregory Nutt
a3c67df91d arch/arm/src/imxrt: Add full support for the LPSPI in poll mode; includes a minor fix for LPI2C. 2018-10-31 12:50:05 -06:00
Anthony Merlino
7750e55d15 Merged in antmerlino/nuttx/stm32f20xx-kconfig-fix (pull request #745)
Fixes Kconfig options to include all STM32F20XX processors, not just STM32F207

* arch/arm/src/stm32: Fixes Kconfig options to include all STM32F20XX processors, not just STM32F207

* arch/arm/src/stm32: Removes redundant STM32_STM32F429 depends from Kconfig. STM32F4XXX already does this

Approved-by: GregoryN <gnutt@nuttx.org>
2018-10-31 03:53:13 +00:00
Mateusz Szafoni
2a4ed884b5 Merged in raiden00/nuttx_pe (pull request #743)
arch/arm/stm32: add support for STM32F303xD/E; configs: add basic support for nucleo-f303ze

Approved-by: GregoryN <gnutt@nuttx.org>
2018-10-28 16:39:56 +00:00
Gregory Nutt
11cc274eef Trivial, cosmetic changes from review of last PR. 2018-10-28 06:55:20 -06:00
Mateusz Szafoni
7329c81503 Merged in raiden00/nuttx_h7 (pull request #742)
Add basic SPI support for H7

* stm32h7: basic SPI support (nodma, noirq)

* nucleo-h743zi: nrf24l01 support

* nrf24l01.c: fix compilation errors

* stm32h7x3xx_rcc.c: enable SYSCFG clock

Approved-by: GregoryN <gnutt@nuttx.org>
2018-10-28 12:43:08 +00:00
Dave Marples
ba95cfe067 Eliminate some warnings. 2018-10-25 06:48:11 -06:00
Gregory Nutt
c6a480f8ff arch/arm/src/lpc54xx/lpc54_sdmmc.c: Ported the last of Dave Marples fixes to the LPC54. Not yet verified. 2018-10-24 18:15:17 -06:00
Dave Marples
d1c01e1135 With these changes the SDMMC card for LPC4330 is now working properly BUT it needs more testing, especially with different cards etc. This code should be applicable to all members of the lpc43xx family.
In addition to the problems that were previously identified there were a few other bits and pieces outstanding;

  * Timing was dependent on CPU speed rather than absolute time
  * End of transfer handling was a bit mixed up
  * It's possible for data to still be in the FIFO (i.e. not have reached
    the card) when a next write is requested, so we need to wait for that to
    complete
  * Interrupt Status could be carried over from one transfer episode to the
    next, corrupting progress
  * Multi-descriptor DMA writing simply wasn't implemented, but there were no
    indications ... it just failed silently
2018-10-24 18:06:38 -06:00
Gregory Nutt
4901710fc7 Dave Marples refinements should be applied to the LPC54 as well 2018-10-24 08:29:17 -06:00
Dave Marples
2b0f680349 Some small refinements to commit 98f268b303 2018-10-23 17:32:26 -06:00
David Sidrane
92e4a7223c Merged in david_s5/nuttx/master_imxrt (pull request #737)
Master imxrt

* imxrt:Fix typos bit# and names

* imxrt:wdog Registers are 16 Bits

* imxrt:wdog Update has to be within 255 clocks of unlock

* imxrt:clockconfig Fix comments

* imxrt1050-evk:board.h Fix comments

* imxrt:imxrt_ccm.h Define Mux Selects for board.h use

* imxrt:clockconfig Allow better control from board.h

       1) Allows a board config clock setting to be defined
       in terms of the /n values shown in Figure 18-2.
       Clock Tree of the i.MX RT1050 Processor Reference
       Manual, Rev. 1, 03/2018

       2) Allows the clock multipelx selection to be made in
       The board config.

* imxrt1050-evk:Define board clocking based on divisor and muxes

Approved-by: GregoryN <gnutt@nuttx.org>
2018-10-23 22:54:28 +00:00
Gregory Nutt
37fafccaa1 arch/arm/src/lpc54xx/lpc54_sdmmc.c: This commit ports Dave Marple's patch for the LPC43 SD/MMC to the LPC54. See commit 98f268b303 2018-10-23 10:51:54 -06:00
Dave Marples
98f268b303 arch/arm/src/lpc43xx/lpc43_sdmmc.c: This commit corrects a problem in lpc43_dmasendsetup(). There was no linked DMA descriptor code on the send side. The end result was stalls while sending multiple sectors. This commit addes that in and the send code is working much better. 2018-10-23 10:47:52 -06:00
Gregory Nutt
729b2e1907 arch/arm/src/lpc43xx/Kconfig: Restored dependency on EXPERIMENTAL for LPC43_SDMMC. 2018-10-23 06:22:40 -06:00
Gregory Nutt
41ebb6d672 arch/arm/src/lpc54xx/lpc54_sdmmc.c: Tested Dave Marple's LPC43 fix with the LPC54. Does not work. This commit adds support for and SDMMC errata and setting of the delay register which was missing in the previous commit. It appears that now I can read the SD card successfully, but I get CRC errors when writing to the card. 2018-10-22 09:35:02 -06:00
Jussi Kivilinna
06c6b0ce1b arch/arm/src/stm32f7/stm32_flash.c: Allow programming OTP blocks through progmem interface 2018-10-22 06:17:18 -06:00
Gregory Nutt
4b0327d845 arch/arm/src/lpc54/lpc54_sdmmc: Port Dave Marple's LPC43 USB DCD fix to the LPC54 with appropriate changed. 2018-10-21 17:55:51 -06:00
Dave Marples
b71e0a199a iFix the LPC4330 family SDMMC card access. Some of these fixes (e.g. DELAY register) may also be applicable elsewhere. These are _NOT_ extensively tested, but they are certainly better than the current state of the driver. The fixes, specifically, are;
* Clocks were wrongly configured - way too fast because there is no primary divider on LPC4330

This is fixed by means of changing the definitions in the board.h file. I've edited the one for the lpc4330-xplorer board because I'm actually working with Versiboard and don't want to contribute that config just yet while I've still got the drains up on it.

* The LPC43_SDMMC_DELAY register was not being set

I suspect, in the 'real world', it's possible to get away without setting this, but I've added a register definition, default value and register access macros into arch/arm/src/lpc43xx/chip/lpc43_scu.h and then used them in arch/arm/src/lpc43xx/lpc43_sdmmc.c.

* The LPC43_SDMMC_BLKSIZ and LPC43_SDMMC_BYTECNT registers had the wrong values.

The management have already implemented a rather nice block level interface for the stm32 so I've just re-used that to write to these registers as required. I'm slightly nervous that accessing the configuration registers (SCR being the prime example) which has a much smaller block size may not be being done in the right way but it does seem to work correctly, so let's assume it's all OK until someone tells me otherwise.

These fixes have been tested with DMA-based read/write on a LPC4330. Speed via nsh is pretty low but I'm assuming that's just a buffering/implementation issue for now.
2018-10-21 17:22:22 -06:00
Gregory Nutt
805c1bc2b9 Cosmetic changes for coding standard fixes. 2018-10-20 18:15:44 -06:00
Gregory Nutt
1fcd70fdb9 arch/arm/src/stm32/stm32_pwm.c: Fix a compilation error introduced in recent PR. Found in build testing. 2018-10-19 16:21:50 -06:00
Gregory Nutt
b732afc718 arch/arm/src/stm32: Costmetic changes from review of last PR. 2018-10-18 10:44:23 -06:00
Daniel Agar
cfc5b59636 Merged in dagar/nuttx/pr-stm32_dma_per_spi (pull request #736)
stm32 enable separate DMA per SPI configuration

Approved-by: GregoryN <gnutt@nuttx.org>
2018-10-18 16:36:14 +00:00
Mateusz Szafoni
6e18a32b3f Merged in raiden00/nuttx_pe (pull request #734)
stm32_pwm: break and lock configuration and some cosmetics

Approved-by: GregoryN <gnutt@nuttx.org>
2018-10-15 17:18:38 +00:00
Mateusz Szafoni
632bba3af8 Merged in raiden00/nuttx_pe (pull request #733)
Improvements in STM32 PWM low level driver

stm32_pwm: remove some impossible PWM configurations

stm32_pwm: support for complementary outputs

stm32_pwm: deadtime configuration

stm32_pwm: output polarity and IDLE state configuration

nucleo-f302r8: pwm support

stm32f429i-disco: pwm support

configs: update some configurations according to changes in STM32 PWM driver

Approved-by: GregoryN <gnutt@nuttx.org>
2018-10-14 14:08:52 +00:00
Ivan Ucherdzhiev
42f1f8898b /arch/arm/src/imxrt/imxrt_lpi2c.c: Fixes 2 bugs in the for IMXRT1050: (1) I2C time out and did not send STOP condition when sending single byte, (2) I2C could not receive bytes after repeated start. 2018-10-13 06:38:33 -06:00
Gregory Nutt
2deaab261f arch/arm/src/lpc43xx/lpc43_serial.c: Fix some minor typos in comments. 2018-10-12 17:07:04 -06:00
Dave Marples
9713e0768d arch/arm/src/lpc43xx/lpc43_serial.c: Fix copy-paste error: g_usart1port->g_uart1port. 2018-10-12 17:03:50 -06:00
Gregory Nutt
c6c9064464 EFM32, Kinetis, BCM2708: Juha Niskanen's fix of commit 4a32325e3c also applies to BCM2708, EFM32, and Kinetis. 2018-10-10 06:45:03 -06:00
Juha Niskanen
4a32325e3c stm32f0, stm32f7, stm32h7, stm32l4 serial: fix use of CONFIG_SERIAL_IFLOWCONTROL for CONFIG_SERIAL_OFLOWCONTROL 2018-10-10 06:29:29 -06:00
Juha Niskanen
167663462f arch/arm/src/stm32f7/stm32_serial.c: force invalidate of data cache after DMA re-enable when returning from low-power mode 2018-10-09 06:35:43 -06:00
Ramtin Amin
b539d04cfb drivers/wireless/ieee802.11: Add capabilility for Broadcom chips to get firmware and CLM data from a mounted file system vs. in-memory data structures. 2018-10-07 10:03:39 -06:00
Gregory Nutt
82d1c17cd8 arch/arm/src/stm32/stm32_allocateheap.c: Eliminate warning, 'CONFIG_STM32_HAVE_CCM is not defined. 2018-10-05 16:53:23 -06:00
raiden00pl
342cbe58dd Merged in raiden00/nuttx_pe (pull request #732)
configs: add support for nucleo-f302r8 board

Approved-by: GregoryN <gnutt@nuttx.org>
2018-10-05 13:02:49 +00:00
raiden00pl
2fcf682316 Merged in raiden00/nuttx_pe (pull request #731)
stm32_tim.c: don't use hardcoded UIF interrupt in some functions

Approved-by: GregoryN <gnutt@nuttx.org>
2018-10-04 16:16:54 +00:00
raiden00pl
ff0640096f Merged in raiden00/nuttx_h7 (pull request #730)
Master

* stm32h7/rcc: update rcc defs, add SPI clock configuration and some fixes in rcc

* stm32h7: initial defs for SPI

* stm32h7: initial defs for MDMA, DMA, BDMA and DMAMUX

Approved-by: GregoryN <gnutt@nuttx.org>
2018-10-04 16:16:14 +00:00
Gregory Nutt
b9823ce1d7 EFM32, STM32 (FS/HS), STM32F7, and STM32L4 OTGFS/HS: Th epin_configure() function used the same eptype as the TxFIFO number for all endpoints. This should probably be the physical EP number, not the EP type. Suggested by Key Two. 2018-10-02 10:10:56 -06:00
Dave Marples
91eb792e56 Corrections for the i.MXRT Ethernet:
(1) Now the Ethernet is completely re-initialized when an error occurs by means of taking the interface down and back up but the PHY is _not_ renegotiated for that case because that is very time consuming and an error in the Ethernet is no reflection on the state of the PHY anyway.

(2) Explicitly sets the expected PHY address to zero (this could be moved into the config) rather than searching for it which takes ages, and it's zero anyway for this board (that's the broadcast address, and anything that cannot respond on that has multiple PHYs, so that would be a new board).

(3) Allows for the renegotiation of the PHY to be optional when a reset is needed. If a non-renegotiated reset doesn't result in good comms to the PHY then it'll automatically be escalated to a renegotiated one.

(4) Only performs a reset for errors that need it (the CRITICAL_ERROR define).  The list of errors that need reset are somewhat arbitrarily chosen based on my prejudices and might need to be revisited, but certainly the jabber errors don't need reset, the partial packet is thrown away by the layer above anyway.

(5) Re-loads the multicast table on reset.

(6) Adds a bit more logging into the imxrt Ethernet module.
2018-09-28 07:25:48 -06:00
Masayuki Ishikawa
b154c81255 Merged in masayuki2009/nuttx.nuttx/lc823450_mpu_for_flat (pull request #728)
arch/arm/src/lc823450: MPU support for FLAT build

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

Approved-by: GregoryN <gnutt@nuttx.org>
2018-09-27 11:34:22 +00:00
Dave Marples
4eb118afd1 arch/arm/src/imxrt/imxrt_enet.c: Fix a race condition in setting up the Ethernet Tx transfer. 2018-09-26 10:59:47 -06:00
Ivan Ucherdzhiev
910e7a3899 arch/arm/src/imxrt/imxrt_lpsrtc.c: SVNC LPCR register bits 0 & 1 are NOT reserved and are, in fact, needed to enabled the SRTC. Now the SRTC is working. 2018-09-26 10:13:20 -06:00
Ivan Ucherdzhiev
955527b14f arch/arm/src/imxrt: Add LPI2C driver. 2018-09-26 07:57:45 -06:00
Dave Marples
681609ad51 arch/arm/src/imxrt/imxrt_enet.c: The board would not come up if I ran Nuttx from cold. I dumped the PHY registers to see what the differences were and the PHY was coming up in NANDTree mode. This is a mode for testing connectivity between the PHY and the MAC. Switching this mode off in the PHY registers has fixed the problem. 2018-09-25 06:52:07 -06:00