nRF52840 (E73) reset issue #7565
Replies: 1 comment
-
Posted at 2024-02-12 by @fanoush
not really, by disconnecting power the RAM is lost, if code is in RAM it is lost, when you apply power espruino starts again (posibly loading code saved to flash). no 'bootloader magic' happening here
it depends on what you saved, if you locked yourself out of console then you need to skip loading code at startup, this is typically done by holding BTN1 at reset or power on time and btw I'd suggest to not use
no need to use RST if you can disconnect power, it won't change anything, resetting via RST is basically like powering off and on
Of course. It is your code that is run at boot time. If you wish to wait 10 seconds before doing something then use
If you upload code above to flash then it will print a message to console 5 seconds after poweron. Posted at 2024-02-12 by DanDyse Understand ... and I have tried to do so: Posted at 2024-02-12 by @fanoush
quite likely :-)
probably some busy loop in your code? hard to guess Posted at 2024-02-13 by DanDyse Hehe, after some more trying it works ... the IDE is sometimes a bit "unruly" ... thank you @fanoush! |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Posted at 2024-02-12 by DanDyse
Hi,
I know it is not official: I have the E73 from Ebyte flashed with Espruino successfully, it works like a charme.
When I load my code via IDE to RAM, I can easily get back by disconnecting power so the device gets into bootloader (I believe) waiting to get new code.
The code makes the device non-connectable on purpose. So when I save() it to "Flash" changing the code needs a reset.
Now I am having big trouble resetting it by applying power or GND to a specific pin (E73 datasheet says RST is pin 26 which corresponds to P0.18 of nRF52840). Whenever I do this I can see the device advertising as Espruino but just for a few (milli)seconds ... it quickly "falls back" and executes my old code instead. Or I am doing something wrong / not long enough / whatever.
But even if this would work, resetting the device by fiddling with a specific PIN is a real pain, especially if it is already built in somewhere.
Long talk short question: can I instead code it so when powered up to stay in "waiting for IDE connection" for maybe 10 seconds after that it goes on switching to not-connectable and continues with whatever it is used for? So every time I power it up, I get a chance to upload new code?
Maybe this is super easy I have just not found how to do it?
Any help is appreciated.
Beta Was this translation helpful? Give feedback.
All reactions