Skip to content

Commit

Permalink
Merge pull request #12338 from jeromecoutant/PR_STM32L5_DISCO
Browse files Browse the repository at this point in the history
STM32L5 : add DISCO-L562QE board support
  • Loading branch information
0xc0170 authored Feb 17, 2020
2 parents 3d038e5 + c9aead4 commit c12b433
Show file tree
Hide file tree
Showing 9 changed files with 910 additions and 4 deletions.
18 changes: 18 additions & 0 deletions components/cellular/COMPONENT_STMOD_CELLULAR/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,24 @@ Default HW configuration:

BG96 expansion board can be used but without flow control.

### DISCO_L562_QE

https://os.mbed.com/platforms/ST-Discovery-L562QE/

HW configuration:

Depending on PF_11 and PF_12 GPIO configuration, STMOD pins 1, 2, 3 and 4 can be mapped to SPI3 or UART3.

STModCellular default init procedure is setting the correct values in order to get full UART connectivity.

See in mbed-trace:
```
[INFO][STMOD]: STModCellular creation
[INFO][STMOD]: STMOD+ UART pins re-configuration
```

BG96 expansion board is then fully compatible.

### DISCO_H747I

https://os.mbed.com/platforms/ST-Discovery-H747I/
Expand Down
11 changes: 11 additions & 0 deletions components/cellular/COMPONENT_STMOD_CELLULAR/STModCellular.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@
using namespace mbed;

STModCellular::STModCellular(FileHandle *fh) : STMOD_CELLULAR_MODEM(fh),
#if defined(TARGET_DISCO_L562QE)
STMOD_SEL_12(PF_11),
STMOD_SEL_34(PF_12),
#endif
m_powerkey(MBED_CONF_STMOD_CELLULAR_POWER),
m_reset(MBED_CONF_STMOD_CELLULAR_RESET),
m_simsel0(MBED_CONF_STMOD_CELLULAR_SIMSEL0),
Expand All @@ -35,6 +39,13 @@ STModCellular::STModCellular(FileHandle *fh) : STMOD_CELLULAR_MODEM(fh),
{
tr_info("STModCellular creation");

#if defined(TARGET_DISCO_L562QE)
/* See PinNames.h file, STMOD+ pins are configurable */
STMOD_SEL_12 = 1;
STMOD_SEL_34 = 1;
tr_info("STMOD+ UART pins re-configuration");
#endif

// start with modem disabled
m_powerkey.write(0);
m_reset.write(1);
Expand Down
4 changes: 4 additions & 0 deletions components/cellular/COMPONENT_STMOD_CELLULAR/STModCellular.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ class STModCellular : public STMOD_CELLULAR_MODEM {
DigitalIn m_sim_reset;
DigitalIn m_sim_clk;
DigitalIn m_sim_data;
#if defined(TARGET_DISCO_L562QE)
DigitalOut STMOD_SEL_12;
DigitalOut STMOD_SEL_34;
#endif
public:
STModCellular(FileHandle *fh);
virtual nsapi_error_t soft_power_on();
Expand Down
3 changes: 3 additions & 0 deletions components/cellular/COMPONENT_STMOD_CELLULAR/mbed_lib.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@
"target_overrides": {
"DISCO_L4R9I": {
"rts": "NC"
},
"DISCO_L562QE": {
"rts": "PD_2"
}
}
}

Large diffs are not rendered by default.

Loading

0 comments on commit c12b433

Please sign in to comment.