2024-08-29 10:37 AM
I am a long-time STM32CubeMX user (7+ years). I ran into an issue with STM32CubeMX recently while modifying an existing configuration for an STM32L4 project. This is a usability issue.
In the NVIC configuration page, there are two tabs, one labeled "NVIC", the other labelled "Code Generation". In the NVIC tab there is a column labelled "Enabled". The issue is with the word "Enabled" -- it has a clear meaning with regard to interrupts. I wanted the interrupt handler created, but I wanted the code generated with the interrupt disabled. I made the mistake of disabling "Enabled" in the NVIC tab, initially ignoring the "Code Generation" tab. The result was that the interrupt handlers, along with my user code, was removed from the stm32l4xx_it.c file. (I had it in source control, so nothing was lost.)
"Enabled" on the NVIC tab means that the interrupt is used and a candidate for code generation. The selection I wanted is on the "Code Generation" tab labelled "Generate Enable in Init". The word "Enabled" on the NVIC page is what led to the confusion.
I suggest finding some other word to use on the NVIC page rather than "Enabled" when choosing which interrupts are used. Maybe the word "Use" or "Configure" is more appropriate on the NVIC page. All I know is that "Enabled" is not the best term to use here as its meaning is not clear and precise.