Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

STM32 readme update #13513

Merged
merged 1 commit into from
Sep 1, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 41 additions & 2 deletions targets/TARGET_STM/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,14 @@ This table summarizes the STM32Cube versions currently used in Mbed OS master br
| F1 | 1.8.0 | https://github.com/STMicroelectronics/STM32CubeF1 |
| F2 | 1.6.0 | https://github.com/STMicroelectronics/STM32CubeF2 |
| F3 | 1.9.0 | https://github.com/STMicroelectronics/STM32CubeF3 |
| F4 | 1.19.0 | https://github.com/STMicroelectronics/STM32CubeF4 |
| F4 | 1.25.0 | https://github.com/STMicroelectronics/STM32CubeF4 |
| F7 | 1.16.0 | https://github.com/STMicroelectronics/STM32CubeF7 |
| G0 | 1.3.0 | https://github.com/STMicroelectronics/STM32CubeG0 |
| G4 | 1.1.0 | https://github.com/STMicroelectronics/STM32CubeG4 |
| H7 | 1.7.0 | https://github.com/STMicroelectronics/STM32CubeH7 |
| L0 | 1.10.0 | https://github.com/STMicroelectronics/STM32CubeL0 |
| L1 | 1.8.1 | https://github.com/STMicroelectronics/STM32CubeL1 |
| L4 | 1.11.0 | https://github.com/STMicroelectronics/STM32CubeL4 |
| L4 | 1.14.0 | https://github.com/STMicroelectronics/STM32CubeL4 |
| L5 | 1.1.0 | https://github.com/STMicroelectronics/STM32CubeL5 |
| WB | 1.7.0 | https://github.com/STMicroelectronics/STM32CubeWB |

Expand Down Expand Up @@ -269,6 +270,42 @@ $ mv STM32H745ZITx TARGET_H745ZI_BOARD

## ST specific implementation

### Pin configuration

It can be useful to have a look on files that describes pin configuration for your board:
- targets/TARGET_STM/TARGET_STM32**XX**/TARGET_STM32**XXXXX**/TARGET_**XXXXX**/PeripheralPins.c
- targets/TARGET_STM/TARGET_STM32**XX**/TARGET_STM32**XXXXX**/TARGET_**XXXXX**/PinNames.h

#### Alternate feature

You can easily see the alternate functions for each pin.

Ex:
```
{PC_10, UART_3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART3)},
{PC_10_ALT0, UART_4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_UART4)},
```
- If your application is using PC_10 pin for UART, drivers will configure UART3 instance.
- If your application is using PC_10_ALT0 pin for UART, drivers will configure UART4 instance.

The same alternate choice feature is also used for PWM, ADC, SPI, etc...

#### Conflict pins

Sometimes there are some conflicts in pin use.

Ex:
```
{PA_5, SPI_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF5_SPI1)}, // Connected to LD2 [green led]
```
==> You can use PA_5 pin as SPI, **only** if your application is not using LED...

Sometimes, pin is explicitly removed by default to avoid issues (but you can uncomment the line for your custom board)
```
// {PB_4, UART_2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)}, // Connected to same instance as STDIO
```


### WiFi configuration

https://github.com/ARMmbed/wifi-ism43362
Expand Down Expand Up @@ -303,6 +340,8 @@ you then have to add **USE_USER_DEFINED_HAL_ETH_MSPINIT** macro.

https://os.mbed.com/teams/ST/wiki/

https://os.mbed.com/teams/ST/wiki/STDIO

https://os.mbed.com/teams/ST/wiki/How-to-enable-flash-dual-bank

https://os.mbed.com/teams/ST/wiki/Nucleo-144pins-ethernet-spi-conflict