cancel
Showing results for 
Search instead for 
Did you mean: 

what is the best way to read LSM6DSM timestamp at the point of tap interrupt . accelerometer running at 1.6khz. tried reading it with in ISR of tap interrupt and it is casuing CSTACK full. I'm using stm32l476 MCU .

kasi viswanadh
Associate II

STM32L476

LSM6DSM

EXTERNAL INTERRUPT

ACCELEROMETER TIMESTAMP

2 REPLIES 2
Eleon BORLINI
ST Employee

Hi kasi, could you please share the data log of your system? Which is the content of the TIMESTAMPx_REG you are reading? And are you reading it on 24 bit? You could try to reduce the ODR frequency to check if the CSTACK full occours at the same time. Regards

HI Eleon BORLINI I found the isse. I setup a timer interrupt for 10ms and reading data from accelrometer fifo every 10ms . and I created an isr for tap interrupt to read timestamp of accelerometer. if interrupt comes when mcu performing accelerometer fifo read operation, Again there is an spi operation written in the ISR but previous SPI operation is in the middle. so its casuing System to hang and the stack over flow is happening because , MCU running MOTION_FX code at that moment.

Thank you