7 years, 11 months ago.

Interruptions and ISR

Hello Related to my previous question https://developer.mbed.org/questions/69022/program-dying-in-a-while-loop/#answer10297

I am suspecting that perhaps the program abandons the while loop when an interruption occurs (perhaps never returning).

Now, I have worked with other micros and systems (for example PICs) and there are many different causes of interrupts. In the STM32 although I havent used them I think there are several too (cause I saw a list of them once, these include SPI interrupts etc)

Now, reading the mbed Handbook I can see only a general input interrupt "InterruptIn" and perhaps (although have never used) the CAN interrupt where you attach a ISR to it. Oh! and the timer interrupt with their variants the ticker etc.

And is that it??? SPI does not generate interrupts?

I am trying to find where did my PC(program counter) went when it left the while loop

Thanks

Worth pointing out you are using the CC3000 library. Also the library has an InterruptIn pin coded into it and if I read it correctly the interrupt handler has a "while(1);" infinite loop built in.

posted by Oliver Broad 20 May 2016

1 Answer

7 years, 11 months ago.

Oh there are a whole bunch of other interrupts, but the basic mbed APIs don't use all of them. In addition you also have for example the UART interrupt, but also SPI has indeed an interrupt on a hardware level. But the mbed API simply blocks until it is done (there is an async mbed API for SPI that uses interrupts, but only one vendor supports it due to the way mbed decided to implement that).

By default there should be (almost) no interrupts enabled. Maybe the non-maskable interrupt.