mirror of
https://github.com/oliverschmidt/contiki.git
synced 2024-11-20 10:35:34 +00:00
Re-order instructions in the RTC startup sequence
This commit is contained in:
parent
dcf0d11050
commit
eb5b11a85a
@ -68,18 +68,17 @@ cc26xx_rtc_init(void)
|
|||||||
/* Setup the wakeup event */
|
/* Setup the wakeup event */
|
||||||
ti_lib_aon_event_mcu_wake_up_set(AON_EVENT_MCU_WU0, AON_EVENT_RTC0);
|
ti_lib_aon_event_mcu_wake_up_set(AON_EVENT_MCU_WU0, AON_EVENT_RTC0);
|
||||||
ti_lib_aon_event_mcu_wake_up_set(AON_EVENT_MCU_WU1, AON_EVENT_RTC2);
|
ti_lib_aon_event_mcu_wake_up_set(AON_EVENT_MCU_WU1, AON_EVENT_RTC2);
|
||||||
|
ti_lib_aon_rtc_combined_event_config(AON_RTC_CH0 | AON_RTC_CH2);
|
||||||
|
|
||||||
/* Configure channel 2 in continuous compare, 128 ticks / sec */
|
/* Configure channel 2 in continuous compare, 128 ticks / sec */
|
||||||
|
ti_lib_aon_rtc_inc_value_ch2_set(RTIMER_SECOND / CLOCK_SECOND);
|
||||||
|
ti_lib_aon_rtc_mode_ch2_set(AON_RTC_MODE_CH2_CONTINUOUS);
|
||||||
compare_value = (RTIMER_SECOND / CLOCK_SECOND) +
|
compare_value = (RTIMER_SECOND / CLOCK_SECOND) +
|
||||||
ti_lib_aon_rtc_current_compare_value_get();
|
ti_lib_aon_rtc_current_compare_value_get();
|
||||||
ti_lib_aon_rtc_compare_value_set(AON_RTC_CH2, compare_value);
|
ti_lib_aon_rtc_compare_value_set(AON_RTC_CH2, compare_value);
|
||||||
ti_lib_aon_rtc_inc_value_ch2_set(RTIMER_SECOND / CLOCK_SECOND);
|
|
||||||
ti_lib_aon_rtc_mode_ch2_set(AON_RTC_MODE_CH2_CONTINUOUS);
|
|
||||||
|
|
||||||
/* Enable event generation for channels 0 and 2 and enable the RTC */
|
/* Enable channel 2 and the RTC */
|
||||||
ti_lib_aon_rtc_combined_event_config(AON_RTC_CH0 | AON_RTC_CH2);
|
|
||||||
ti_lib_aon_rtc_channel_enable(AON_RTC_CH2);
|
ti_lib_aon_rtc_channel_enable(AON_RTC_CH2);
|
||||||
|
|
||||||
ti_lib_aon_rtc_enable();
|
ti_lib_aon_rtc_enable();
|
||||||
|
|
||||||
ti_lib_int_enable(INT_AON_RTC);
|
ti_lib_int_enable(INT_AON_RTC);
|
||||||
|
Loading…
Reference in New Issue
Block a user