2022-01-13 08:23 AM
I am trying to read from an external SPI ADC at a 1MHz rate using a timer and 4 dma channels.
I setup TIM 3 to run at 16 MHz and rollover at a count of 24.
CC1 pulse is 1, cc2 pulse is 2 cc3 pulse is 22.
CC1 drives DMA1 stream4 which is setup to transfer from memory to a GPIO BSSR register , cs assert
CC2 drives DMA1 stream 5 which writes a 16bit value to the SPI Tx register, starting a transfer
CC3 drives DMA1 stream 7 which is setup to transfer from memory to a GPIO BSSR register, cs de-assert
The SPI transfer works as expected, but bothe the GPIO DMAs fail with a transfer error and the NDTR register decremented by 1 from the programmed value.
How can I debug the DMA transfer error. I have tried both 16 and 32 bit transfers as well as just running a single channel. No luck.
Any help will be apprreciated.
Solved! Go to Solution.
2022-01-13 09:49 AM
2022-01-13 08:23 AM
Please put your chip number in your post.
2022-01-13 09:16 AM
stm32f411RETx. I am using a Nucleo-f411RE board.
2022-01-13 09:49 AM
2022-01-13 10:21 AM
Thank you.