2022-02-15 06:24 AM
Could you please explain me how to use HAL_SPI_Transmit_DMA with an array?
In this case
uint16_t data1= 1024;
HAL_SPI_Transmit_DMA(&hspi1, &data1, 1)
I get a warning concerning the pointer ("passing argument 2 of 'HAL_SPI_Transmit_DMA' from incompatible pointer type") but at the end everything is fine, i.e. the SPI lines measured with the oscilloscopes are the ones that I expect
But if i try to transmit an array the interface seems to not work
uint16_t data={32, 4096};
HAL_SPI_Transmit_DMA(&hspi1, data, 2);
I receive no warning but the SPI does not output anything.
I am afraid I am not using the pointer to the array in the proper way...can you help me in understanding this issue?
2022-02-18 07:05 AM
@TDK
Yes that is exactly what I thought. Do you have any examples to see how to use the SPI interface and the timer to set the DMA off without using the HAL library?
Regards