pulkin / micropython

MicroPython implementation on Ai-Thinker GPRS module A9 (RDA8955)
https://micropython.org
MIT License
103 stars 31 forks source link

reboot on fatal implementation #104

Open Magycsys opened 3 years ago

Magycsys commented 3 years ago

I have no idea on how to implement .reboot_on_fatal in a a9g board, can anyone please help me?

ens4dz commented 3 years ago

Just creat file with that name, for ex:

with open('/.reboot_on_fatal', 'w') as f: 
    pass

Look at: https://github.com/pulkin/micropython/blob/04411c93995102a68cdbca5aa7dcee053ada7acf/ports/gprs_a9/fatal.c#L79

Just note this didn't help if module got halted