Friday 14 October 2016

Interrupt handling on SPI

The way in which data was being sent from BlueNRG was not as expected. So we suspected that may be we need to jump into interrupts in order to get the data. Our thinking was that when BlueNRG had some data to send it will give an interrupt. We weren't quite sure as the writing in the documents was not clear to me (my mentor had not studied it). So I set up this whole routine in my code that would deal with interrupts and handle them aptly.
The results were ample to say the least. BlueNRG was giving many interrupts which could mean that either it was ready to send data and was notifying aggressively or that something was off in the hardware connections. I stayed optimistic and debugged the whole situation so that at the end of the day I could present it to my mentor and she could then give some insight as to why the behavior is as it is. As it turns out it was a problem in the hardware connection that was sending so many interrupts. I came to realize that when I tried the code without connecting the interrupt line and the interrupts would still show.

No comments:

Post a Comment