2022-09-01 11:00 PM
Hi,
I want to do SPI transfer every 1ms without wakeing up CPU.
In one SPI transfer, I want to send 10 Half words.
It was possible to send SPI every 1ms with dma.
But I can transfer only a half word in one transfer.
What should I do ?
Best regards.
(Below is part of the source code)
HAL_DMA_Start_IT(&hdma_tim17_ch1_up, (uint32_t)(tx_data), (uint32_t)&(&hspi1)->Instance->DR, 10);
__HAL_TIM_ENABLE_DMA(&htim17, TIM_DMA_UPDATE);
__HAL_TIM_ENABLE(&htim17);
2022-09-02 02:16 AM
Which STM32?
In models with DMAMUX, it should be possible to generate the repeated requests using DMAMUX.
Otherwise, use two timers - one, which triggers DMA, at a rate equivalent to back-to-back SPI transfers or slightly slower; other, which through internal TRGO-TRGI mechanism gates the first timer so that it generates 10 pulses (=triggers) every 1ms.
JW
2022-09-02 02:58 PM
Thank you for your reply.
>Which STM32?
STM32L496ZG.
Dose not this have DMAMUX ?
Best regards.
2022-09-03 01:37 AM
> STM32L496ZG.
> Dose not this have DMAMUX ?
No.
JW