I want to control GPIO output using DMA and Timer. The target is generating a CLK signal of 1MHz and control PB0 synchronized with the CLK.
I am using Nucleo-F411RE as the development board. I have followed the instructions from the forum and configured the program.
Configuration:
HCLK: 100MHz
Timer3:
Program in main.c:
uint32_t dummy_data[7] = {0} ;
dummy_data[0] = 0x00000001 ;
dummy_data[1] = 0x00010000 ;
dummy_data[2] = 0x00000000 ;
dummy_data[3] = 0x00000000 ;
dummy_data[4] = 0x00000001 ;
dummy_data[5] = 0x00010000 ;
dummy_data[6] = 0x00000000 ;
HAL_DMA_Start(&hdma_tim3_ch4_up, (uint32_t)dummy_data, (uint32_t)&(GPIOB->BSRR), 7) ;
HAL_TIM_Base_Start(&htim3) ;
HAL_TIM_OC_Start(&htim3, TIM_CHANNEL_4) ;
TIM3->DIER |= (1 << 8 ) ;
I am expecting to see a pulse in PB0 synchronized with PC9(Output compare pin) PWM. But as output, I am getting only 1MHz PWM in PC9 and there is no change in PB0. Am I missing something? Any suggestions would be helpful.


dummy_dataa local variable? (Bad.)