cancel
Showing results for 
Search instead for 
Did you mean: 

Issue with interupts STM32F410RB

Bogdan
Senior

Hello,

i have configured timer1 to trigger via CC1  an  adc + dma.

For the DMA i have  placed the TC irq routine and placed a gpio toggle to follow with a logic analyzer like shown below

 

void DMA2_Stream0_IRQHandler(void){

 if (DMA_GetITStatus(DMA2_Stream0, DMA_IT_TCIF0) != RESET)
 {
	  GPIO_ResetBits(gpio_led_port,gpio_led2);
	  GPIO_SetBits(gpio_led_port,gpio_led2);
	  GPIO_ResetBits(gpio_led_port,gpio_led2);

 	 DMA_ClearITPendingBit(DMA2_Stream0, DMA_IT_TCIF0);
  }
}

And this is my nvic setup

 

 SysTick_Config(SystemCoreClock / 1000);
	 NVIC_InitTypeDef NVIC_InitStructure;
	 NVIC_PriorityGroupConfig(NVIC_PriorityGroup_0);


	 NVIC_InitStructure.NVIC_IRQChannel = SysTick_IRQn;
	 NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 1;
	 NVIC_InitStructure.NVIC_IRQChannelSubPriority = 0;
	 NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE;
	 NVIC_Init(&NVIC_InitStructure);


	 NVIC_InitStructure.NVIC_IRQChannel = DMA2_Stream0_IRQn;
	 NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 2;
	 NVIC_InitStructure.NVIC_IRQChannelSubPriority = 0;
	 NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE;
	 NVIC_Init(&NVIC_InitStructure);

 

My problem is the DMA TC IRQ never triggeres,     the timer1 cc1 output works...

 

The systick irq routine works

 

The thing is that i have tried to port the same code,  to a stm32F407VG device, and there everything works as expected...

 

I remember that on the F410 devices i always have trouble running irq's, and i am not sure if this is related to the startup file.

 

Any advices on what to check?

 

 

 

0 REPLIES 0