Cube - How can I disable IRQ function call generation in STM32xxx_it.c function?
On a L412KB core HAL is quite unstable if the core receives ~250K interrupts per second. Without HAL I could get everything stable, but for read-ability I would like to put the interrupt service routine in another file as STM32xxx_it.c Besides that, I have some pragma statement added to the IRQ service routine. This is deleted every code generation.
Cube always seem to generate the IRQ function in STM32xxx_it.c when interrupt is enabled, So I have a conflict the interrupt service routine is defined in my own file + STM32xxx_it.c file. The only solutions I found so far:
- Enable peripheral IRQ in my own routine, because cube assumes it's off. But this makes it also less maintain-able, because if something is nice about Cube it's the ability to have an overview of all interrupts and levels in NVIC.
- Callback function disable has no effect: the interrupt service is always generated..
- After each code generation, I have to restore __WEAK for the generated irq service functions.
I tried to encapsulate the pragma / __WEAK directives with /* USER CODE BEGIN */ and end before the function in STM32xxx_it.c file, but Cube deletes those each code generation.
A solution would be that each auto generated function has such a /* USER CODE BEGIN */ /* USER CODE END */ just before the function itself, so one can add pragma / __WEAK / other directions if needed.
Does cube have the ability to declare such functions as __WEAK (in that case it's a well hidden feature)?
Present Cube Version: 1.11.2 Build: 14494_20230119_0724 FW Package = STM32CubeFW_L4_V1.17.2)
