Add support for Timers (TC)
Closed this issue · 2 comments
haata commented
atsam4s_a, atsam4s_b
- 1 Timer Module (3 Channels)
- 16bit registers
atsam4s_c - 2 Timer Modules (2x3 Channels)
- 16bit registers
atsam4e - 3 Timer Modules (3x3 Channels)
- 32bit registers
Only basic timer functionality for now.
Out-of-scope features
- Wave mode
- Chaining timer channels
- External clock input
haata commented
Still trying the figure out the best way to do this.
Currently the problem is that there are can be multiple Timer Modules (usually 0 through 2). And each module has 3 channels.
For the most part each channel is an independent channel and can be configured separately. Unfortunately there are some shared registers in the module as well. On top of that, I haven't figured out a way to assign specific registers to a struct yet.
Ideally, each Timer Module Channel would own their specific registers. The Timer Module would own any of the generic registers for the module.