Skip to content

Commit b7b083e

Browse files
author
Wajahat Abbas
committed
do not assert MDMRST in case of SARA-R4
1 parent a100ce8 commit b7b083e

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F437xG/TARGET_UBLOX_C030/ublox_low_level_api.c

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,18 @@ void ublox_board_init(void) {
2424
// Enable power to 3V3
2525
gpio_init_inout(&gpio, PWR3V3, PIN_OUTPUT, OpenDrain, 1);
2626

27-
// start with modem disabled
28-
gpio_init_out_ex(&gpio, MDMRST, 0);
2927
#if defined(TARGET_UBLOX_C030_R41XM)
28+
/* In case of SARA-R4, MDMRST needs to be asserted for 10 seconds before modem actually powers down.
29+
* This means that modem is initially responsive to AT commands but powers down
30+
* after 10 seconds unless MDMRST is de-asserted (onboard_modem_init()).
31+
*
32+
* This will cause confusion for application as CellularDevice::is_ready()
33+
* will return TRUE initially and later modem will power off without any indication to application.
34+
*/
35+
gpio_init_out_ex(&gpio, MDMRST, 1);
3036
gpio_init_inout(&gpio, MDMPWRON, PIN_OUTPUT, OpenDrain, 1);
3137
#else
38+
gpio_init_out_ex(&gpio, MDMRST, 0);
3239
gpio_init_out_ex(&gpio, MDMPWRON, 0);
3340
#endif
3441
gpio_init_out_ex(&gpio, MDMRTS, 0);

0 commit comments

Comments
 (0)