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>
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>
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>
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>
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
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>
* 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.
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>
(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.