This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

nrf5340 NET CPU RTC0,RTC1 stop to work

Hello, with the new version of the nrf5340 version D in the NET CPU RTC0 stops to work and the RTC0 IRQ is not called 

now for example the counter is stopped at 87 and the compare0 is 147  

the LFCLK results RUNNING

With the previous CHIP version B this was not happening. 

I checked the same problem in different boards

How to solve?  I have the project stopped like the RTC0

Emag

Parents
  • I was not able to reproduce this. I used the sample ncs/zephyr/samples/drivers/counter/alarm in NCS v1.5.1 with the board nrf5340dk_nrf5340_cpunet. I added the file nrf5230dk_nrf5340_cpunet.overlay with the following content:

    &rtc0 {
        prescaler = < 0x1 >;
        clock-frequency = < 0x8000 >;
    };

    It worked as expected, and I got the following output:

      ▒*** Booting Zephyr OS build v2.4.99-ncs2  ***
    Counter alarm sample
    
    Set alarm in 2 sec (65536 ticks)
    !!! Alarm !!!
    Now: 2
    Set alarm in 4 sec (131072 ticks)
    !!! Alarm !!!
    Now: 6
    Set alarm in 8 sec (262144 ticks)
    !!! Alarm !!!
    Now: 14
    Set alarm in 16 sec (524288 ticks)
    !!! Alarm !!!
    Now: 30
    Set alarm in 32 sec (1048576 ticks)
    !!! Alarm !!!
    Now: 62
    Set alarm in 64 sec (2097152 ticks)
    !!! Alarm !!!
    Now: 126
    Set alarm in 128 sec (4194304 ticks)
    !!! Alarm !!!
    Now: 254
    Set alarm in 256 sec (8388608 ticks)
    !!! Alarm !!!
    

    Could you test the same and see if it works for you?

    Best regards,

    Simon

Reply
  • I was not able to reproduce this. I used the sample ncs/zephyr/samples/drivers/counter/alarm in NCS v1.5.1 with the board nrf5340dk_nrf5340_cpunet. I added the file nrf5230dk_nrf5340_cpunet.overlay with the following content:

    &rtc0 {
        prescaler = < 0x1 >;
        clock-frequency = < 0x8000 >;
    };

    It worked as expected, and I got the following output:

      ▒*** Booting Zephyr OS build v2.4.99-ncs2  ***
    Counter alarm sample
    
    Set alarm in 2 sec (65536 ticks)
    !!! Alarm !!!
    Now: 2
    Set alarm in 4 sec (131072 ticks)
    !!! Alarm !!!
    Now: 6
    Set alarm in 8 sec (262144 ticks)
    !!! Alarm !!!
    Now: 14
    Set alarm in 16 sec (524288 ticks)
    !!! Alarm !!!
    Now: 30
    Set alarm in 32 sec (1048576 ticks)
    !!! Alarm !!!
    Now: 62
    Set alarm in 64 sec (2097152 ticks)
    !!! Alarm !!!
    Now: 126
    Set alarm in 128 sec (4194304 ticks)
    !!! Alarm !!!
    Now: 254
    Set alarm in 256 sec (8388608 ticks)
    !!! Alarm !!!
    

    Could you test the same and see if it works for you?

    Best regards,

    Simon

Children
Related