NRF5 Hardware module crash after while
-
@Didou There is currently a bug in the NRF5 transport layer that causes them to lock up. It seems more likely to happen when the connection between the gateway/repeater is weak or too far.
You can read more about it here: https://forum.mysensors.org/post/108301.
My understanding there is a fix pending review and @waspie has been testing it with some NRF51822 modules.
-
@Didou There is currently a bug in the NRF5 transport layer that causes them to lock up. It seems more likely to happen when the connection between the gateway/repeater is weak or too far.
You can read more about it here: https://forum.mysensors.org/post/108301.
My understanding there is a fix pending review and @waspie has been testing it with some NRF51822 modules.
@ncollins
Seems to be working well on NRF51, not so much on NRF52. I backed off the changes for NRF52 modules and they're working ok with latest alpha. I think I need a better sketch for them...Anyway, NRF51822 is doing much much better.
@Didou follow the links posted by @ncollins
The first big dip on 11/29 was a deadlock. I tried some change after that that still didn't work and lead to another deadlock on 12/7. Using the fix from github you can see how much more stable battery reporting has been since 12/9 (small spike when it was plugged in for programming) when i flashed it using the fixed code. This one might finally be fixed.

-
@ncollins
Seems to be working well on NRF51, not so much on NRF52. I backed off the changes for NRF52 modules and they're working ok with latest alpha. I think I need a better sketch for them...Anyway, NRF51822 is doing much much better.
@Didou follow the links posted by @ncollins
The first big dip on 11/29 was a deadlock. I tried some change after that that still didn't work and lead to another deadlock on 12/7. Using the fix from github you can see how much more stable battery reporting has been since 12/9 (small spike when it was plugged in for programming) when i flashed it using the fixed code. This one might finally be fixed.

-
@Didou There is currently a bug in the NRF5 transport layer that causes them to lock up. It seems more likely to happen when the connection between the gateway/repeater is weak or too far.
You can read more about it here: https://forum.mysensors.org/post/108301.
My understanding there is a fix pending review and @waspie has been testing it with some NRF51822 modules.
-
@Didou, if I understand it well, you have a few NRF modules build.
Each module consist of one NRF5 board, relais, pilot connections for heating control and powered by a onboard 220V AC convertor module. All this packed together in a 2 DIN unit module inside your house power panel = electrical cabinet of your house?If my understanding is correct, the first thing I think of, is electrical influence of the high AC voltages inside your electrical cabinet. Don't know where you live, but are we speaking of 220/250V or 380V?
Low voltage applications powered by 5V or 3.3V do not like noisy environments like a electrical cabinet.How long are the pilot wires to your heaters? Long wires act as antennas...
Did you try to operate them outside your electrical cabinet on a test basis?@evb You do undertstand it very well, it was also my first understanding and to avoid any issue relating to EMC I did also tried outside the cabinet, not using my own power supply adding extra capacitors and lately power up the CPU module with the NFC on batteries .... In all cases the crash issue is still there !
I was pretty surprises as there is quiet a lot of different modules been built on openhardwareio and I have seen no report about this issue, so i was conviced the issue was mine !
-
@evb You do undertstand it very well, it was also my first understanding and to avoid any issue relating to EMC I did also tried outside the cabinet, not using my own power supply adding extra capacitors and lately power up the CPU module with the NFC on batteries .... In all cases the crash issue is still there !
I was pretty surprises as there is quiet a lot of different modules been built on openhardwareio and I have seen no report about this issue, so i was conviced the issue was mine !
-
-
@Didou for my testing, I pulled the entire branch referenced in the merge request. I believe that is MySensors-development + nrf_esb_redesign changes. But you're probably safe to just replace the two files touched in the commits.
@ncollins OK thanks, I did try that pulling diretly from github, so branch + files (Alpha-1)
I did upgrade 3 modules and keep many others with previous to have a comparison basis
Let's cross fingers :)
It is about 12 hours for now, none of the updated one did crash and one for the unpatched did crash. I need to wait at lest 24 to 36 hours to confirm
-
@ncollins OK thanks, I did try that pulling diretly from github, so branch + files (Alpha-1)
I did upgrade 3 modules and keep many others with previous to have a comparison basis
Let's cross fingers :)
It is about 12 hours for now, none of the updated one did crash and one for the unpatched did crash. I need to wait at lest 24 to 36 hours to confirm
@Didou Which NRF5 module are you using exactly?
I also believe this code from your sketch is unnecessary, given MySensors handles most of it:
void nRF_Init() { NRF_POWER->DCDCEN = 0; // Not reducing the radio current NRF_PWM0 ->ENABLE = 0; NRF_PWM1 ->ENABLE = 0; NRF_PWM2 ->ENABLE = 0; NRF_TWIM1 ->ENABLE = 0; NRF_TWIS1 ->ENABLE = 0; //NRF_RADIO->TXPOWER = 8; } void disableNfc() { NRF_NFCT->TASKS_DISABLE = 1; NRF_NVMC->CONFIG = 1; NRF_UICR->NFCPINS = 0; NRF_NVMC->CONFIG = 0; } void turnOffAdc() { if (NRF_SAADC->ENABLE) { NRF_SAADC->TASKS_STOP = 1; while (NRF_SAADC->EVENTS_STOPPED) {} NRF_SAADC->ENABLE = 0; while (NRF_SAADC->ENABLE) {} } } -
@Didou Which NRF5 module are you using exactly?
I also believe this code from your sketch is unnecessary, given MySensors handles most of it:
void nRF_Init() { NRF_POWER->DCDCEN = 0; // Not reducing the radio current NRF_PWM0 ->ENABLE = 0; NRF_PWM1 ->ENABLE = 0; NRF_PWM2 ->ENABLE = 0; NRF_TWIM1 ->ENABLE = 0; NRF_TWIS1 ->ENABLE = 0; //NRF_RADIO->TXPOWER = 8; } void disableNfc() { NRF_NFCT->TASKS_DISABLE = 1; NRF_NVMC->CONFIG = 1; NRF_UICR->NFCPINS = 0; NRF_NVMC->CONFIG = 0; } void turnOffAdc() { if (NRF_SAADC->ENABLE) { NRF_SAADC->TASKS_STOP = 1; while (NRF_SAADC->EVENTS_STOPPED) {} NRF_SAADC->ENABLE = 0; while (NRF_SAADC->ENABLE) {} } } -
@Didou After a few days of test of your NRF fix, I can say there is a huge improuvement either for USB, AC supply or battery powered nodes, they just do not failed ! this is great. thanks for your efforts improving the mysensor code
It's a while since the mysensor master has been updated, any ideas when it's goanna happend, it will also be good for others to benefits