2023-08-23 10:08:47 +02:00
|
|
|
==========
|
|
|
|
ST STM32F2
|
|
|
|
==========
|
|
|
|
|
|
|
|
Supported MCUs
|
|
|
|
==============
|
|
|
|
|
|
|
|
TODO
|
|
|
|
|
|
|
|
Peripheral Support
|
|
|
|
==================
|
|
|
|
|
|
|
|
The following list indicates peripherals supported in NuttX:
|
|
|
|
|
|
|
|
========== ======= =====
|
|
|
|
Peripheral Support Notes
|
|
|
|
========== ======= =====
|
2023-08-24 13:50:32 +02:00
|
|
|
FLASH Yes
|
|
|
|
CRC Yes
|
|
|
|
PM ?
|
|
|
|
RCC Yes
|
2023-08-23 10:08:47 +02:00
|
|
|
GPIO Yes
|
2023-08-24 13:50:32 +02:00
|
|
|
SYSCFG Yes
|
2023-08-23 10:08:47 +02:00
|
|
|
EXTI Yes
|
|
|
|
DMA Yes
|
|
|
|
ADC Yes
|
|
|
|
DAC Yes
|
2023-08-24 13:50:32 +02:00
|
|
|
DCMI No
|
|
|
|
TIM Yes
|
2023-08-23 10:08:47 +02:00
|
|
|
IWDG Yes
|
2023-08-24 13:50:32 +02:00
|
|
|
WWDG Yes
|
|
|
|
CRYP Yes
|
|
|
|
RNG Yes
|
|
|
|
HASH ?
|
|
|
|
RTC Yes
|
|
|
|
I2C Yes
|
|
|
|
USART Yes
|
|
|
|
SPI Yes
|
|
|
|
SDIO Yes
|
2023-08-23 10:08:47 +02:00
|
|
|
CAN Yes
|
|
|
|
ETH Yes
|
2023-08-24 13:50:32 +02:00
|
|
|
OTG_FS Yes
|
|
|
|
OTG_HS Yes
|
2023-08-23 10:08:47 +02:00
|
|
|
FSMC Yes
|
|
|
|
========== ======= =====
|
|
|
|
|
|
|
|
Memory
|
2023-08-24 13:50:32 +02:00
|
|
|
------
|
2023-08-23 10:08:47 +02:00
|
|
|
|
2023-08-24 13:50:32 +02:00
|
|
|
- CONFIG_RAM_SIZE - Describes the installed DRAM (SRAM in this case)
|
2023-08-23 10:08:47 +02:00
|
|
|
|
2023-08-24 13:50:32 +02:00
|
|
|
- CONFIG_RAM_START - The start address of installed DRAM
|
2023-08-23 10:08:47 +02:00
|
|
|
|
|
|
|
In addition to internal SRAM, SRAM may also be available through the FSMC.
|
|
|
|
In order to use FSMC SRAM, the following additional things need to be
|
|
|
|
present in the NuttX configuration file:
|
|
|
|
|
2023-08-24 13:50:32 +02:00
|
|
|
- CONFIG_STM32_EXTERNAL_RAM - Indicates that SRAM is available via the
|
|
|
|
FSMC (as opposed to an LCD or FLASH).
|
2023-08-23 10:08:47 +02:00
|
|
|
|
2023-08-24 13:50:32 +02:00
|
|
|
- CONFIG_HEAP2_BASE - The base address of the SRAM in the FSMC address space (hex)
|
2023-08-23 10:08:47 +02:00
|
|
|
|
2023-08-24 13:50:32 +02:00
|
|
|
- CONFIG_HEAP2_SIZE - The size of the SRAM in the FSMC address space (decimal)
|
2023-08-23 10:08:47 +02:00
|
|
|
|
2023-08-24 13:50:32 +02:00
|
|
|
- CONFIG_ARCH_LEDS - Use LEDs to show state. Unique to boards that have LEDs
|
2023-08-23 10:08:47 +02:00
|
|
|
|
2023-08-24 13:50:32 +02:00
|
|
|
- CONFIG_ARCH_INTERRUPTSTACK - This architecture supports an interrupt
|
|
|
|
stack. If defined, this symbol is the size of the interrupt
|
|
|
|
stack in bytes. If not defined, the user task stacks will be
|
|
|
|
used during interrupt handling.
|
2023-08-23 10:08:47 +02:00
|
|
|
|
2023-08-24 13:50:32 +02:00
|
|
|
- CONFIG_ARCH_STACKDUMP - Do stack dumps after assertions
|
2023-08-23 10:08:47 +02:00
|
|
|
|
2023-08-24 13:50:32 +02:00
|
|
|
- CONFIG_ARCH_LEDS - Use LEDs to show state. Unique to board architecture.
|
2023-08-23 10:08:47 +02:00
|
|
|
|
|
|
|
Clock
|
2023-08-24 13:50:32 +02:00
|
|
|
-----
|
2023-08-23 10:08:47 +02:00
|
|
|
|
2023-08-24 13:50:32 +02:00
|
|
|
- CONFIG_ARCH_BOARD_STM32_CUSTOM_CLOCKCONFIG - Enables special STM32 clock
|
|
|
|
configuration features.::
|
2023-08-23 10:08:47 +02:00
|
|
|
|
2023-08-24 13:50:32 +02:00
|
|
|
CONFIG_ARCH_BOARD_STM32_CUSTOM_CLOCKCONFIG=n
|
2023-08-23 10:08:47 +02:00
|
|
|
|
2023-08-24 13:50:32 +02:00
|
|
|
- CONFIG_ARCH_LOOPSPERMSEC - Must be calibrated for correct operation
|
|
|
|
of delay loops
|
2023-08-23 10:08:47 +02:00
|
|
|
|
|
|
|
CAN
|
2023-08-24 13:50:32 +02:00
|
|
|
---
|
2023-08-23 10:08:47 +02:00
|
|
|
|
2023-08-24 13:50:32 +02:00
|
|
|
- CONFIG_CAN - Enables CAN support (one or both of CONFIG_STM32_CAN1 or
|
|
|
|
CONFIG_STM32_CAN2 must also be defined)
|
2023-08-23 10:08:47 +02:00
|
|
|
|
2023-08-24 13:50:32 +02:00
|
|
|
- CONFIG_CAN_EXTID - Enables support for the 29-bit extended ID.
|
|
|
|
Default Standard 11-bit IDs.
|
2023-08-23 10:08:47 +02:00
|
|
|
|
2023-08-24 13:50:32 +02:00
|
|
|
- CONFIG_CAN_FIFOSIZE - The size of the circular buffer of CAN messages.
|
|
|
|
Default: 8
|
2023-08-23 10:08:47 +02:00
|
|
|
|
2023-08-24 13:50:32 +02:00
|
|
|
- CONFIG_CAN_NPENDINGRTR - The size of the list of pending RTR requests.
|
|
|
|
Default: 4
|
2023-08-23 10:08:47 +02:00
|
|
|
|
2023-08-24 13:50:32 +02:00
|
|
|
- CONFIG_STM32_CAN1 - Enable support for CAN1
|
2023-08-23 10:08:47 +02:00
|
|
|
|
2023-08-24 13:50:32 +02:00
|
|
|
- CONFIG_STM32_CAN2 - Enable support for CAN2
|
2023-08-23 10:08:47 +02:00
|
|
|
|
2023-08-24 13:50:32 +02:00
|
|
|
- CONFIG_STM32_CAN1_BAUD - CAN1 BAUD rate.
|
|
|
|
Required if CONFIG_STM32_CAN1 is defined.
|
2023-08-23 10:08:47 +02:00
|
|
|
|
2023-08-24 13:50:32 +02:00
|
|
|
- CONFIG_STM32_CAN2_BAUD - CAN1 BAUD rate.
|
|
|
|
Required if CONFIG_STM32_CAN2 is defined.
|
2023-08-23 10:08:47 +02:00
|
|
|
|
2023-08-24 13:50:32 +02:00
|
|
|
- CONFIG_STM32_CAN_TSEG1 - The number of CAN time quanta in segment 1.
|
|
|
|
Default: 6
|
2023-08-23 10:08:47 +02:00
|
|
|
|
2023-08-24 13:50:32 +02:00
|
|
|
- CONFIG_STM32_CAN_TSEG2 - the number of CAN time quanta in segment 2.
|
|
|
|
Default: 7
|
2023-08-23 10:08:47 +02:00
|
|
|
|
2023-08-24 13:50:32 +02:00
|
|
|
- CONFIG_STM32_CAN_REGDEBUG - If CONFIG_DEBUG_FEATURES is set, this will generate an
|
|
|
|
dump of all CAN registers.
|
2023-08-23 10:08:47 +02:00
|
|
|
|
|
|
|
FSMC SRAM
|
2023-08-24 13:50:32 +02:00
|
|
|
---------
|
2023-08-23 10:08:47 +02:00
|
|
|
|
|
|
|
Internal SRAM is available in all members of the STM32 family. In addition
|
|
|
|
to internal SRAM, SRAM may also be available through the FSMC. In order to
|
|
|
|
use FSMC SRAM, the following additional things need to be present in the
|
2023-08-24 13:50:32 +02:00
|
|
|
NuttX configuration file:
|
2023-08-23 10:08:47 +02:00
|
|
|
|
2023-08-24 13:50:32 +02:00
|
|
|
- CONFIG_STM32_FSMC=y - Enables the FSMC
|
|
|
|
- CONFIG_STM32_EXTERNAL_RAM=y - Indicates that SRAM is available via the
|
|
|
|
FSMC (as opposed to an LCD or FLASH).
|
|
|
|
- CONFIG_HEAP2_BASE - The base address of the SRAM in the FSMC
|
|
|
|
address space
|
|
|
|
- CONFIG_HEAP2_SIZE - The size of the SRAM in the FSMC
|
|
|
|
address space
|
|
|
|
- CONFIG_MM_REGIONS - Must be set to a large enough value to
|
|
|
|
include the FSMC SRAM
|
2023-08-23 10:08:47 +02:00
|
|
|
|
2023-08-24 13:50:32 +02:00
|
|
|
Timers
|
|
|
|
------
|
2023-08-23 10:08:47 +02:00
|
|
|
|
|
|
|
Timer devices may be used for different purposes. One special purpose is
|
|
|
|
to generate modulated outputs for such things as motor control. If CONFIG_STM32_TIMn
|
|
|
|
is defined (as above) then the following may also be defined to indicate that
|
|
|
|
the timer is intended to be used for pulsed output modulation, ADC conversion,
|
|
|
|
or DAC conversion. Note that ADC/DAC require two definition: Not only do you have
|
|
|
|
to assign the timer (n) for used by the ADC or DAC, but then you also have to
|
2023-08-24 13:50:32 +02:00
|
|
|
configure which ADC or DAC (m) it is assigned to.:
|
2023-08-23 10:08:47 +02:00
|
|
|
|
2023-08-24 13:50:32 +02:00
|
|
|
- CONFIG_STM32_TIMn_PWM Reserve timer n for use by PWM, n=1,..,14
|
|
|
|
- CONFIG_STM32_TIMn_ADC Reserve timer n for use by ADC, n=1,..,14
|
|
|
|
- CONFIG_STM32_TIMn_ADCm Reserve timer n to trigger ADCm, n=1,..,14, m=1,..,3
|
|
|
|
- CONFIG_STM32_TIMn_DAC Reserve timer n for use by DAC, n=1,..,14
|
|
|
|
- CONFIG_STM32_TIMn_DACm Reserve timer n to trigger DACm, n=1,..,14, m=1,..,2
|
2023-08-23 10:08:47 +02:00
|
|
|
|
|
|
|
For each timer that is enabled for PWM usage, we need the following additional
|
2023-08-24 13:50:32 +02:00
|
|
|
configuration settings:
|
2023-08-23 10:08:47 +02:00
|
|
|
|
2023-08-24 13:50:32 +02:00
|
|
|
- CONFIG_STM32_TIMx_CHANNEL - Specifies the timer output channel {1,..,4}
|
2023-08-23 10:08:47 +02:00
|
|
|
|
|
|
|
NOTE: The STM32 timers are each capable of generating different signals on
|
|
|
|
each of the four channels with different duty cycles. That capability is
|
|
|
|
not supported by this driver: Only one output channel per timer.
|
|
|
|
|
|
|
|
JTAG
|
2023-08-24 13:50:32 +02:00
|
|
|
----
|
2023-08-23 10:08:47 +02:00
|
|
|
|
2023-08-24 13:50:32 +02:00
|
|
|
JTAG Enable settings (by default JTAG-DP and SW-DP are disabled):
|
2023-08-23 10:08:47 +02:00
|
|
|
|
2023-08-24 13:50:32 +02:00
|
|
|
- CONFIG_STM32_JTAG_FULL_ENABLE - Enables full SWJ (JTAG-DP + SW-DP)
|
|
|
|
|
|
|
|
- CONFIG_STM32_JTAG_NOJNTRST_ENABLE - Enables full SWJ (JTAG-DP + SW-DP)
|
|
|
|
but without JNTRST.
|
|
|
|
|
|
|
|
- CONFIG_STM32_JTAG_SW_ENABLE - Set JTAG-DP disabled and SW-DP enabled
|
2023-08-23 10:08:47 +02:00
|
|
|
|
|
|
|
USART
|
2023-08-24 13:50:32 +02:00
|
|
|
-----
|
|
|
|
|
|
|
|
Options:
|
2023-08-23 10:08:47 +02:00
|
|
|
|
2023-08-24 13:50:32 +02:00
|
|
|
- CONFIG_U[S]ARTn_SERIAL_CONSOLE - selects the USARTn (n=1,2,3) or UARTm (m=4,5)
|
|
|
|
for the console and ttys0 (default is the USART1).
|
2023-08-23 10:08:47 +02:00
|
|
|
|
2023-08-24 13:50:32 +02:00
|
|
|
- CONFIG_U[S]ARTn_RXBUFSIZE - Characters are buffered as received.
|
|
|
|
This specific the size of the receive buffer
|
2023-08-23 10:08:47 +02:00
|
|
|
|
2023-08-24 13:50:32 +02:00
|
|
|
- CONFIG_U[S]ARTn_TXBUFSIZE - Characters are buffered before
|
|
|
|
being sent. This specific the size of the transmit buffer
|
2023-08-23 10:08:47 +02:00
|
|
|
|
2023-08-24 13:50:32 +02:00
|
|
|
- CONFIG_U[S]ARTn_BAUD - The configure BAUD of the UART. Must be
|
2023-08-23 10:08:47 +02:00
|
|
|
|
2023-08-24 13:50:32 +02:00
|
|
|
- CONFIG_U[S]ARTn_BITS - The number of bits. Must be either 7 or 8.
|
2023-08-23 10:08:47 +02:00
|
|
|
|
2023-08-24 13:50:32 +02:00
|
|
|
- CONFIG_U[S]ARTn_PARTIY - 0=no parity, 1=odd parity, 2=even parity
|
2023-08-23 10:08:47 +02:00
|
|
|
|
2023-08-24 13:50:32 +02:00
|
|
|
- CONFIG_U[S]ARTn_2STOP - Two stop bits
|
2023-08-23 10:08:47 +02:00
|
|
|
|
|
|
|
SPI
|
2023-08-24 13:50:32 +02:00
|
|
|
---
|
2023-08-23 10:08:47 +02:00
|
|
|
|
2023-08-24 13:50:32 +02:00
|
|
|
- CONFIG_STM32_SPI_INTERRUPTS - Select to enable interrupt driven SPI
|
|
|
|
support. Non-interrupt-driven, poll-waiting is recommended if the
|
|
|
|
interrupt rate would be to high in the interrupt driven case.
|
2023-08-23 10:08:47 +02:00
|
|
|
|
2023-08-24 13:50:32 +02:00
|
|
|
- CONFIG_STM32_SPIx_DMA - Use DMA to improve SPIx transfer performance.
|
|
|
|
Cannot be used with CONFIG_STM32_SPI_INTERRUPT.
|
2023-08-23 10:08:47 +02:00
|
|
|
|
|
|
|
SDIO
|
2023-08-24 13:50:32 +02:00
|
|
|
----
|
2023-08-23 10:08:47 +02:00
|
|
|
|
2023-08-24 13:50:32 +02:00
|
|
|
Options:
|
2023-08-23 10:08:47 +02:00
|
|
|
|
2023-08-24 13:50:32 +02:00
|
|
|
- CONFIG_SDIO_DMA - Support DMA data transfers. Requires CONFIG_STM32_SDIO
|
|
|
|
and CONFIG_STM32_DMA2.
|
2023-08-23 10:08:47 +02:00
|
|
|
|
2023-08-24 13:50:32 +02:00
|
|
|
- CONFIG_STM32_SDIO_PRI - Select SDIO interrupt priority. Default: 128
|
2023-08-23 10:08:47 +02:00
|
|
|
|
2023-08-24 13:50:32 +02:00
|
|
|
- CONFIG_STM32_SDIO_DMAPRIO - Select SDIO DMA interrupt priority.
|
|
|
|
Default: Medium
|
|
|
|
|
|
|
|
- CONFIG_STM32_SDIO_WIDTH_D1_ONLY - Select 1-bit transfer mode. Default:
|
|
|
|
4-bit transfer mode.
|
2023-08-23 10:08:47 +02:00
|
|
|
|
|
|
|
ETH
|
2023-08-24 13:50:32 +02:00
|
|
|
---
|
|
|
|
|
|
|
|
Options:
|
2023-08-23 10:08:47 +02:00
|
|
|
|
2023-08-24 13:50:32 +02:00
|
|
|
- CONFIG_STM32_PHYADDR - The 5-bit address of the PHY on the board
|
2023-08-23 10:08:47 +02:00
|
|
|
|
2023-08-24 13:50:32 +02:00
|
|
|
- CONFIG_STM32_MII - Support Ethernet MII interface
|
2023-08-23 10:08:47 +02:00
|
|
|
|
2023-08-24 13:50:32 +02:00
|
|
|
- CONFIG_STM32_MII_MCO1 - Use MCO1 to clock the MII interface
|
2023-08-23 10:08:47 +02:00
|
|
|
|
2023-08-24 13:50:32 +02:00
|
|
|
- CONFIG_STM32_MII_MCO2 - Use MCO2 to clock the MII interface
|
2023-08-23 10:08:47 +02:00
|
|
|
|
2023-08-24 13:50:32 +02:00
|
|
|
- CONFIG_STM32_RMII - Support Ethernet RMII interface
|
2023-08-23 10:08:47 +02:00
|
|
|
|
2023-08-24 13:50:32 +02:00
|
|
|
- CONFIG_STM32_AUTONEG - Use PHY autonegotiation to determine speed and mode
|
2023-08-23 10:08:47 +02:00
|
|
|
|
2023-08-24 13:50:32 +02:00
|
|
|
- CONFIG_STM32_ETHFD - If CONFIG_STM32_AUTONEG is not defined, then this
|
|
|
|
may be defined to select full duplex mode. Default: half-duplex
|
2023-08-23 10:08:47 +02:00
|
|
|
|
2023-08-24 13:50:32 +02:00
|
|
|
- CONFIG_STM32_ETH100MBPS - If CONFIG_STM32_AUTONEG is not defined, then this
|
|
|
|
may be defined to select 100 MBps speed. Default: 10 Mbps
|
2023-08-23 10:08:47 +02:00
|
|
|
|
2023-08-24 13:50:32 +02:00
|
|
|
- CONFIG_STM32_PHYSR - This must be provided if CONFIG_STM32_AUTONEG is
|
|
|
|
defined. The PHY status register address may diff from PHY to PHY. This
|
|
|
|
configuration sets the address of the PHY status register.
|
2023-08-23 10:08:47 +02:00
|
|
|
|
2023-08-24 13:50:32 +02:00
|
|
|
- CONFIG_STM32_PHYSR_SPEED - This must be provided if CONFIG_STM32_AUTONEG is
|
|
|
|
defined. This provides bit mask indicating 10 or 100MBps speed.
|
2023-08-23 10:08:47 +02:00
|
|
|
|
2023-08-24 13:50:32 +02:00
|
|
|
- CONFIG_STM32_PHYSR_100MBPS - This must be provided if CONFIG_STM32_AUTONEG is
|
|
|
|
defined. This provides the value of the speed bit(s) indicating 100MBps speed.
|
2023-08-23 10:08:47 +02:00
|
|
|
|
2023-08-24 13:50:32 +02:00
|
|
|
- CONFIG_STM32_PHYSR_MODE - This must be provided if CONFIG_STM32_AUTONEG is
|
|
|
|
defined. This provide bit mask indicating full or half duplex modes.
|
2023-08-23 10:08:47 +02:00
|
|
|
|
2023-08-24 13:50:32 +02:00
|
|
|
- CONFIG_STM32_PHYSR_FULLDUPLEX - This must be provided if CONFIG_STM32_AUTONEG is
|
|
|
|
defined. This provides the value of the mode bits indicating full duplex mode.
|
2023-08-23 10:08:47 +02:00
|
|
|
|
2023-08-24 13:50:32 +02:00
|
|
|
- CONFIG_STM32_ETH_PTP - Precision Time Protocol (PTP). Not supported
|
|
|
|
but some hooks are indicated with this condition.
|
2023-08-23 10:08:47 +02:00
|
|
|
|
|
|
|
USB OTG FS
|
2023-08-24 13:50:32 +02:00
|
|
|
----------
|
2023-08-23 10:08:47 +02:00
|
|
|
|
|
|
|
STM32 USB OTG FS Host Driver Support
|
|
|
|
|
2023-08-24 13:50:32 +02:00
|
|
|
Pre-requisites:
|
2023-08-23 10:08:47 +02:00
|
|
|
|
2023-08-24 13:50:32 +02:00
|
|
|
- CONFIG_USBHOST - Enable general USB host support
|
|
|
|
- CONFIG_STM32_OTGFS - Enable the STM32 USB OTG FS block
|
|
|
|
- CONFIG_STM32_SYSCFG - Needed
|
2023-08-23 10:08:47 +02:00
|
|
|
|
2023-08-24 13:50:32 +02:00
|
|
|
- CONFIG_STM32_OTGFS_RXFIFO_SIZE - Size of the RX FIFO in 32-bit words.
|
|
|
|
Default 128 (512 bytes)
|
2023-08-23 10:08:47 +02:00
|
|
|
|
2023-08-24 13:50:32 +02:00
|
|
|
- CONFIG_STM32_OTGFS_NPTXFIFO_SIZE - Size of the non-periodic Tx FIFO
|
|
|
|
in 32-bit words. Default 96 (384 bytes)
|
2023-08-23 10:08:47 +02:00
|
|
|
|
2023-08-24 13:50:32 +02:00
|
|
|
- CONFIG_STM32_OTGFS_PTXFIFO_SIZE - Size of the periodic Tx FIFO in 32-bit
|
|
|
|
words. Default 96 (384 bytes)
|
2023-08-23 10:08:47 +02:00
|
|
|
|
2023-08-24 13:50:32 +02:00
|
|
|
- CONFIG_STM32_OTGFS_DESCSIZE - Maximum size of a descriptor. Default: 128
|
2023-08-23 10:08:47 +02:00
|
|
|
|
2023-08-24 13:50:32 +02:00
|
|
|
- CONFIG_STM32_OTGFS_SOFINTR - Enable SOF interrupts. Why would you ever
|
|
|
|
want to do that?
|
2023-08-23 10:08:47 +02:00
|
|
|
|
2023-08-24 13:50:32 +02:00
|
|
|
- CONFIG_STM32_USBHOST_REGDEBUG - Enable very low-level register access
|
|
|
|
debug. Depends on CONFIG_DEBUG_FEATURES.
|
2023-08-23 10:08:47 +02:00
|
|
|
|
2023-08-24 13:50:32 +02:00
|
|
|
- CONFIG_STM32_USBHOST_PKTDUMP - Dump all incoming and outgoing USB
|
|
|
|
packets. Depends on CONFIG_DEBUG_FEATURES.
|
2023-08-23 10:08:47 +02:00
|
|
|
|
|
|
|
Supported Boards
|
|
|
|
================
|
|
|
|
|
|
|
|
.. toctree::
|
|
|
|
:glob:
|
|
|
|
:maxdepth: 1
|
|
|
|
|
|
|
|
boards/*/*
|