Skip to content

Commit

Permalink
Merge pull request #14905 from jeromecoutant/PR_STM32CUSTOM
Browse files Browse the repository at this point in the history
STM32 : README updates about custom boards
  • Loading branch information
0xc0170 authored Jul 13, 2021
2 parents 46b411d + 2bdd68f commit f37b0c4
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 3 deletions.
26 changes: 23 additions & 3 deletions targets/TARGET_STM/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
Table of Contents
=================

* [README for Mbed OS STM32 targets](#readme-for-mbed-os-stm32-targets)
* [ST TOOLS](#st-tools)
* [USB drivers](#usb-drivers)
* [ST-Link FW](#st-link-fw)
Expand All @@ -19,16 +18,19 @@ Table of Contents
* [Add a custom board](#add-a-custom-board)
* [Board specific files (pinmap)](#board-specific-files-pinmap)
* [Use of custom_targets.json](#use-of-custom_targetsjson)
* [Make your custom board public](#make-you-custom-board-public)
* [ST specific implementation](#st-specific-implementation)
* [Pin configuration](#pin-configuration)
* [Alternate feature](#alternate-feature)
* [Conflict pins](#conflict-pins)
* [Clock selection](#clock-selection)
* [System clock](#system-clock)
* [Low power clock](#low-power-clock)
* [I2C Timing calculation algorithm](#i2c-timing-calculation-algorithm)
* [Sleep feature](#sleep-feature)
* [WiFi configuration](#wifi-configuration)
* [Ethernet configuration](#ethernet-configuration)
* [Asynchronous SPI limitation](#asynchronous-spi-limitation)
* [Mbed OS Wiki pages](#mbed-os-wiki-pages)


Expand Down Expand Up @@ -65,6 +67,14 @@ $ mbedls
| DISCO_L475VG_IOT01A | DISCO_L475VG_IOT01A[0] | E: | COM9 | 07640221683B630A577FF553 | V2J37M26 |
```

```
$ mbedtools detect
Board name Serial number Serial port Mount point(s) Build target(s) Interface Version
--------------- ------------------------ ------------- ---------------- ----------------- -------------------
NUCLEO-U575ZI-Q 0022003c5553500d20393256 COM25 D: NUCLEO_U575ZI_Q V3J7M3
```


### STM32 Cube

https://www.st.com/en/embedded-software/stm32cube-mcu-packages.html
Expand Down Expand Up @@ -150,6 +160,9 @@ Tool is not used in Mbed OS, but it can be useful for you.

It should be "easy" to add your custom board with a STM32 MCU in Mbed OS

You can also check in https://github.com/ARMmbed/stm32customtargets


### STM32 organisation

STM32 root directory is https://github.com/ARMmbed/mbed-os/tree/master/targets/TARGET_STM
Expand Down Expand Up @@ -259,7 +272,7 @@ STM32_open_pin_data DB version STM32CubeMX-DB.6.0.10

### Use of custom_targets.json

https://os.mbed.com/docs/mbed-os/v6.0/porting/porting-a-custom-board.html
https://os.mbed.com/docs/mbed-os/latest/porting/porting-a-custom-board.html

Example with a board based on STM32F103C8 (like BluePill):
- MCU_STM32F103x8 generic configuration is already available in targets.json file
Expand Down Expand Up @@ -321,6 +334,13 @@ $ mv TARGET_STM32H745ZIT TARGET_H745ZI_BOARD
```


### Make your custom board public

We will be happy to add every public board in https://github.com/ARMmbed/stm32customtargets

Make a Pull request, we will check consistency and build.


## ST specific implementation

### Pin configuration
Expand Down Expand Up @@ -408,7 +428,7 @@ You can change this in you local mbed_app.json:
}
```

#### I2C TIming calculation algorothm
#### I2C Timing calculation algorithm

I2C drivers version 2 use I2C timing register.

Expand Down
30 changes: 30 additions & 0 deletions targets/TARGET_STM/TARGET_STM32WL/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,18 @@ This ST MCU family is dual-core : based on an Arm Cortex-M4 core and an Arm Cort

Only M4 core is currently used by mbed-os applications.

* [Supported boards](#supported-boards)
* [NUCLEO_WL55JC](#nucleo_wl55jc)
* [CUSTOM boards](#custom-boards)
* [LoRa](#lora)
* [MBED-OS support](#mbed-os-support)
* [baremetal support](#baremetal-support)
* [Antenna configuration](#antenna-configuration)
* [GPIO debug pins](#gpio-debug-pins)
* [mbed-os test](#mbed-os-test)
* [Application example](#application-example)


# Supported boards

## NUCLEO_WL55JC
Expand All @@ -19,6 +31,12 @@ Only M4 core is currently used by mbed-os applications.
- Total FLASH is 256KB
- RAM: 64 KB


## CUSTOM boards

Check https://github.com/ARMmbed/stm32customtargets


# LoRa

## MBED-OS support
Expand All @@ -37,6 +55,18 @@ mbed_app.json:
```


## Antenna configuration

NUCLEO HW configuration is provided as the default configuration.

https://github.com/ARMmbed/mbed-os/blob/master/connectivity/drivers/lora/TARGET_STM32WL/STM32WL_radio_driver.cpp#L23
```
MBED_WEAK void set_antenna_switch(RBI_Switch_TypeDef state)
```

So you can overwrite it for your custom board.


## GPIO debug pins

2 pins can be configured to check RX and TX activity.
Expand Down

0 comments on commit f37b0c4

Please sign in to comment.