tests/power/multicorei/lmt: Fix RTC configuration
After QMSI 1.4 update, the alarm callback is not saved when 'alarm_en' is set to zero during RTC configuration. So this patch fixes tests/power/multicore/lmt application according. ZEP-1778 Change-Id: Ie1468458bc23a6394484aef2aeee97745d5d23b8 Signed-off-by: Andre Guedes <andre.guedes@intel.com>
This commit is contained in:
parent
31c5b4f112
commit
c7f01dc90d
1 changed files with 8 additions and 2 deletions
|
@ -137,9 +137,15 @@ void main(void)
|
|||
|
||||
rtc_enable(rtc_dev);
|
||||
|
||||
config.init_val = 0;
|
||||
config.alarm_enable = 0;
|
||||
/* In QMSI, in order to save the alarm callback we must set
|
||||
* 'alarm_enable = 1' during configuration. However, this
|
||||
* automatically triggers the alarm underneath. So, to avoid
|
||||
* the alarm being fired any time soon, we set the 'init_val'
|
||||
* to 1 and the 'alarm_val' to 0.
|
||||
*/
|
||||
config.init_val = 1;
|
||||
config.alarm_val = 0;
|
||||
config.alarm_enable = 1;
|
||||
config.cb_fn = alarm_handler;
|
||||
rtc_set_config(rtc_dev, &config);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue