Skip to content

Commit a0dfcfb

Browse files
authored
Merge pull request #11642 from jeromecoutant/PR_CELLULAR_FC
STMOD_CELLULAR: remove flow control support for DISCO_L4R9I
2 parents ea3ead0 + b648444 commit a0dfcfb

File tree

3 files changed

+39
-7
lines changed

3 files changed

+39
-7
lines changed

components/cellular/COMPONENT_STMOD_CELLULAR/README.md

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ Here is the used mbed_app.json:
4343
},
4444
"target_overrides": {
4545
"DISCO_L496AG": {
46-
"target.macros_add": ["CELLULAR_DEVICE=STModCellular"],
4746
"target.components_add": ["STMOD_CELLULAR"],
4847
"stmod_cellular.provide-default": "true"
4948
}
@@ -70,3 +69,33 @@ mbed compile -t GCC_ARM -m DISCO_L496AG --flash
7069
````
7170

7271
Then check the serial console (serial baudrate set to 115200 bit/s)
72+
73+
## Board with STMOD+ Connector
74+
75+
### DISCO_L496AG
76+
77+
https://os.mbed.com/platforms/ST-Discovery-L496AG/
78+
79+
Default HW configuration:
80+
- STMOD pins 1, 2, 3 and 4 are mapped to UART CTS/TX/RX/RTS
81+
82+
BG96 expansion board is fully compatible.
83+
84+
### DISCO_L4R9I
85+
86+
https://os.mbed.com/platforms/DISCO-L4R9I/
87+
88+
Default HW configuration:
89+
- STMOD pins 1 and 2 are mapped to SPI
90+
- STMOD pins 2 and 3 are mapped to UART TX/RX
91+
92+
BG96 expansion board can be used but without flow control.
93+
94+
### DISCO_H747I
95+
96+
https://os.mbed.com/platforms/ST-Discovery-H747I/
97+
98+
Default HW configuration:
99+
- STMOD pins 1, 2, 3 and 4 are mapped to SPI
100+
101+
BG96 expansion board can not be used without solder bridges update

components/cellular/COMPONENT_STMOD_CELLULAR/STModCellular.cpp

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,6 @@ nsapi_error_t STModCellular::soft_power_on()
109109

110110
tr_debug("Modem %sready to receive AT commands\r\n", rdy ? "" : "NOT ");
111111

112-
#if DEVICE_SERIAL_FC
113112
if ((MBED_CONF_STMOD_CELLULAR_CTS != NC) && (MBED_CONF_STMOD_CELLULAR_RTS != NC)) {
114113
tr_debug("Enable flow control\r\n");
115114

@@ -133,7 +132,6 @@ nsapi_error_t STModCellular::soft_power_on()
133132
tr_error("Failed to enable hw flow control\r\n");
134133
}
135134
}
136-
#endif
137135

138136
rtos::ThisThread::sleep_for(500);
139137

@@ -165,10 +163,10 @@ CellularDevice *CellularDevice::get_default_instance()
165163
tr_debug("MODEM default instance\r\n");
166164

167165
static UARTSerial serial(MBED_CONF_STMOD_CELLULAR_TX, MBED_CONF_STMOD_CELLULAR_RX, MBED_CONF_STMOD_CELLULAR_BAUDRATE);
168-
#if defined (MBED_CONF_STMOD_CELLULAR_RTS) && defined(MBED_CONF_STMOD_CELLULAR_CTS)
169-
tr_debug("STMOD_CELLULAR flow control: RTS %d CTS %d\r\n", MBED_CONF_STMOD_CELLULAR_RTS, MBED_CONF_STMOD_CELLULAR_CTS);
170-
serial.set_flow_control(SerialBase::RTSCTS, MBED_CONF_STMOD_CELLULAR_RTS, MBED_CONF_STMOD_CELLULAR_CTS);
171-
#endif
166+
if ((MBED_CONF_STMOD_CELLULAR_CTS != NC) && (MBED_CONF_STMOD_CELLULAR_RTS != NC)) {
167+
tr_debug("STMOD_CELLULAR flow control: RTS %d CTS %d\r\n", MBED_CONF_STMOD_CELLULAR_RTS, MBED_CONF_STMOD_CELLULAR_CTS);
168+
serial.set_flow_control(SerialBase::RTSCTS, MBED_CONF_STMOD_CELLULAR_RTS, MBED_CONF_STMOD_CELLULAR_CTS);
169+
}
172170
static STModCellular device(&serial);
173171
return &device;
174172
}

components/cellular/COMPONENT_STMOD_CELLULAR/mbed_lib.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,5 +65,10 @@
6565
"help": "Provide as default CellularDevice [true/false]",
6666
"value": false
6767
}
68+
},
69+
"target_overrides": {
70+
"DISCO_L4R9I": {
71+
"rts": "NC"
72+
}
6873
}
6974
}

0 commit comments

Comments
 (0)