2024-12-01 03:35 AM
Hi all,
I am working on the STEVAL-PROTEUS1 Board, which features the STM32WB5MMG module and the IIS3DWB high bandwidth accelerometer sensor interfaced via SPI_1.
According to the IIS3DWB sensor datasheet, it supports up to 10MHz (CLK) and an ODR of 26667Hz (37 microseconds).
My objective is to collect sensor data at an ODR of 26667Hz.
Here are the steps I've taken so far:
Could anyone help me understand if the HAL function is supposed to take 42 microseconds, or if I might be doing something wrong?
Note: The M4 core is running at 64MHz and the M0 core at 32MHz.
Thanks in advance!
2024-12-01 05:59 AM
Use DMA for SPI - "fire and forget" is much more efficient than interrupt-driven SPI.
2024-12-08 08:24 PM
Thank you for your suggestion. I will implement this solution and see if it helps resolve my timing issue. However, I would also like to understand the underlying cause of the problem.
2024-12-19 09:35 PM
Hi @gbm ,
I attempted to resolve my timing issue using DMA, but it seems to be taking more time compared to the polling method. I’m not sure why this is happening. Could you please assist me with this?
For your reference, I have attached the code as a zip file.
Thank you.