cancel
Showing results for 
Search instead for 
Did you mean: 

sending same data over DMA

btd5
Associate II

I'm using stm32u535 and LIS3DHTR accelerometer. The accelerometer has a 32 FIFO buffer, and I set it up so that it sends a signal to interrupt pin when FIFO is full. To read data, I need to send 0xE900,0x0000,0x0000 (saved in uint16_t  ACC_READ_ALL_DMA[3] ) over SPI 32 times in a row. Using linked list or 2D addressing in DMA, is it possible to use the following function, where it would loop ACC_READ_ALL_DMA 32 times, instead of needing 96 entries?

HAL_SPI_TransmitReceive_DMA(&hspi1,(uint8_t*) ACC_READ_ALL_DMA,(uint8_t*) accelerometer_data, 32*3);

0 REPLIES 0