Hello,
I need to detect it (mainly separate the reset with the button from the rest), but it doesn’t work, I always have 0 in u32Reset_reason. Maybe this register is already read elsewhere in the library?
Hi @beegee , thanks for pointing me.
I use Arduino ,found in file C:\Users\admin\AppData\Local\Arduino15\packages\rakwireless\hardware\nrf52\1.0.1\cores\nRF5\wiring.h
void init( void )
{
// clear reset reason: can save it for application usage if needed.
NRF_POWER->RESETREAS |= NRF_POWER->RESETREAS;
just add there
_reset_reason = NRF_POWER->RESETREAS;
// clear reset reason: can save it for application usage if needed.
NRF_POWER->RESETREAS |= NRF_POWER->RESETREAS;
Hello @beegee,
have one more problem in this topic, thought I have just failure in base board/module, so ordered all types of base you offer and also new RAK4631, the result is the same.
So the issue is: module doesn’t restart when I press reset button, same when I just short RESET pin to GND. When I keep pressed reset button program just run normally.
I build my app on the top of DeepSleep LoraWan.
Hello @zolax
Both the reset button and the reset pin on the RAK19001 are hardware wired to the reset pin of the nRF52 MCU. Your problem sounds very strange to me and I have no explanation for it. It is not possible to disable a reset by software.
I have many RAK4631 and all kinds of Base Boards here and I never experienced what you are describing here.
The reset button is sometimes difficult to push, specially if you have thick fingers like me, but connecting the RESET pin to GND should always work.
I didn’t use the deepsleep example for a long time, just for testing, can you try one of our other examples.
Hi @beegee ,
thanks for the answer. Now I upload Read_Battery_Level, the same - it just doesn’t give a sh*t and doesn’t reset ;). I used now RAK4631 RUI but I program the firmware using nrf52840-DK.
In couple days I will recive my custom board for RAK4630 so will be able to test one more module.