Timeline for ASF SAMD21G18 2x timers usage
Current License: CC BY-SA 4.0
12 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Aug 14, 2019 at 6:28 | vote | accept | Hasan alattar | ||
Aug 14, 2019 at 6:28 | answer | added | Hasan alattar | timeline score: 1 | |
Jun 19, 2019 at 12:23 | comment | added | Hasan alattar | tc5 works fine when i dont init tc4, i think some how thats confusing they when i see samd21g18.h file the peripheral handlers tcc0,1,2 and tc3,4,5 handler so they mix these TC with TCC in datasheet so its little confusing. but i will try what you suggested and comment back later | |
Jun 19, 2019 at 10:40 | comment | added | diegogmx | reading the datasheet i see the following in the part of the TCs Features• Selectable configuration– Up to five 16-bit Timer/Counters (TC), each configurable as:• 8-bit TC with two compare/capture channels• 16-bit TC with two compare/capture channels• 32-bit TC with two compare/capture channels, by using two TCs and you are calling TC5, and they start at TC0, meaning that you are actually calling a SIXTH tc, maybe try using TC3 and TC4? | |
Jun 19, 2019 at 10:39 | comment | added | diegogmx | I see now, those are just descriptors | |
Jun 19, 2019 at 9:28 | comment | added | Hasan alattar | @diegogmx i've edited post in edit section and pasted the two functions called. (timer_init and internal _timer_init) | |
Jun 19, 2019 at 9:28 | history | edited | Hasan alattar | CC BY-SA 4.0 |
added 2175 characters in body
|
Jun 19, 2019 at 9:17 | comment | added | diegogmx | can i see timer_init? never used atmel start, however in asf 2.x i never use empty structs like that, generally the first argument is the pointer to the peripheral, meaning the first config register addr | |
Jun 19, 2019 at 9:11 | comment | added | Hasan alattar | @diegogmx the code is actually doing both init same, what i showed in the post is actually modified version where i dont setup gclk_enable_channel twice. but that didnt work. i set it back to be both same now | |
Jun 19, 2019 at 9:03 | comment | added | Hasan alattar | Timer_1 and Timer_0 to my knowledge are actually empty structures. timer_init() will fill them. | |
Jun 19, 2019 at 8:05 | comment | added | diegogmx | these can be tricky sometimes, for example in sam4e micros the clock sources in the datasheet can be somewhat confusing in this case how is TIMER_0 and TIMER_1 defined? also why are you not enabling the clock in TIMER_0_init in contrast to TIMER_1? | |
Jun 19, 2019 at 7:20 | history | asked | Hasan alattar | CC BY-SA 4.0 |