Open MatthiasW1004 opened 2 years ago
The clean solution is using the EXTI0_IRQHandler that is already defined in the stm32l4xx_it file, and placing your code there. If you really want to use your own handler, delete the already defined one or make it "weak" so that it uses another one if there is one
I fixed it like this:
For the RTC alarm callback, I want to use HAL_RTC_RegisterCallback. It is defined in the stm32l4xx_hal_rtc file but it does not recognize the defined parameters.
VSCode does tend to highlight stuff as undefined, does your code compile?
No it does not, it gives me the 'not declared' error
Could you post the full error the compiler is giving?
I am also wondering why the code where this function is defined is more blurry than the code above:
Do you maybe have an example in your octastack about how to use the RTC-Alarm interrupt? Or something similar?
Hi Matthias,
Mats is unavailable right now but I'll try to help you out here. Like you noticed, the function that you're trying to call is dimmed, which means that the #if directive above is probably returning false, so the code below is not being included. Try defining USE_HAL_RTC_REGISTER_CALLBACKS to 1 in your makefile https://stackoverflow.com/questions/53288150/how-to-add-define-in-makefile
I changed the value in the hal_conf_template file but it still does not work. For some reason I also cannot add the define in the make file as said in the stackoverflow discussion
Are you getting the same error?
And I get the same error. I also tried changing it here:
This is the documentation about it
And the error remains the same? Have you tried to do a clean build?
Yes, tried the clean build, even tried other ways to define the USE_HAL_RTC_REGISTER_CALLBACKS but still the same error.
Did you import ./core/ST/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_rtc.h?
I did like this, I think it is correct right?
It is if you also added the correct entries in your makefile. Could you show those?
This is the full make file
If I try to generate an interrupt using a push button, I can't make the bin file because the EXTI0_IRQHandler is already defined elsewhere. How can I make it use my IRQHandler?