Skip to main content
mreed
Associate III
June 21, 2021
Solved

Is there any alignment restriction on interrupt vectors?

  • June 21, 2021
  • 1 reply
  • 661 views

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?

This topic has been closed for replies.
Best answer by mreed

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:

1 reply

mreed
mreedAuthorBest answer
Associate III
June 21, 2021

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: