2018-01-16 06:36 PM
can the HAL programmers please add the __weak attributes to the interrupt routines.
I had to add this one again today:
__weak void CEC_CAN_IRQHandler(void); // in stm32f0xx.h
and this one:
__weak void CEC_CAN_IRQHandler(void) // in stm32f0xx.c
#hal2018-01-17 12:46 AM
Hi @T_J,
The
CEC_CAN_IRQHandler is defined in the .s files depending on the device you selected.
Then, when needed to be used, you have to add it in the stm32f0xx_it.c and stm32F0xx_it.h, it is up to you to do this.Why do you need it to be declared as weak?
-Amel
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2018-01-17 02:14 AM
I have my own routines:
void HAL_SYSTICK_Callback(void){
mS++;
mSint = true;
if (mS == 1000) {
secondInt = true;
mS = 0;
}
}
void CEC_CAN_IRQHandler(void){
/* USER CODE BEGIN CEC_CAN_IRQn 0 */
CAN_IRQFlag = true;
checkCanRxFifos();
/* USER CODE END CEC_CAN_IRQn 0 */
HAL_CAN_IRQHandler(&hcan);
/* USER CODE BEGIN CEC_CAN_IRQn 1 */
/* USER CODE END CEC_CAN_IRQn 1 */
}
�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?
2018-01-17 02:48 AM
And then what is the issue? Do you have an error compiling your generated code before adding your own routines?
If yes, please share your .ioc.
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2018-01-17 03:20 AM
My code compiles ok, but I have to insert the __weak directive every time...