cancel
Showing results for 
Search instead for 
Did you mean: 

SPI dma example receiving only 0

Logann123321
Associate III

Hi I am using stmh7 nucleo board and trying the spi dma example in NUCLEO-H743ZI folder, but thr transfer only gives me 0 in the aRxBuffer, anyone has had this problem before? I am not sure how to solve this

Thanks!

3 REPLIES 3

Did you follow exactly the readme, how the hardware connections ought to be done?

Or do it yourself. do one step at a time. First set up SPI and try a polled implementation first, loop back MOSI into MISO and observe data and clock using an oscilloscope. Then gradually mix in DMA.

JW

Logann123321
Associate III

Hi thanks for the reply I finally am getting things back from mosi, but I am still not getting the right values, it looks like the data is shifted to the right by 1 bit, when I am sending 50 it is receiving only 25, and I believe I have cpha and cpol correct, any idea why that might be?

Thanks

DRabi
Associate II

Hi @Logann123321​  !

Recently tried SPI1 on same board. Without DMA.

After some time having strange problems with MOSI, decided to try SPI3 on the same board, again without DMA.

Worked without any kind of problem.

Could it be used for you as walk around?

Dan