I'm working on a customized device using STM32L4xx and the Sara R410m u-blox modem via UART interface. The firmware is written in C. There's an additional USB port so it's possible to send AT-Commands with a more-graphical interface via u-blox m-center to the modem after enable it using the GPIO Pins.
The driver itself is not the problem.
Based on the experiences with the device there were some strange side-effects after a re-flash with new firmware in debugging context (timeouts even if device and modem is alive, config fails, etc... all that could be caused by other bugs/parameters, I know that, but back to the point).
There is a new condition/feature set up by project management that the firmware, after switching on the device using GPIO, have to clear the non volatile memory before writing new parameters.
I already have found in the datasheet page 381 the list of commands storing their values in the non volatile memory:
https://www.u-blox.com/sites/default/files/SARA-R4_ATCommands_%28UBX-17003787%29.pdf
I'm reading the datasheet for about a week now and can't find something as a solution to clear non volatile memory or write factory settings to it.
Maybe you guys could help me or have a recommendation?
EDIT: Trying AT&F0 or ATZ to delete Profiles, have a look to log file contents:
[15:05:21.268] rx: AT&V
[15:05:21.268] tx: AT&V
[15:05:21.283] tx:
[15:05:21.283] tx: ACTIVE PROFILE: &C: 1; &D: 1; &F: e; Q: e; V: 1; X: 1; Z: e; &S: 1;
[15:05:21.283] tx: &W: 0; Q: 3; E: 1; L: 0; M: 0; &Y: 0; 0: 0; 50: 0; 54: 10; 55: 8; 56: 2;
[15:05:21.283] tx: S7: 0; 58: 2; 510: 14; S3: 13; S2: 43; 512: 50; +ICE: 3,1; +IFC: 2,2;
[15:05:21.283] tx: +IPR: 115200; +CMEE: 2; +W546: 12; +CFUN:; +UAUTHREQ: 1,0,-; +CEREG: 0;
[15:05:21.283] tx: +CEMODE: 0; +CSCS: "IRA"; +CRC: 0;
[15:05:21.283] tx: +CGDCONT: (1,"IP","iot.lnce.net","0.0.0.0",0,0,0,0); +CGDSCONT: ;
[15:05:21.283] tx: +CGEREP: 0,0; +CGSMS: 1; +CSMS: 0; +CMGF: 0; +CSAS: 0; +GRES: 0;
[15:05:21.283] tx: +CSCA: "",; +CSMP: ?0,0; +CREG: 0; +CGREG: 0; +CGPIAF: 0,0,0,0;
[15:05:21.283] tx: +CSDH: 0; +CPIN: ,; +CMER: 0,0,0,0,0; +CPMS: "ME","ME","ME";
[15:05:21.283] tx: +CNMI: 0,0,0,0,0; +CMMS: 0; +COPS: 0,0,""; +CGATT: 1; +CGACT(1,1);
[15:05:21.283] tx: +CPOL: 0,2,-,0,0,0,0; +CPLS: 0; +CTZR: 0; +CTZU: 0; +CSDF: 1; +CUSD: 0;
[15:05:21.283] tx: +CIND: 5,1,1,0,0,1,1,0,1,0,0,0; +CPSMS: 0,"","","",""; +CEDRXS: 0,1,"";
[15:05:21.283] tx: +URAT: 0,0; +UMNOPROF: 0; +UPSV: 0,0
[15:05:21.283] tx:
[15:05:21.283] tx: OK
[15:05:26.776] rx: AT&F8
[15:05:26.778] tx: AT&F8
[15:05:26.778] tx:
[15:05:26.778] tx: OK
[15:05:32.146] rx: AT&V
[15:05:32.152] tx: AT&V
[15:05:32.168] tx:
[15:05:32.168] tx: ACTIVE PROFILE: &C: 1; &D: 1; &F: 0; Q: e; V: 1; X: 1; Z: 0; &S: 1;
[15:05:32.168] tx: &W: 0; Q: 3; E: 1; L: 0; M: 0; &Y: e; 0: e; 50: e; S4: 10; S5: 8; S6: 2;
[15:05:32.168] tx: S7: 0; S8: 2; 510: 14; S3: 13; S2: 43; 512: 50; +ICE: 3,1; +IFC: 2,2;
[15:05:32.168] tx: +IPR: 115200; +CMEE: 2; +W546: 12; +CFUN:; +UAUTHREQ: 1,0,-; +CEREG: 0;
[15:05:32.168] tx: +CEMODE: 0; +CSCS: "IRA"; +CRC: 0;
[15:05:32.168] tx: +CGDCONT: (1,"IP","iot.lnce.net","0.0.0.0",0,0,0,0); +CGDSCONT: ;
[15:05:32.168] tx: +CGEREP: 0,0; +CGSMS: 1; +CSMS: 0; +CMGF: 0; +CSAS: 0; +GRES: 0;
[15:05:32.168] tx: +CSCA: "",; +CSMP: ?0,0; +CREG: 0; +CGREG: 0; +CGPIAF: 0,0,0,0;
[15:05:32.168] tx: +CSDH: 0; +CPIN: ,; +CMER: 0,0,0,0,0; +CPMS: "ME","ME","ME";
[15:05:32.168] tx: +CNMI: 0,0,0,0,0; +CMMS: 0; +COPS: 0,0,-; +CGATT: 1; +CGACT(1,1);
[15:05:32.168] tx: +CPOL: 0,2,-,0,0,0,0; +CPLS: 0; +CTZR: 0; +CTZU: 0; +CSDF: 1; +CUSD: 0;
[15:05:32.168] tx: +CIND: 5,1,1,0,0,1,1,0,1,0,0,0; +CPSMS: 0,"","","",""; +CEDRXS: 0,1,-;
[15:05:32.168] tx: +URAT: 0,0; +UMNOPROF: 0; +UPSV: 0,0
question from:
https://stackoverflow.com/questions/65925599/how-to-clear-non-volatile-memory-on-u-blox-sara-r410-using-at-commands