Hi,
On a STM32L1 device, I am interfacing with an acceleration sensor via I2C. The device tells me when it has data ready via an IRQ pin that I have connected to PA2, and installed a suitable EXT callback to get the interrupts and set a semaphore.
I am noticing some strange behaviour that I can't explain yet. Before I enable the EXT driver for PA2, I reset the acceleration sensor and set up its registers. During the reset time, I can see there is a glitch on the IRQ pin, but note that the EXT driver is not enabled yet.
After the sensor is set up, I enable the EXT driver, and immediately get called back, but there has not been an interrupt asserted on PA2 since I enabled the EXT driver. Does the EXT unit buffer these events? Is there a way for me to clear them via software, or do I need to manage this another way?
Thanks
Dave
EXT behaviour before driver is enabled
Moderator: RoccoMarco
- Giovanni
- Site Admin
- Posts: 14892
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 996 times
Re: EXT behaviour before driver is enabled
Hi,
You may try to write all ones in EXTI->PR before enabling the channel.
I am not sure if enforcing that into the driver.
Giovanni
You may try to write all ones in EXTI->PR before enabling the channel.
I am not sure if enforcing that into the driver.
Giovanni