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,

    I did everything you said to and instead of returning an error code the program ran until the desired flash region, 0x3f000 - 0x57000, was full! It even continued to run after this and I was able to confirm this with multiple tests.

    Could adding debug to the pre-processor definitions have fixed the bug? Even if not thank you so much for all the help I really appreciate your time! I can change what I have marked as the answer if you think adding debug to the definitions was the solution.

    Thanks,

    Jack

  • Hi Jack

    This seemed very strange at first, so I conferred with my colleagues, and yes, setting the DEBUG macro did fix it. This is probably because the memory layout in what you had before, did not have these pages free for some reason. There might be a module or something that you haven't seen taking up space in these pages of flash. 

    Seeing as releasing a product that runs with the DEBUG macro will be considerably more hungry, I suggest you go back and try to find out what exactly is taking up the space in flash in the first place, I don't have any clue what it can be though. If current consumption is not an issue for you, and you just need it to work like this, it works!

    Best regards,

    Simon

  • Hi Simon,

    Perfect I'm glad to finally know the reason behind the issues I've been having! I will look into what is taking up flash space as current consumption is relatively important if I get time. 

    Thanks for all the help,

    Jack

Related