Skip to content

Commit 192250a

Browse files
fahimalaviunknown
authored andcommitted
Support added for R410M Changes
target added r410m Spaces removed Trace updated
1 parent 636ced8 commit 192250a

File tree

4 files changed

+44
-3
lines changed

4 files changed

+44
-3
lines changed

targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F437xG/TARGET_UBLOX_C030/PinNames.h

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,10 +82,17 @@ typedef enum {
8282
// Cellular modem (a DCE)
8383
MDMPWRON = PE_14, // Power (active high)
8484
MDMRST = PB_5, // Reset (active low)
85+
#if defined(TARGET_UBLOX_C030_R410M)
86+
MDMTXD = PA_9, // Transmit Data
87+
MDMRXD = PA_10, // Receive Data
88+
MDMCTS = PA_11, // Clear to Send
89+
MDMRTS = PA_12, // Request to Send
90+
#else
8591
MDMTXD = PD_5, // Transmit Data
8692
MDMRXD = PD_6, // Receive Data
8793
MDMCTS = PD_3, // Clear to Send
8894
MDMRTS = PD_4, // Request to Send
95+
#endif
8996
MDMDCD = NC, // DCD line not connected
9097
MDMDSR = NC, // DSR line not connected
9198
MDMDTR = NC, // DTR line not connected
@@ -148,13 +155,21 @@ typedef enum {
148155
// STDIO for console print
149156
#ifdef MBED_CONF_TARGET_STDIO_UART_TX
150157
STDIO_UART_TX = MBED_CONF_TARGET_STDIO_UART_TX,
158+
#else
159+
#if defined(TARGET_UBLOX_C030_R410M)
160+
STDIO_UART_TX = PD_5,
151161
#else
152162
STDIO_UART_TX = PA_9,
153163
#endif
164+
#endif
154165
#ifdef MBED_CONF_TARGET_STDIO_UART_RX
155166
STDIO_UART_RX = MBED_CONF_TARGET_STDIO_UART_RX,
167+
#else
168+
#if defined(TARGET_UBLOX_C030_R410M)
169+
STDIO_UART_RX = PD_6,
156170
#else
157171
STDIO_UART_RX = PA_10,
172+
#endif
158173
#endif
159174

160175
// ST-Link

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

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,12 @@ static void press_power_button(int time_us)
2828
{
2929
gpio_t gpio;
3030

31+
#if defined(TARGET_UBLOX_C030_R410M)
32+
gpio_init_inout(&gpio, MDMPWRON, PIN_OUTPUT, OpenDrain, 0);
33+
#else
3134
gpio_init_out_ex(&gpio, MDMPWRON, 0);
35+
#endif
36+
3237
wait_us(time_us);
3338
gpio_write(&gpio, 1);
3439
}
@@ -51,16 +56,27 @@ void onboard_modem_deinit()
5156

5257
void onboard_modem_power_up()
5358
{
54-
/* keep the power line low for 50 microseconds */
59+
#if defined(TARGET_UBLOX_C030_R410M)
60+
/* keep the power line low for 1 seconds */
61+
press_power_button(1000000);
62+
#else
63+
/* keep the power line low for 50 microseconds */
5564
press_power_button(50);
65+
#endif
66+
5667
/* give modem a little time to respond */
5768
wait_ms(100);
5869
}
5970

6071
void onboard_modem_power_down()
6172
{
62-
/* keep the power line low for 1 second */
73+
#if defined(TARGET_UBLOX_C030_R410M)
74+
/* keep the power line low for 1.5 seconds */
75+
press_power_button(1500000);
76+
#else
77+
/* keep the power line low for 1 seconds */
6378
press_power_button(1000000);
79+
#endif
6480
}
6581

6682
#endif //MODEM_ON_BOARD

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

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,18 @@ void ublox_board_init(void) {
2626

2727
// start with modem disabled
2828
gpio_init_out_ex(&gpio, MDMRST, 0);
29+
#if defined(TARGET_UBLOX_C030_R410M)
30+
gpio_init_inout(&gpio, MDMPWRON, PIN_OUTPUT, OpenDrain, 1);
31+
#else
2932
gpio_init_out_ex(&gpio, MDMPWRON, 0);
33+
#endif
3034
gpio_init_out_ex(&gpio, MDMRTS, 0);
3135
gpio_init_in_ex(&gpio, MDMCURRENTSENSE, PullNone);
3236

33-
// start with GNSS disabled
37+
#if !defined (TARGET_UBLOX_C030_R410M)
38+
// start with GNSS disabled, this is ONLY TEMPORARY and that once the HW issue with the GNSSEN pin on the R410M board is resolved then this line will become default for all platforms.
3439
gpio_init_inout(&gpio, GNSSEN, PIN_OUTPUT, PushPullNoPull, 0);
40+
#endif
3541

3642
// power on SD card
3743
gpio_init_out_ex(&gpio, SDPWRON, 1);

targets/targets.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2122,6 +2122,10 @@
21222122
"inherits": ["UBLOX_C030"],
21232123
"release_versions": ["5"]
21242124
},
2125+
"UBLOX_C030_R410M": {
2126+
"inherits": ["UBLOX_C030"],
2127+
"release_versions": ["5"]
2128+
},
21252129
"NZ32_SC151": {
21262130
"inherits": ["FAMILY_STM32"],
21272131
"core": "Cortex-M3",

0 commit comments

Comments
 (0)