Timeline for ISR halts in DUE
Current License: CC BY-SA 3.0
12 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Sep 22, 2016 at 10:06 | vote | accept | Makan | ||
Sep 22, 2016 at 10:06 | answer | added | Makan | timeline score: 0 | |
Sep 22, 2016 at 10:01 | comment | added | Makan | as @EdgarBonet and Gerben pointed out, It is not possible to have very long ISRs in the DUE. For the MEGA however, an infinite loop including anything, will be executed with no problem. that is why the infinite loop ran a good time in the MEGA. I will post this as the answer | |
Sep 22, 2016 at 9:54 | comment | added | Makan | thanks @Jesse but that link was a totally different issue. That was a Pin mismatch. | |
Sep 19, 2016 at 11:37 | comment | added | Makan | @EdgarBonet Initially I had extra delays in the loop, So I never reached a thousand output characters. That is why I did not notice this in the beginning. | |
Sep 19, 2016 at 11:35 | comment | added | Makan | @EdgarBonet I guessed that it might have been cast to 'long' automatically. But apparently that is not what happens. In any case you are right and this is an infinite loop. | |
Sep 19, 2016 at 10:38 | comment | added | Edgar Bonet |
I don't understand your comment. Could you be more explicit? I just compiled aMillion() for AVR and got "warning: comparison is always true due to limited range of data type". And gcc optimized out the test i < 1000000 . The generated assembly is just an infinite loop.
|
|
Sep 19, 2016 at 9:46 | comment | added | Makan | @EdgarBonet haha yea, but an automatic cast during the comparison would make the loop run forever. wouldn't it? That's what I saw with MEGA | |
Sep 16, 2016 at 15:55 | comment | added | Edgar Bonet |
I am surprised this could ever work on the Mega. The test i < 1000000 is always true due to the limited range of int type. And you get undefined behavior when i overflows.
|
|
Sep 16, 2016 at 15:52 | comment | added | Gerben | Doing a lot of stuff inside the ISR isn't advised. Especially if you are doing serial communication. What happens if you do just a single serial.print? | |
Sep 16, 2016 at 15:34 | comment | added | Jesse | Just a thought, check arduino.stackexchange.com/questions/23006/… | |
Sep 16, 2016 at 13:51 | history | asked | Makan | CC BY-SA 3.0 |