mirror of
https://gitea.osmocom.org/sim-card/simtrace2.git
synced 2026-03-23 08:48:35 +03:00
Add debug commands '1' and '2' to generate 1ms reset pulses to modems
This commit is contained in:
@@ -8,6 +8,7 @@
|
|||||||
#include "utils.h"
|
#include "utils.h"
|
||||||
#include "req_ctx.h"
|
#include "req_ctx.h"
|
||||||
#include "wwan_led.h"
|
#include "wwan_led.h"
|
||||||
|
#include "wwan_perst.h"
|
||||||
|
|
||||||
uint32_t g_unique_id[4];
|
uint32_t g_unique_id[4];
|
||||||
|
|
||||||
@@ -196,6 +197,8 @@ static void check_exec_dbg_cmd(void)
|
|||||||
printf("\tY\tRelease peer SAM3 ERASE signal\r\n");
|
printf("\tY\tRelease peer SAM3 ERASE signal\r\n");
|
||||||
printf("\ty\tAssert peer SAM3 ERASE signal\r\n");
|
printf("\ty\tAssert peer SAM3 ERASE signal\r\n");
|
||||||
printf("\tU\tProceed to USB Initialization\r\n");
|
printf("\tU\tProceed to USB Initialization\r\n");
|
||||||
|
printf("\t1\tGenerate 1ms reset pulse on WWAN1\r\n");
|
||||||
|
printf("\t2\tGenerate 1ms reset pulse on WWAN2\r\n");
|
||||||
break;
|
break;
|
||||||
case 'E':
|
case 'E':
|
||||||
write_hub_eeprom();
|
write_hub_eeprom();
|
||||||
@@ -252,6 +255,14 @@ static void check_exec_dbg_cmd(void)
|
|||||||
printf("Seetting SIMTRACExx_ERASE (active)\r\n");
|
printf("Seetting SIMTRACExx_ERASE (active)\r\n");
|
||||||
PIO_Set(&pin_peer_erase);
|
PIO_Set(&pin_peer_erase);
|
||||||
break;
|
break;
|
||||||
|
case '1':
|
||||||
|
printf("Resetting Modem 1 (of this SAM3)\r\n");
|
||||||
|
wwan_perst_do_reset(1);
|
||||||
|
break;
|
||||||
|
case '2':
|
||||||
|
printf("Resetting Modem 2 (of this SAM3)\r\n");
|
||||||
|
wwan_perst_do_reset(2);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
printf("Unknown command '%c'\r\n", ch);
|
printf("Unknown command '%c'\r\n", ch);
|
||||||
break;
|
break;
|
||||||
@@ -280,6 +291,7 @@ extern int main(void)
|
|||||||
PIO_InitializeInterrupts(0);
|
PIO_InitializeInterrupts(0);
|
||||||
|
|
||||||
wwan_led_init();
|
wwan_led_init();
|
||||||
|
wwan_perst_init();
|
||||||
|
|
||||||
EEFC_ReadUniqueID(g_unique_id);
|
EEFC_ReadUniqueID(g_unique_id);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user