You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello!
I have a custom PCB with PWRKEY pin instead of RST. Is it possible utilize it on init with lwGSM or I have to implement some additional code by myself?
Thank you.
The text was updated successfully, but these errors were encountered:
You can implement whatever custom bootup logic you want in your lwgsm_ll_init() function. For example, this is where I wake up my SIM7000 module from sleep mode by pulling its DTR pin low. If you have a board that requires some use of the PWRKEY pin like pulsing it high or low for some time, you could do it here.
/** * This function try to init GSM modem and power it on by PWRKEY if init was failed */intgsm_reset(void) {
if(lwgsm_init(NULL, 1) ==lwgsmOK) {
return0;
}
for (inti=0; i<3; ++i) {
interr;
LL_GPIO_ResetOutputPin(GSM_PWRKEY_port, GSM_PWRKEY_pin);
osDelay(1500); // according to 4.2.2.1 of "SIM800 hardware design"LL_GPIO_SetOutputPin(GSM_PWRKEY_port, GSM_PWRKEY_pin);
osDelay(1500);
err=lwgsm_reset_with_delay(LWGSM_CFG_RESET_DELAY_DEFAULT, NULL, NULL, 1);
if(err!=lwgsmOK) {
printf("lwGSM error %d", err);
} else {
return0;
}
}
errno=ENODEV;
return-1;
}
Hello!
I have a custom PCB with PWRKEY pin instead of RST. Is it possible utilize it on init with lwGSM or I have to implement some additional code by myself?
Thank you.
The text was updated successfully, but these errors were encountered: