2025-07-01 10:31 AM
I have set HAL_IncTick timer (tim6) to not interfere with systick when using thread and RTOS, the new callback was created by cubeMX and I got error about second declaration, I moved my timers settings to newly created callback, later I decided to change to tim18, after code upload I found what some functions do not work like expected, by debugging I found what everything what was in this callback is gone and there is newly created fresh callback just with newly created tim18 settings, everything else is gone ! CubeMX do not checks previously created callback by cubeMX and just deletes it !
2025-07-01 10:37 AM
I think it's expected that user code in a callback which is no longer present/generated will get deleted. It's not going to copy TIM6 code to TIM18.
2025-07-01 10:47 AM
User code is between /* USER CODE BEGIN Callback 0 */ /* USER CODE END Callback 0 */ and I think it must be checked before delete.