AVR_IOT sequans controller rebooting on pinconfigure and attachinterrupt #8
-
I've got an AVR-IOT board and installed a root CA (for Let's Encrypt) and provisioned it for access to my personal server, I had it making HTTPS GET and POST requests as well as secured MQTT posts. Everything worked great for several weeks then suddenly stopped. I think it was after I accidentally hit Update on the Arduino IDE update libraries and boards nag (what was I thinking?). I've tried rolling back to the previous version of the AVR-IOT library and the DxCore library but still get the same failure. I've deleted all my cached libraries and even added log statements in the .cpp files and/or comment things to double check that I wasn't getting cached libraries. Running the basic http_get_time example, compiled from the IDE I get a failure and the board resets repeatedly. But if I take the exact same code from the INO file that I compile locally and paste it instead into the Live Editor on this page: https://iot.microchip.com/docs/arduino/userguide/led The code fails in sequans_controller.cpp in the function SequansControllerClass::begin. When it tries to do pin config on the CTS_PIN the board resets itself:
I logged the pin value to ensure that it's the correct pin, 18 and also logged the the other values in the OR statement, they all match up with those that I get when compiling from the Live Editor.
I've tried digging into the core library to see if I can figure out what's going there in __pinconfigure but that's leads to a mess of stuff that I'd need to track down and frankly I don't think that's the problem as I don't see any changes to that code over the past few revisions that looks like it might break things. I don't know the next best approach for debugging this issue, anyone have a suggestion? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hello @SeanCairns, There is a bug in DxCore version 1.5 -> 1.5.3 where the PORTC interrupt handler is not defined, leading to a reset with the new interrupt system introduced in DxCore 1.5. The patch for this has been merged (SpenceKonde/DxCore#388), but is not released yet. In order to alleviate this with the newest version of DxCore, go to the Arduino IDE and chooose: Regarding the live editor. It does not use the newest version of DxCore yet due to this fact, so that's why it works. |
Beta Was this translation helpful? Give feedback.
Hello @SeanCairns,
There is a bug in DxCore version 1.5 -> 1.5.3 where the PORTC interrupt handler is not defined, leading to a reset with the new interrupt system introduced in DxCore 1.5. The patch for this has been merged (SpenceKonde/DxCore#388), but is not released yet. In order to alleviate this with the newest version of DxCore, go to the Arduino IDE and chooose:
Tools
->attachInterrupt() Version
->Old version
.Regarding the live editor. It does not use the newest version of DxCore yet due to this fact, so that's why it works.