CubeMX incorrectly generating code for STM32U0 MCO2
I'm trying to generate code using CubeMX for the Nucleo-U031R8 demo board to output a clock signal to the MCO2 pin. But the generated MX_GPIO_Init function makes the following assignment:
GPIO_InitStruct.Alternate = GPIO_AF0_TRACE;Naturally, the compiler throws an error: "GPIO_AF0_TRACE undeclared".
If I manually change the code to the following:
GPIO_InitStruct.Alternate = GPIO_AF0_MCO2;...the code compiles without errors.
Is it possible to fix this bug in the next CubeMX release?
