Difference between revisions of "STM32F4 Discovery"
Line 4: | Line 4: | ||
* STMicroelectronics STM32F4VGT6 Cortex M4 MCU, up to 168Mhz with floating point unit (FPU), 192 KB RAM, 1024KB Flash | * STMicroelectronics STM32F4VGT6 Cortex M4 MCU, up to 168Mhz with floating point unit (FPU), 192 KB RAM, 1024KB Flash | ||
* on-board stlinkv2 with SWD header (capeable of programming itself or a external MCU) | * on-board stlinkv2 with SWD header (capeable of programming itself or a external MCU) | ||
* ob-board power regulator for the MCU (3V or 5V Input) | * ob-board power regulator for the MCU (3V or 5V Input) | ||
* 1 x user push button | * 1 x user push button | ||
* 4 x LED (orange, green, blue, red) | * 4(5) x LED (orange, green, blue, red, green) | ||
* | * 6 x UART (UART1, UART2, UART3, UART4, UART5, UART6) | ||
* | * 3 x SPI (SPI1, SPI2, SPI3) | ||
* 3 x I2c (I2C1, | * 2(3) x I2c (I2C1, I2C2, (I2C3)) | ||
* 1 x PPM input | * 1 x PPM input | ||
* 4 x ADC input, which one is used for bat voltage | * 4 x ADC input, which one is used for bat voltage | ||
* 97 x 66 mm PCB | * 97 x 66 mm PCB | ||
* 4 x status LED (USB OTG, stlink red, stlink green, USB power) | * 4 x status LED (USB OTG, stlink red, stlink green, USB power) | ||
* LIS302DL MEMS 3 axis accelerometer (currently not supported) | |||
* LIS302DL MEMS 3 axis accelerometer | |||
==Pinout== | |||
The Discovery has a male 100 pin (2x25pin on both sides) pinout. | |||
===LED=== | ===LED=== | ||
LED_3 PD13 orange, above LIS302DL | LED_3 PD13 orange, above LIS302DL | ||
Line 28: | Line 28: | ||
LED_6 PD15 blue, below LIS302DL | LED_6 PD15 blue, below LIS302DL | ||
LED_9 PA9, same as USB power (VBUS), needs to be enabled in stm32f4_discovery.h | |||
===UART=== | |||
* UART1 | |||
** TX PB6 | |||
** RX PB7 | |||
* UART2 | |||
** TX PD5 | |||
** RX PD6 | |||
* UART3 | |||
** TX PD8 | |||
** RX PD9 | |||
* UART4 | |||
** TX PC10 | |||
** RX PC11 | |||
Can not be used if SPI3 is active ! | |||
* UART5 | |||
** TX PC12 | |||
** RX PD2 | |||
Can not be used if SPI3 is active ! | |||
* UART6 | |||
** TX PC6 | |||
** RX PC7 | |||
===SPI=== | |||
* SPI1 | |||
** SCK PB3 | |||
** MISO PB4 | |||
** MOSI PB5 | |||
* SPI2 | |||
** SCK PB13 | |||
** MISO PB14 | |||
** MOSI PB15 | |||
Can not be used if PWM10 & PWM11 are active ! | |||
* SPI3 | |||
** SCK PC10 | |||
** MISO PC11 | |||
** MOSI PC12 | |||
Can not be used if UART4 & UART5 are active ! | |||
* SPI select Slave 0 PE2 | |||
* SPI select Slave 1 PE7 | |||
===I2C=== | |||
* I2C1 | |||
** SCL PB8 | |||
** SDA PB9 | |||
* I2C2 | |||
** SCL PB10 | |||
** SDA PB11 | |||
* I2C3 | |||
** SCL PA8 | |||
** SDA PC9 | |||
I2C3 needs to be enabled in stm32f4_discovery.h | |||
===ADC=== | |||
* ADC_1 PB1 | |||
* ADC_2 PC1 | |||
* ADC_3 PC4 | |||
* ADC_4 PA4 (used for BAT Voltge with voltage divider) | |||
===PWM=== | |||
# PWM0 PE9 | |||
# PWM1 PE11 | |||
# PWM2 PE13 | |||
# PWM3 PE14 | |||
# PWM4 PE5 | |||
# PWM5 PE6 | |||
# PWM6 PA3 | |||
# PWM7 PA2 | |||
# PWM8 PA1 | |||
# PWM9 PA0 | |||
# PWM10 PB14 (can not be ised if SPI2 is active !) | |||
# PWM11 PB15 (can not be ised if SPI2 is active !) | |||
===PPM Input=== | |||
PA8 | |||
===Spektrum=== | |||
bind pin PA8<br/> | |||
input UART2 PA10 | |||
===Jumper=== | ===Jumper=== | ||
====pin jumper==== | ====pin jumper==== |
Revision as of 00:54, 8 October 2013
This is for the STM32F4 Discovery board with STM32F407VGT6, a familiar board is available with STM32F401VCT6 but this is NOT exactly the same ! Do not use the other board with files build for this one !!!
Overview
- STMicroelectronics STM32F4VGT6 Cortex M4 MCU, up to 168Mhz with floating point unit (FPU), 192 KB RAM, 1024KB Flash
- on-board stlinkv2 with SWD header (capeable of programming itself or a external MCU)
- ob-board power regulator for the MCU (3V or 5V Input)
- 1 x user push button
- 4(5) x LED (orange, green, blue, red, green)
- 6 x UART (UART1, UART2, UART3, UART4, UART5, UART6)
- 3 x SPI (SPI1, SPI2, SPI3)
- 2(3) x I2c (I2C1, I2C2, (I2C3))
- 1 x PPM input
- 4 x ADC input, which one is used for bat voltage
- 97 x 66 mm PCB
- 4 x status LED (USB OTG, stlink red, stlink green, USB power)
- LIS302DL MEMS 3 axis accelerometer (currently not supported)
Pinout
The Discovery has a male 100 pin (2x25pin on both sides) pinout.
LED
LED_3 PD13 orange, above LIS302DL
LED_4 PD12 green, left of LIS302DL
LED_5 PD14 red, right of LIS302DL
LED_6 PD15 blue, below LIS302DL
LED_9 PA9, same as USB power (VBUS), needs to be enabled in stm32f4_discovery.h
UART
- UART1
- TX PB6
- RX PB7
- UART2
- TX PD5
- RX PD6
- UART3
- TX PD8
- RX PD9
- UART4
- TX PC10
- RX PC11
Can not be used if SPI3 is active !
- UART5
- TX PC12
- RX PD2
Can not be used if SPI3 is active !
- UART6
- TX PC6
- RX PC7
SPI
- SPI1
- SCK PB3
- MISO PB4
- MOSI PB5
- SPI2
- SCK PB13
- MISO PB14
- MOSI PB15
Can not be used if PWM10 & PWM11 are active !
- SPI3
- SCK PC10
- MISO PC11
- MOSI PC12
Can not be used if UART4 & UART5 are active !
- SPI select Slave 0 PE2
- SPI select Slave 1 PE7
I2C
- I2C1
- SCL PB8
- SDA PB9
- I2C2
- SCL PB10
- SDA PB11
- I2C3
- SCL PA8
- SDA PC9
I2C3 needs to be enabled in stm32f4_discovery.h
ADC
- ADC_1 PB1
- ADC_2 PC1
- ADC_3 PC4
- ADC_4 PA4 (used for BAT Voltge with voltage divider)
PWM
- PWM0 PE9
- PWM1 PE11
- PWM2 PE13
- PWM3 PE14
- PWM4 PE5
- PWM5 PE6
- PWM6 PA3
- PWM7 PA2
- PWM8 PA1
- PWM9 PA0
- PWM10 PB14 (can not be ised if SPI2 is active !)
- PWM11 PB15 (can not be ised if SPI2 is active !)
PPM Input
PA8
Spektrum
bind pin PA8
input UART2 PA10
Jumper
pin jumper
- JP1 current consumption of the MCU can be measured here
- CN3 set: stlinkv2 is connected to onboard MCU, unset: stlinkv2 is connected to SWD header to program external MCU
solder jumper
- SB17 bypass for JP1
Firmware Flashing
FLASH_MODE=DFU is set as default
stm32f4-discovery can be programmed in two different ways:
- with the MCU native (embedded in rom) DFU USB bootloader over the micro usb ab connector
- required hardware: usb to micro and usb to mini usb cable
- required software: dfu_util tool (present
- put MCU in DFU mode: connect mini and usb to pc, connect pin BOOT0 with 3V, press reset button(LED LD7 should light up now), disconnect BOOT0 to 3V
- with onboard stlinkv2 over SWD
- required hardware: usb to mini usb cable
- required software: st_flash and st_util
- more information: STLink page