2018-07-26 11:48:55 +02:00
/**
@defgroup boards_nucleo-f401re STM32 Nucleo-F401RE
@ingroup boards_common_nucleo64
@brief Support for the STM32 Nucleo-F401RE
## Overview
2020-02-13 20:39:39 +01:00
The Nucleo-F401RE is a board from ST's Nucleo family supporting a ARM Cortex-M4
2022-08-04 21:49:42 +02:00
STM32F401RE microcontroller with 96KiB of RAM and 512KiB of Flash.
2018-07-26 11:48:55 +02:00
## Hardware
2020-02-13 20:39:39 +01:00
![Nucleo64 F401RE](http://www.open-electronics.org/wp-content/uploads/2015/08/Figura2-500x467.png)
2018-07-26 11:48:55 +02:00
2023-03-17 15:04:17 +01:00
## Pinout
2024-10-17 19:01:44 +02:00
@image html pinouts/nucleo-f401re.svg "Pinout for the Nucleo-F401RE (from STM user manual UM1724, http://www.st.com/resource/en/user_manual/dm00105823.pdf, page 32)" width=50%
2023-03-17 15:04:17 +01:00
2018-07-26 11:48:55 +02:00
### MCU
| MCU | STM32F401RE |
2020-02-13 20:39:39 +01:00
|:---------- |:----------------- |
| Family | ARM Cortex-M4 |
| Vendor | ST Microelectronics |
2022-08-04 21:49:42 +02:00
| RAM | 96KiB |
| Flash | 512KiB |
2020-02-13 20:39:39 +01:00
| Frequency | up to 84MHz |
2018-07-26 11:48:55 +02:00
| FPU | yes |
2020-02-13 20:39:39 +01:00
| Timers | 11 (2x watchdog, 1 SysTick, 6x 16-bit, 2x 32-bit [TIM2]) |
| ADCs | 1x 12-bit (16 channels) |
2018-07-26 11:48:55 +02:00
| UARTs | 3 |
2020-02-13 20:39:39 +01:00
| SPIs | 3 |
2018-07-26 11:48:55 +02:00
| I2Cs | 3 |
| RTC | 1 |
2020-02-13 20:39:39 +01:00
| USB | 1 |
| Vcc | 1.7V - 3.6V |
2018-07-26 11:48:55 +02:00
| Datasheet | [Datasheet](http://www.st.com/resource/en/datasheet/stm32f401re.pdf) |
2020-02-13 20:39:39 +01:00
| Reference Manual | [Reference Manual](https://www.st.com/resource/en/reference_manual/dm00096844.pdf) |
2018-07-26 11:48:55 +02:00
| Programming Manual | [Programming Manual](http://www.st.com/resource/en/programming_manual/dm00046982.pdf) |
2020-02-13 20:39:39 +01:00
| Board Manual | [Board Manual](http://www.st.com/resource/en/user_manual/dm00105823.pdf) |
2018-07-26 11:48:55 +02:00
## Implementation Status
| Device | ID | Supported | Comments |
|:------------- |:------------- |:------------- |:------------- |
| MCU | STM32F401RE | partly | Energy saving modes not fully utilized |
| Low-level driver | GPIO | yes | |
| | PWM | yes (7 pins available)) | |
| | UART | 2 UARTs | USART2 via STLink/USB or D0(RX)/D1(TX) and USART6 on PA12(RX)/PA11(TX) |
| | I2C | 1 I2C | |
| | SPI | 1 SPI | |
| | USB | no | |
| | Timer | 2 32 bit timers | |
## Flashing the device
2022-08-01 18:20:14 +02:00
### Flashing the Board Using OpenOCD
2018-07-26 11:48:55 +02:00
The ST Nucleo-F401RE board includes an on-board ST-LINK V2 programmer. The
easiest way to program the board is to use OpenOCD. Once you have installed
OpenOCD (look [here](https://github.com/RIOT-OS/RIOT/wiki/OpenOCD) for
installation instructions), you can flash the board simply by typing
```
2020-02-13 20:39:39 +01:00
make BOARD=nucleo-f401re flash
2018-07-26 11:48:55 +02:00
```
and debug via GDB by simply typing
```
2020-02-13 20:39:39 +01:00
make BOARD=nucleo-f401re debug
2018-07-26 11:48:55 +02:00
```
2022-08-01 18:20:14 +02:00
### Flashing the Board Using ST-LINK Removable Media
On-board ST-LINK programmer provides via composite USB device removable media.
Copying the HEX file causes reprogramming of the board. This task
could be performed manually; however, the cpy2remed (copy to removable
media) PROGRAMMER script does this automatically. To program board in
this manner, use the command:
```
make BOARD=nucleo-f401re PROGRAMMER=cpy2remed flash
```
@note This PROGRAMMER was tested using ST-LINK firmware 2.37.26. Firmware updates
could be found on [this STM webpage](https://www.st.com/en/development-tools/stsw-link007.html).
2018-07-26 11:48:55 +02:00
## Supported Toolchains
2020-02-13 20:39:39 +01:00
For using the ST Nucleo-F401RE board we strongly recommend the usage of the
2020-03-04 13:28:21 +01:00
[GNU Tools for ARM Embedded Processors](https://launchpad.net/gcc-arm-embedded)
2018-07-26 11:48:55 +02:00
toolchain.
## Issues with old Hardware Revisions
Some Nucleo 64 Boards come in different hardware revisions, which is located
on a sticker at the backside of the board. As discussed in issue
[#6721](https://github.com/RIOT-OS/RIOT/issues/6721), there are some issues with
the external clock sources in revisions smaller than `C-03`. (This would also be
true for all boards with board ID `MB1136`).
The revision `C-01` has a different configuration for the high speed external
clock (HSE), which is used in RIOT. This could be fixed by reconfiguring some
solder bridges as mentioned in the [user
manual](http://www.st.com/resource/en/user_manual/dm00105823.pdf), section
6.7.1.
The other issue is, that revision `C-01` also has no 32kHz oscillator, so the
RTC module of RIOT cannot be used.
*/