cancel
Showing results for 
Search instead for 
Did you mean: 

CubeMX problem....

mattreed9
Associate II
Posted on May 20, 2016 at 23:00

I'm using the wakeup interrupt from the RTC, but I don't want it active until certain conditions are present.

But I have no choice, either I disable it in Cube and get no stubs for interrupts and no definition, or I enable it and it is automatically running, like it or not.

Fortunately I've found that is won't actually start until I do:

__HAL_RTC_WAKEUPTIMER_CLEAR_FLAG(&hrtc, RTC_FLAG_WUTF);

Is that by design? If so why isn't it in the HAL documents?

I would suggest having a check-box in the configuration of 'enabled'.  So it can be configured in a disabled state.

-Matt

3 REPLIES 3
Walid FTITI_O
Senior II
Posted on May 23, 2016 at 13:15

Hi reed.matthew.003,

Please, tell us which CubeMx version and device you are using in your project.

And to make your request clear, you mean this ''wakeup clear flag'' macro is not present with the generated code which cause a functional problem ?

-Hannibal- 

mattreed9
Associate II
Posted on May 23, 2016 at 15:28

Hannibal,

Thanks for the reply.  I'm using 4.14.0

And no, my comment is not about the wake-up clear macro.

I would like the Cube Configuration for RTC in the ''Wake UP'' section to have a check-mark ''Wake UP Enabled'' which would allow the wake-up timer to be setup, but not enabled.

Thanks!

-Matt

Walid FTITI_O
Senior II
Posted on May 23, 2016 at 17:15

Hi reed.matthew.003, 

This depends on the RTC configuration on CubeMx , it is selected internalwakeup , so it is enabled for ''ready for use'' state of the peripheral. (see figure)

0690X00000604ugQAA.png

You can easly edit the generated code and remove the HAL_RTCEx_SetWakeUpTimer() function and place it as you want. Becareful, be awre it will be generated if you re-generated the code.

-Hannibal-