cancel
Showing results for 
Search instead for 
Did you mean: 

Bug in STM32CubeIDE, Version: 1.10.1, Build: 12716_20220707_0928 (UTC), regarding IRQ on DMA transfers with STM32F401

SLink.1
Associate

I have a small project which should generate an interrupt whenever a DMA transfer has completed. If I build the code for an STM32F411 then it works exactly as expected. If I build that same code for an STM32F401, which is within the same family as the 32F411, then the project is not built correctly. The DMA transfer still happens, but there is no interrupt upon transfer completion.

The problem is in the vector table.

  .word	SysTick_Handler
  .word	0                            			/* Reserved                                                                        */
  .word	EXTI16_PVD_IRQHandler        			/* EXTI Line 16 interrupt /PVD through EXTI line detection interrupt               */
  .word	TAMP_STAMP_IRQHandler        			/* Tamper and TimeStamp interrupts through the EXTI line                           */
  .word	EXTI22_RTC_WKUP_IRQHandler   			/* EXTI Line 22 interrupt /RTC Wakeup interrupt through the EXTI line              */
  .word	FLASH_IRQHandler             			/* FLASH global interrupt                                                          */
  .word	RCC_IRQHandler               			/* RCC global interrupt                                                            */
  .word	EXTI0_IRQHandler             			/* EXTI Line0 interrupt                                                            */
  .word	EXTI1_IRQHandler             			/* EXTI Line1 interrupt                                                            */
  .word	EXTI2_IRQHandler             			/* EXTI Line2 interrupt                                                            */
  .word	EXTI3_IRQHandler             			/* EXTI Line3 interrupt                                                            */
  .word	EXTI4_IRQHandler             			/* EXTI Line4 interrupt                                                            */
  .word	0                            			/* Reserved                                                                        */
  .word	0                            			/* Reserved                                                                        */
  .word	0                            			/* Reserved                                                                        */
  .word	0                            			/* Reserved                                                                        */
  .word	0                            			/* Reserved                                                                        */
  .word	0                            			/* Reserved                                                                        */
  .word	0                            			/* Reserved                                                                        */
  .word	ADC_IRQHandler               			/* ADC1 global interrupt                                                           */

As you can see, it goes directly from ".word   EXTI4_IRQHandler" directly to ".word   ADC_IRQHandler". All those reserved words in-between should be for the DMA IRQ handlers.

2 REPLIES 2
gbm
Lead II

As a quick workaround, you may generate the basic project for F401CCxx (which generates the correct startup), then copy the startup module from it to your project. Or, alternatively, (self-promotion warning) you may use my startup generator to create the correct C startup: https://github.com/gbm-ii/Cortex-M_C_startup_gen

KDJEM.1
ST Employee

Hello @SLink.1​ and welcome to the Community 🙂,

Thank you for bringing this issue our attention.

I reported this issue internally. 

Internal ticket number: 137390 (This is an internal tracking number and is not accessible or usable by customers).

Kaouthar

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.