Hi,
Normally diabling or not it should be no problem if interrupt handlers are much faster than interrupts occur.
If you disable you could miss an inteerupt but do not have re-entrancy problems.
I do not use the serial interrupt but use good old polling in the main loop. Other interrupts I do not disable either (just looked at my code).
As for the C compiler not flagging the overrun, it's run-time When it happens and not compile time. The compiler cannot know you type a string so long it does not fit.
You could however try to run good old c-lint on it and see it's complaints.
Again C does not do much run-time checking to keep it fast (this in contrast to some other languages). Personally I prefere both a complaining compiler and run-time checks.
But mBed already left out C++ Exceptions so I guess the rest is gone too.
Hey everyone.
I am having a strange error that I found a work-a-round to get by but its puzzling me and maybe I'm missing something.
I declare a structure before the main() in my mbed project as shown below.
Then in the main() section before the while(1){} I declare their values as shown below.
Then in an SPI interupt I use the values Coeff.A, Coeff.B, Coeff.C and it works fine until I get a serial RX interrupt and then it somehow changed the values of my Coeff.A, Coeff.B, Coeff.C and the results from the calculation in the SPI function is wrong based on the changed values.
If I put the following code IN my SPI interrupt routine then everything works as should and values are always correct even after serial Rx interrups.