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

RTC1_IRQHandler(); Error

Hi all,

I am debugging a program after compiling with no errors using the SDK 15.2.0 on a windows laptop and nRF52840 board. The program was designed to save 8 bytes of data to flash every 50ms for 3 days using fstorage. There should be enough storage on this particular board to allow for this, however I have not had a successful 3 day run yet. The latest bug in the code occurred at "void RTC1_IRQHandler();" in the call stack and about 90 minutes in with an error value of what looks to be 0x00026FC4, which doesn't make sense, at least not to me. I understand this has something to do with the timers, which I use to call the fstorage functions every 50ms. However, as a beginner programmer, I am unable to assess any issues at a lower level. Could someone give some suggestions as to what may be causing this issue?

Thanks,

Jack

  • Hi Simon,

    Yes, the three times I ran the test I observed the same error and believe that the 2 means its on that page but am not 100% sure. I'm not sure at what address the 3rd page starts at, but the error occurred at the location 0x42fc4 and took 19130 seconds  in the second 2 tests (the first one didn't probably due to the different saving frequency). Additionally I ran the test again, this time starting the memory address at 0x42fc4 and the test was able to run for a while but also eventually crashed. Unfortunately I wasn't there when this test encountered the error and didn't record the last location the flash was written to or how long it ran for. I am currently running another test to reproduce the error in a hope to give you more detail. If you think it would be helpful to recreate the error with the flash location starting at 0x42fc4 I will run that test as well and be sure to record the crash details this time!  

    Thanks,

    Jack

  • Hi Jack

    A shot in the dark, but can you check out the Access Control Lists peripheral (Chapter 6.3 - ACL, in the nRF52840 product specification) to see that you have permission to do the actions you are doing?

    If this doesn't help, or you've already tried it, I think recreating the error and getting the crash details would be helpful.

    Best regards,

    Simon

  • Hi Jack

    A shot in the dark, but can you check out the Access Control Lists peripheral (Chapter 6.3 - ACL, in the nRF52840 product specification) to see that you have permission to do the actions you are doing?

    If this doesn't help, or you've already tried it, I think recreating the error and getting the crash details would be helpful.

    Best regards,

    Simon

  • Hi Simon,

    I looked into ACL as you suggested but could not find information on the correct syntax or placement of any text to configure the ACL. Do you know how to do this by chance? I agree that the errors described to be generated from an ACL issue are similar to the errors I've been observing and would like to test to see if this is the source of the error. 

    I was able to recreate the crash again and recorded the following details:

    last programmed flash address: 0x46B08

    Error code: 0x00002006 (correction: i believe this means error 6 on page 20, no page 2)

    Last Call Stack: RTC1_IRQHandler();

    I am a little confused by these results. First, the last programmed flash address was 0x46B08 instead of 0x42fc4 which was recorded in the last test. I also looked into the flash storage initialization and the flash is erased from 0x3f000 to 0x57000 when initialized which should leave plenty of room for the data I am trying to store. The error code also suggests that the error occurred on page 20, which would mean that the program didn't have any issues switching fstorage pages. Is there a chance the error is related to the timer(s) and not fstorage?

    Thank you, I really appreciate the time you've put into my issue,

    Jack

  • Hi Jack

    Have you looked at the infocenter page for ACL, it should describe most ACL functions. Also this case has an example of implementing the ACL.

    Page 20 makes more sense to me as well when thinking about how long the application is running before crashing. Did it run for 12 or so hours this time as well? Do you know how much of the flash your application and SoftDevice uses, this is also a factor, as you won't have the entire 1MB free to write on. You can check this by reading your device with the programmer app in nRFConnect for desktop. 

    Also this could be a timer issue as you say, but that would cause it to crash at the same exact time after start every time, which I'm not sure it does.

    Best regards,

    Simon

Related