2024-02-13 11:36 AM - edited 2024-02-15 02:08 AM
Hello.
I encountered strange CubeIDE behavior on a customer board with an STM32G0B1CEU.
I've found similar glitches on this forum, but they mostly stemmed from fake HW.
I use all original STM from MOUSER.
If I enable PWM on TIM4 in MXcube, without NVIC, I generate the code, then using CubeIDE and stlink-v3e I upload the code to the MCU without problems, it works without problems, the oscilloscope shows what it has.
But as soon as I activate anything with NVIC (TIM PWM Interrupt, DMA interrupt, ...), I generate the code in CubeIDE, then when uploading the code to the MCU it terminates with an MI error message, see attachment.
Where is the problem?
Please help.
Solved! Go to Solution.
2024-02-18 04:46 AM
Cause revealed.
Wrong setting in CubeProgrammer >>> Option bytes >>> "DUAL_BANK".
Still, I don't understand why CubeIDE generated an MI error when the project size was around 10kB, which is a hell of a long way from 256/512kB.
2024-02-13 07:25 PM
Is this a custom board or known good hardware? I'd look for hardware issues first.
With the program running, can you connect with STM32CubeProgrammer? If not, SWCLK/SWDIO are probably being hijacked by the program, perhaps due to hardware issues.
2024-02-14 01:09 AM - edited 2024-02-14 01:16 AM
Hi, this is a custom board.
Connect, upload code is hassle-free.
Once I activate TIM4, PWM mode, I upload the code to the MCU without problem. On the oscilloscope, the MCU generates PWM flawlessly.
But...
As soon as I activate the TIM interrupt or the DMA interrupt, the code cannot be uploaded. It will end with a message, see the attachment to the question.
So I cancel any interrupt in MXcube, generate the code again, and upload the code to the MCU via CubeIDE without any problems.
It looks like a *.elf build error for this type G0B1CEU
If I use the weaker brother NUCLEO-G071RBT, I can literally do dog pieces with it, without problems.
2024-02-18 04:46 AM