2023-02-13 10:24 AM
I have used MxCube to enable an ISR that is triggered from an external GPIO input pin. MxCube enables this ISR from the autogenerated MX_GPIO_Init() function by calling HAL_NVIC_EnableIRQ(EXTI15_10_IRQn); at the very end of this function. I don't want to enable this ISR until later in the program when the rest of my system is ready and it is safe to do so.
How do I properly remove this line of code so that MxCube doesn't undo my change every time I go to update the MxCube file?
Thanks!
Solved! Go to Solution.
2023-02-14 09:24 AM
Gotta love old vaudville jokes (they were old even when they were new)
A couple of options, at least:
2023-02-13 01:30 PM
---------- UPDATE -----------
So I figured out that if I edit the gpio_c_HalCompliant.ftl file within the CubeMx installation folder it works. The file is located at: C:\ST\STM32CubeIDE_1.6.1\STM32CubeIDE\plugins\com.st.stm32cube.common.mx_6.5.0.202202251913\db\templates
HOWEVER,
I need a better solution than this because I need to be able to push this to a repository to share with others and therefore I can't rely on modifying installation files. Is there a way for me to add a user defined template file within the ...\db\extra_templates\ folder and add that in my MxCube settings to either override the gpio_c_HalCompliant.ftl template file or somehow modify it dynamically to eliminate the HAL_NVIC_EnableIRQ from being generated? If so, perhaps I could save this file elsewhere outside of the installation files so I can save this as part of my project repo.
2023-02-13 03:56 PM
The patient says, "Doctor, it hurts when I do this."
"Then don't do that!"
/Henny Youngman/
2023-02-14 09:24 AM
Gotta love old vaudville jokes (they were old even when they were new)
A couple of options, at least: