cancel
Showing results for 
Search instead for 
Did you mean: 

DMA _Init() being called in wrong place by code generator

mantisrobot
Associate III

The code generator is inserting the DMA_Init() and BDMA_Init functions in the wrong place, leaving DMA not working unless I manually move them after every call code generator run.

I place them in the USER CODE segment above the INIT segment then remove the auto generated versions each time otherwise DMA doesn't work.

  /* USER CODE BEGIN SysInit */
  MX_BDMA_Init();
  MX_DMA_Init();
 
  /* USER CODE END SysInit */
 
  /* Initialize all configured peripherals */
  MX_GPIO_Init();
  MX_USART3_UART_Init();
  MX_USART2_UART_Init();
  MX_TIM2_Init();
  MX_DMA_Init(); // PLACED HERE BY CODE GENERATOR
  MX_LPUART1_UART_Init();
  MX_BDMA_Init(); // PLACED HERE BY CODE GENERATOR
  MX_I2C1_Init();
  MX_TIM3_Init();
  /* USER CODE BEGIN 2 */

10 REPLIES 10
mantisrobot
Associate III

Hi,

Thanks for the reply. This migration step fixed the issue!

Regards

matt.