-
Is it possible to add LIS2DH12TR library for legacy support? |
Beta Was this translation helpful? Give feedback.
Replies: 7 comments
-
ok thanks. |
Beta Was this translation helpful? Give feedback.
-
also, side question (but fully related) does the SPI implementation uses DMA? It seems required to reach the max ODR of 5.3KHz on LIS2DH12, at least that is how i did it on SW4STM32 with the HAL at the time. |
Beta Was this translation helpful? Give feedback.
-
Hi @0x0fe , |
Beta Was this translation helpful? Give feedback.
-
@cparata yes i checked and notice none of the core drivers were implemented with DMA, anyway it turned out it was not required to read the datas at max ODR and so i used the standard polling SPI api. |
Beta Was this translation helpful? Give feedback.
-
Hello @0x0fe , |
Beta Was this translation helpful? Give feedback.
-
@cparata thank you for confirming this, that will be convenient to perform acquisitions during the DSP time, and reduce the interrupts rate by a factor of 16. |
Beta Was this translation helpful? Give feedback.
Hi @0x0fe ,
currently, the Arduino library to support the LIS2DH12 is not planned. Any contribution from the community will be appreciated. All the Arduino MEMS libraries are based on SPI calls in polling mode. This is because all the APIs are implemented in synchronous mode. The usage of DMA would require an abstraction layer for DMA stuff (to have the compatibility with all STM32 families) that at the moment, as I know, is not present in Arduino and also the adoption of APIs in asynchronous mode that is out of the scope of the Arduino MEMS libraries. For your use case, probably the best thing is to use the FIFO, that allow to store data without losses.
Best Regards,
Carlo