chEvtWaitAny triggering when I haven't sent it anything
Posted: Sat Apr 18, 2015 6:29 am
I am writing a driver for an IC that pulls a line low to signal that it has data that needs to be read.
I have my code set up to interrupt when that line is pulled low which sends a signal via chEvtSignalI to a thread that has a chEvtWaitAny followed by the spi commands to read from the IC.
For whatever reason it seems that chEvtWaitAny is getting a signal even though the interrupt should not have triggered and I don't send an event anywhere else in my code.
The interrupt and thread that do this are here: https://github.com/reportingsjr/rfidBoa ... ver.c#L231
I have attached a screen capture of my logic analyzer showing what is going on at the hardware level.
Channel 5 is the line that gets pulled low and triggers the interrupt. The large grey areas on the SPI clock are where cr95hfMessageThread is trying to read from the IC. You can see that the first three are directly after channel 5 is pulled low and the interrupt triggers. On the fourth read there is no interrupt being triggered. Could chEvtWaitAny be getting a signal from somewhere else somehow?
Thanks for the help! I've been stuck on this one for two weeks now!
I have my code set up to interrupt when that line is pulled low which sends a signal via chEvtSignalI to a thread that has a chEvtWaitAny followed by the spi commands to read from the IC.
For whatever reason it seems that chEvtWaitAny is getting a signal even though the interrupt should not have triggered and I don't send an event anywhere else in my code.
The interrupt and thread that do this are here: https://github.com/reportingsjr/rfidBoa ... ver.c#L231
I have attached a screen capture of my logic analyzer showing what is going on at the hardware level.
Channel 5 is the line that gets pulled low and triggers the interrupt. The large grey areas on the SPI clock are where cr95hfMessageThread is trying to read from the IC. You can see that the first three are directly after channel 5 is pulled low and the interrupt triggers. On the fourth read there is no interrupt being triggered. Could chEvtWaitAny be getting a signal from somewhere else somehow?
Thanks for the help! I've been stuck on this one for two weeks now!