Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
  1. Home
  2. My Project
  3. NRF5 Hardware module crash after while

NRF5 Hardware module crash after while

Scheduled Pinned Locked Moved My Project
16 Posts 4 Posters 154 Views 4 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • E Offline
    E Offline
    evb
    wrote on last edited by
    #2

    @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?

    D 1 Reply Last reply
    0
    • N Offline
      N Offline
      ncollins
      wrote on last edited by
      #3

      @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.

      W D 2 Replies Last reply
      0
      • N ncollins

        @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.

        W Offline
        W Offline
        waspie
        wrote on last edited by waspie
        #4

        @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.

        8a34ba1c-f51f-4806-95d1-349e382491df-image.png

        D 1 Reply Last reply
        0
        • W waspie

          @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.

          8a34ba1c-f51f-4806-95d1-349e382491df-image.png

          D Offline
          D Offline
          Didou
          wrote on last edited by
          #5

          @waspie @ncollins Thanks for feedback, when trying the fix are you taking the full github dev or only the proposed fix for this issue ? To manage the deadloack are you using the watchdog ?

          N D 2 Replies Last reply
          0
          • N ncollins

            @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.

            D Offline
            D Offline
            Didou
            wrote on last edited by
            #6

            @ncollins Will try that just have to understand how to just add the fix to the latest stable release

            1 Reply Last reply
            0
            • E evb

              @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?

              D Offline
              D Offline
              Didou
              wrote on last edited by
              #7

              @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 !

              E 1 Reply Last reply
              0
              • D Didou

                @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 !

                E Offline
                E Offline
                evb
                wrote on last edited by
                #8

                @Didou let's then keep our fingers crossed that it's just a software problem :-)

                1 Reply Last reply
                0
                • W Offline
                  W Offline
                  waspie
                  wrote on last edited by
                  #9

                  @Didou @evb
                  I download the dev version AND replaced the two files with the ones from the proposed fix.

                  I think that's the right path - it seems to be showing positive results.

                  1 Reply Last reply
                  0
                  • D Didou

                    @waspie @ncollins Thanks for feedback, when trying the fix are you taking the full github dev or only the proposed fix for this issue ? To manage the deadloack are you using the watchdog ?

                    N Offline
                    N Offline
                    ncollins
                    wrote on last edited by
                    #10

                    @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.

                    D 1 Reply Last reply
                    0
                    • N ncollins

                      @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.

                      D Offline
                      D Offline
                      Didou
                      wrote on last edited by
                      #11

                      @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

                      N 1 Reply Last reply
                      0
                      • D Didou

                        @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

                        N Offline
                        N Offline
                        ncollins
                        wrote on last edited by
                        #12

                        @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) {}
                          }
                        }
                        
                        D 1 Reply Last reply
                        0
                        • N ncollins

                          @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) {}
                            }
                          }
                          
                          D Offline
                          D Offline
                          Didou
                          wrote on last edited by
                          #13

                          @ncollins I'm using NRF52832 Ebyte modules

                          1 Reply Last reply
                          1
                          • D Didou

                            @waspie @ncollins Thanks for feedback, when trying the fix are you taking the full github dev or only the proposed fix for this issue ? To manage the deadloack are you using the watchdog ?

                            D Offline
                            D Offline
                            Didou
                            wrote on last edited by
                            #14

                            @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

                            1 Reply Last reply
                            1
                            • W Offline
                              W Offline
                              waspie
                              wrote on last edited by
                              #15
                              This post is deleted!
                              1 Reply Last reply
                              0
                              • W Offline
                                W Offline
                                waspie
                                wrote on last edited by
                                #16

                                @ncollins

                                Are you currently working with any NRF5x? Do you have a working motion/contact sketch for the NRF52?

                                1 Reply Last reply
                                0
                                Reply
                                • Reply as topic
                                Log in to reply
                                • Oldest to Newest
                                • Newest to Oldest
                                • Most Votes


                                31

                                Online

                                11.7k

                                Users

                                11.2k

                                Topics

                                113.1k

                                Posts


                                Copyright 2025 TBD   |   Forum Guidelines   |   Privacy Policy   |   Terms of Service
                                • Login

                                • Don't have an account? Register

                                • Login or register to search.
                                • First post
                                  Last post
                                0
                                • MySensors
                                • OpenHardware.io
                                • Categories
                                • Recent
                                • Tags
                                • Popular