Skip to main content
Associate III
July 2, 2026
Solved

CubeMX generates duplicate peripheral handles

  • July 2, 2026
  • 1 reply
  • 65 views

I attempted to convert a CubeMX project to start using the “Generate peripheral initialization as a pair of ‘.c/.h’ files per peripheral” option and CubeMX left three peripheral handle declarations in main.c which conflict with the declarations in their individual files: handle_LPDMA1_Channel0, hlptim1 and hlptim3. Many other peripheral handles were correctly removed from main.c, including other LPDMA channel handles.

Can anyone help me figure out what’s going wrong and how to fix it? I suspect that this may be because they are used in our LPBAM setup.

Best answer by Ghofrane GSOURI

Hello ​@SamMiddleton 

I was able to reproduce this issue even with the latest version of STM32CubeMX 6.18.0

A ticket #0064032 has been escalated to dev team for resolution 

I will keep you posted with updates.

THX

Ghofrane

1 reply

Ghofrane GSOURI
Ghofrane GSOURIBest answer
ST Technical Moderator
July 2, 2026

Hello ​@SamMiddleton 

I was able to reproduce this issue even with the latest version of STM32CubeMX 6.18.0

A ticket #0064032 has been escalated to dev team for resolution 

I will keep you posted with updates.

THX

Ghofrane

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.