logo elektroda
logo elektroda
X
logo elektroda

[Solved] [esp-idf] i2c core panic. Load prohibited. Exception was unhandled

NIXIE_123 405 4
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
  • #1 19468202
    NIXIE_123
    Level 34  
    Hi

    I am reading the time every second from ds3231 over i2c.
    I have added a time setting which increments or decrements the time read every second with each key click and plays it to the ds3231 over i2c.
    Setting hours and minutes works. Setting seconds also works but very often the processor panics:
    [esp-idf] i2c core panic. Load prohibited. Exception was unhandled .

    Reading out the time every second in a shuffle with stack size=2048:
    Code: C / C++
    Log in, to see the code
    .

    Setting time (recall hours and minutes work) in main:
    Code: C / C++
    Log in, to see the code
    .
  • ADVERTISEMENT
  • Helpful post
    #2 19468891
    mpier
    Level 29  
    Hello,
    I haven't used esp-idf, are you sure you can operate on "cmd" after calling "i2c_cmd_link_delete(cmd)"?
    The whole time setting thing isn't kind of weird in this code? Maybe it would be easier to get the current time (not necessarily via i2c), modify it arbitrarily and send it to the external rtc at the end? Is this esp so unstable that you have to check the time every second?
  • ADVERTISEMENT
  • #3 19468901
    NIXIE_123
    Level 34  
    Code: C / C++
    Log in, to see the code
    .

    Quote:
    This CPU exception happens when application attempts to read from or write to an invalid memory location. The address which was written/read is found in EXCVADDR register in the register dump. If this address is zero, it usually means that application attempted to dereference a NULL pointer. If this address is close to zero, it usually means that application attempted to access member of a structure, but the pointer to the structure was NULL. If this address is something else (garbage value, not in 0x3fxxxxxx - 0x6xxxxxxx range), it likely means that the pointer used to access the data was either not initialized or was corrupted.
    .
    [esp-idf] i2c core panic. Load prohibited. Exception was unhandled .
  • ADVERTISEMENT
  • #4 19468921
    mpier
    Level 29  
    As I wrote. The eighth line of your first code.
  • #5 19468938
    NIXIE_123
    Level 34  
    Thanks a lot. Bohemian error removed, works
    Code: C / C++
    Log in, to see the code
ADVERTISEMENT