SAML21 Timer Counter Bugs

Aug 11th 2020

So by now if you are regular here you have realize that Microchip's datasheets are almost as good as having a 1000 monkeys typing on a type writer. That is they just create confusion and delay.  But look at the positive they part is never bad as their is no real documentation on how it should work... 

Today the case in point is the SAML21 Timer Counter...  So as you know most timers/counter count up to period register and reset.  So if you look a the SAML21 timer counter you notice that it has a 8-bit, 16-bit and 32-bit timer counter, and 8, 16 and 32bit period registers. 

However if you look at the CMSIS you will notice that only the 8-bit period register is defined. 

So what is going on here, and which is wrong the CMSIS or the datasheet?  Well if you have been playing along at home you know that the Datasheet is ALWAYS wrong or at least in conflict.  So lets do some more looking and sure enough it states:

Yeap the period registers do not work in 16bit and 32bit mode... 

Thank You Microchip!