Skip to main content
Visitor II
December 22, 2024
Solved

Getting started with STM32WB55 - DMA does not work as expected - Example code doesn't work.

  • December 22, 2024
  • 1 reply
  • 598 views

The simple DMA_MUX_RequestGen example code doesn't work as expected.

I have tried running the example from https://github.com/STMicroelectronics/STM32CubeWB/tree/master/Projects/P-NUCLEO-WB55.Nucleo/Examples/DMA/DMA_MUX_RequestGen

on the P-NUCLEO-WB55 board, but it does not run as expected; when I press the SW1 button, the LED2 gets on, but it stays on forever, and it does not toggle as expected (the DMA gets only the first trigger and then stops functioning)

The DMA ISRs also don't get triggered in any case.

After enabling the EXTI line4 interrupt and changing the HAL_DMA_Start_IT(&DMA_Handle, (uint32_t)SRC_Buffer_LED2_Toggle, (uint32_t)&LED2_GPIO_PORT->ODR, 2);

to: HAL_DMA_Start(&DMA_Handle, (uint32_t)SRC_Buffer_LED2_Toggle, (uint32_t)&LED2_GPIO_PORT->ODR, 2);

Somehow, it started to work, but none of the DMA interrupts will work in either case.

Then I tried configuring it with the CubleMX but I can't get it to work, the DMA gets the first trigger from the GPIO but it doesn't continue running as expected.

Basically I would expect that example code provided by STMicrocontrollers would work out of the box without any modifications?

Any help would be appreciated!

 

Best answer by STTwo-32

Hello @EM_Embedded 

I've tested personally using the last version of the STM32CubeWB V1.21.0 and I've been able to make it work as it is (without modifications on the code). 

Best Regards.

STTwo-32

1 reply

STTwo-32
STTwo-32Best answer
Technical Moderator
January 22, 2025

Hello @EM_Embedded 

I've tested personally using the last version of the STM32CubeWB V1.21.0 and I've been able to make it work as it is (without modifications on the code). 

Best Regards.

STTwo-32