Skip to content

Commit c12b433

Browse files
authored
Merge pull request #12338 from jeromecoutant/PR_STM32L5_DISCO
STM32L5 : add DISCO-L562QE board support
2 parents 3d038e5 + c9aead4 commit c12b433

File tree

9 files changed

+910
-4
lines changed

9 files changed

+910
-4
lines changed

components/cellular/COMPONENT_STMOD_CELLULAR/README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,24 @@ Default HW configuration:
121121

122122
BG96 expansion board can be used but without flow control.
123123

124+
### DISCO_L562_QE
125+
126+
https://os.mbed.com/platforms/ST-Discovery-L562QE/
127+
128+
HW configuration:
129+
130+
Depending on PF_11 and PF_12 GPIO configuration, STMOD pins 1, 2, 3 and 4 can be mapped to SPI3 or UART3.
131+
132+
STModCellular default init procedure is setting the correct values in order to get full UART connectivity.
133+
134+
See in mbed-trace:
135+
```
136+
[INFO][STMOD]: STModCellular creation
137+
[INFO][STMOD]: STMOD+ UART pins re-configuration
138+
```
139+
140+
BG96 expansion board is then fully compatible.
141+
124142
### DISCO_H747I
125143

126144
https://os.mbed.com/platforms/ST-Discovery-H747I/

components/cellular/COMPONENT_STMOD_CELLULAR/STModCellular.cpp

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@
2424
using namespace mbed;
2525

2626
STModCellular::STModCellular(FileHandle *fh) : STMOD_CELLULAR_MODEM(fh),
27+
#if defined(TARGET_DISCO_L562QE)
28+
STMOD_SEL_12(PF_11),
29+
STMOD_SEL_34(PF_12),
30+
#endif
2731
m_powerkey(MBED_CONF_STMOD_CELLULAR_POWER),
2832
m_reset(MBED_CONF_STMOD_CELLULAR_RESET),
2933
m_simsel0(MBED_CONF_STMOD_CELLULAR_SIMSEL0),
@@ -35,6 +39,13 @@ STModCellular::STModCellular(FileHandle *fh) : STMOD_CELLULAR_MODEM(fh),
3539
{
3640
tr_info("STModCellular creation");
3741

42+
#if defined(TARGET_DISCO_L562QE)
43+
/* See PinNames.h file, STMOD+ pins are configurable */
44+
STMOD_SEL_12 = 1;
45+
STMOD_SEL_34 = 1;
46+
tr_info("STMOD+ UART pins re-configuration");
47+
#endif
48+
3849
// start with modem disabled
3950
m_powerkey.write(0);
4051
m_reset.write(1);

components/cellular/COMPONENT_STMOD_CELLULAR/STModCellular.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,10 @@ class STModCellular : public STMOD_CELLULAR_MODEM {
4848
DigitalIn m_sim_reset;
4949
DigitalIn m_sim_clk;
5050
DigitalIn m_sim_data;
51+
#if defined(TARGET_DISCO_L562QE)
52+
DigitalOut STMOD_SEL_12;
53+
DigitalOut STMOD_SEL_34;
54+
#endif
5155
public:
5256
STModCellular(FileHandle *fh);
5357
virtual nsapi_error_t soft_power_on();

components/cellular/COMPONENT_STMOD_CELLULAR/mbed_lib.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,9 @@
6969
"target_overrides": {
7070
"DISCO_L4R9I": {
7171
"rts": "NC"
72+
},
73+
"DISCO_L562QE": {
74+
"rts": "PD_2"
7275
}
7376
}
7477
}

targets/TARGET_STM/TARGET_STM32L5/TARGET_STM32L562xx/TARGET_DISCO_L562QE/PeripheralPins.c

Lines changed: 436 additions & 0 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)