Hi,
I made a temperature logging device using nRF52832 (SDK 12.3.0). The temperature sensor is read over I2C every 5 minutes and data is sent over radio communication. There is also battery voltage reading on 12 hours. The software is rather simple. Here is a very simplified code:
while(1) {
__SEV();
__WFE();
__WFE();
if(temperature_reading time){
//read temperature sensor
nrf_drv_twi_rx(...
}
if(voltage_reading_time){
//read voltage;
nrf_drv_saadc_sample_convert(NRF_SAADC_INPUT_VDD, &adc_buf);
}
if(send_data_time){
//Radio send data;
}
}
The problem I have is that the device is rebooting once in a while. For example if I turn on 50 of these devices a few will reboot in the period of one day (every day different one will reboot). This reboot is random in general, but as far as I managed to debug it, it is always rebooting after sensor is read and data is sent. It seems like it reboots once it reach __SEV(); __WFE(); __WFE(); sequence, but as I wrote not always but once in a while.
reset_reason = NRF_POWER->RESETREAS; after reset gives value zero (0). I triple checked the battery contact and possible hardware related issues and that is not the reason. If it is hardware it wouldn't reboot in n*5 minutes interval (after reading and sending data).
I am trying to solve this issue for over the two months now. Any help or hint would be appreciated very much.