2021-06-21 08:44 AM
Super weird thing happening:
After my latest build I would receive one interrupt from I2C and that's all.
After a bit of snooping around I found that the I2C interrupt was being disabled in the NVIC.
So I installed some code that would detect when this happened and break.
I have to figure out who's disabling the interrupt, so I thought I'd put some counters
in the I2C interrupt routine, just a simple in and out count. Both uint8's.
Now, it won't do it. No matter what I try I2C interrupts now work fine.
Is there something with the interrupt alignment? Any ideas?
No, that don't make sense either. The interrupt is vectored to the stm32l0xx_it.c module
and that didn't change. My guess is I have a rogue pointer writing to the NVIC.
Anybody have a suggestion on how to find it?
Solved! Go to Solution.
2021-06-21 12:55 PM
Found It!
The host I2C device is sending requests to the my micro every 1 second. When I connected my utility and started sending I2C commands, they would occasionally
collide and create an invalid message.
The default I2C error handler disables the I2C interrupts.
:ant: :backhand_index_pointing_left:
2021-06-21 12:55 PM
Found It!
The host I2C device is sending requests to the my micro every 1 second. When I connected my utility and started sending I2C commands, they would occasionally
collide and create an invalid message.
The default I2C error handler disables the I2C interrupts.
:ant: :backhand_index_pointing_left: