Tidy in preparation for RTC

geofence_dev
Richard Meadows 2015-03-15 19:29:16 +00:00
rodzic 4589c95c33
commit e6f5d0ba61
3 zmienionych plików z 13 dodań i 8 usunięć

Wyświetl plik

@ -5,14 +5,18 @@
|*GLCK*|
||gclk0|main clock, internal osc8m|4 MHz
||gclk1|tcxo clock, fed from xosc
||gclk2|rtc feed, fed from gclk1. divide by 4096
|*TC*||
||tc0|telemetry tick timer (has timepulse input)
||tc0|telemetry tick timer. 32-bit
||tc1|^^^^^
||tc2|counts cycles of tcxo. 32-bit
||tc3|^^^^^
||tc4|osc8m event source
||tc5|pwm 8-bit
||tc5|telemetry pwm 8-bit
|*RTC*|
||rtc|telemetry timings
|*event channels*|
||0|event source for timer 2 xosc measurement
@ -26,7 +30,8 @@
## SAM D20 Interrupts usage
| Name | Function | Notes
| Name | Function | Priority H(0-3)L | Notes
| --- | --- | --- | ---
|TC0_IRQn|
|TC2_IRQn|xosc measurement done|
|TC0_IRQn||0
|TC2_IRQn|xosc measurement done|2
|[GPS_SERCOM]_IRQn|gps usart rx|0

Wyświetl plik

@ -105,8 +105,9 @@ void wdt_init() {
void powermananger_init(void)
{
system_apb_clock_clear_mask(SYSTEM_CLOCK_APB_APBA,
PM_APBAMASK_EIC | /* EIC is unused */
PM_APBAMASK_RTC); /* RTC is unused */
// PM_APBAMASK_EIC | /* EIC is used now */
// PM_APBAMASK_RTC | /* RTC is used now */
0);
}

Wyświetl plik

@ -309,7 +309,6 @@ float timer0_tick_init(float frequency)
bool t0_capture_channel_enables[] = {false, false};
uint32_t t0_compare_channel_values[] = {count, 0x0000};
tc_init(TC0,
// GCLK_GENERATOR_3,
GCLK_GENERATOR_0,
TC_COUNTER_SIZE_32BIT,
TC_CLOCK_PRESCALER_DIV1,