cancel
Showing results for 
Search instead for 
Did you mean: 

[Worked around it] SPI Transfer half complete Not working corectly

angus schmaloer
Associate III

I have setup the spi connection, and i'm testing it with a logic analyzer.

It all works great. BUT, the Transfer half complete interrupts occurs before any data is transferred when i use;

(HAL_SPI_TransmitReceive_DMA(&SpiHandle, (uint8_t*)aTxBuffer, (uint8_t*)aRxBuffer, BUFFERSIZE);

When i use;

(HAL_SPI_TransmitReceive_DMA(&SpiHandle, (uint8_t*)aTxBuffer, (uint8_t*)aRxBuffer, 12)

i do get the Transfer half complete interrupts in the middle of the transfer.

It doesn't matter if i use normal, IT or DMA

EDIT: I wanted to use the interrupts for my Chip select, but now i use the harddware NSS as output, works better. but... The DMA half transfer still dint work. But yeah.

2 REPLIES 2
Bob S
Principal

> It doesn't matter if i use normal, IT or DMA

????? The transfer half complete interrupt only applies to DMA transfers.

Since the only different that I see between the working and non-working calls you typed is the "size" parameter, what is the value of "BUFFERSIZE"?

>????? The transfer half complete interrupt only applies to DMA transfers.

could be, ill look into this tomorrow. but still doesn't explain the problem.

>Since the only different that I see between the working and non-working calls you typed is the "size" parameter, what is the value of "BUFFERSIZE"?

aah ye, my bad, sloppy code while testing, butttt, my BUFFERSIZE is 16, so the only difference would be the size, but that wouldn't matter, cuz the interrupt is not a few bits off, but just totally before the tranfer