EXT behaviour before driver is enabled

ChibiOS public support forum for topics related to the STMicroelectronics STM32 family of micro-controllers.

Moderator: RoccoMarco

Post Reply
dflogeras
Posts: 232
Joined: Tue Sep 03, 2013 8:16 pm
Has thanked: 8 times
Been thanked: 22 times

EXT behaviour before driver is enabled

Post by dflogeras »

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
User avatar
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

Post by Giovanni »

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
Post Reply