2018-09-04 08:48 AM
Hi,
I am using STM32F103 interfaced with MPU6050 over I2C with DMA.
I am using CubeMX generated code.
If I simply use
HAL_I2C_Master_Receive()
function then it works fine.
I am reading this for my quadcopter and needs faster loop time so decided to use DMA.
I generate DMA enabled code using CubeMX and use
HAL_I2C_Master_Receive_DMA()
function. but then got stuck after 5 readings with constant data.
Googled alot and tried different solution but non of them worked.
Any suggestions? What I am missing?
Thanks,
Ansic
2018-09-04 08:53 AM
>>Googled a lot and tried different solution but none of them worked.
So perhaps instead of people re-explaining methods you've already tried, you could perhaps enumerate them more specifically.
I'd recommend using a logic or protocol analyzer to better understand the mode of failure observed at the pins.
I2C+DMA on an F1is likely to be a lot of fun.
Check for error status returned by the DMA functions, or flagged by the I2C/DMA peripherals.
2018-09-04 09:11 AM
Unfortunately I didn't have any logic or protocol analyzer and debugger?
What can I see is just printf over UART.
It got stuck just after 5 readings