STM32F767 with SPI and DMA #2018
Replies: 1 comment 3 replies
-
Hi @raphaelvalentin ,
|
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I am interested about SPI and DMA for a project within Arduino environment. I am at the concept for the moment and I would like to override the SPIClass.
I am having a pretty bad time to figure out a working code with my SMT32F767 despite many source references that help me to understand (documentation PDF references, the web, STM-CUBE-IDE and chatGPT). My code shall run within the Arduino environment.
Below is my code for which I can not figure out why SPI works but not DMA.
I apologize for this code mostly adapted from HAL, this was the advice from the SPI library.
This code compiles but crashes when
HAL_SPI_Transmit_DMA
is called. I tried many other ways without success. I definitely missed something.Maybe, you can help me to figure out my issue.
Thanks a lot for any support !
--
Raphael.
EDIT1:
Thanks @fpistm, the crash can be fixed by modifying the handlers :
However, the code still not send data ... But, I can see that the
TRACE
after theHAL_SPI_Transmit_DMA
is not printed, so it returnsHAL_OK
.If I modify
HAL_SPI_TxRxCpltCallback
toHAL_SPI_TxCpltCallback
, I can see that the callback is called now, but the data are garbage.Beta Was this translation helpful? Give feedback.
All reactions