2024-12-05 05:49 AM - last edited on 2024-12-18 01:38 AM by SofLit
Hi all,
I am using STM32U575ZIT nucleo board.
My goal is to write ODR register of GPIOD by using GPDMA transfer, using TIM2 to trigger the memory-to-peripheral transfer.
In this "test" script, I use a 2-elements source array to force ODR all high and then all low. I want this operation to be continuous, hence the GPDMA is configured in circular mode.
The configurations of TIM and GPDMA are attached as PNG, while the code lines in the main.c are the following:
TIM2->DIER = TIM2->DIER|TIM_DIER_UDE;
TIM2->DIER = TIM2->DIER|TIM_DIER_TDE;
uint16_t prova[2] = {0xFFFF, 0x0000};
HAL_DMA_Start(&handle_GPDMA1_Channel0, (uint32_t)prova, (uint32_t)&(GPIOD->ODR), 4);
HAL_TIM_OC_Start(&htim2,TIM_CHANNEL_1);
What I see is that the timer signal is correct (1Hz freq), but the GPDMA seems not working (ODR never written)
I think one of the main problem is that it's not clear to me yet the difference between trigger and request.
Could you please help me? Thanks