Well, tell me if this math is right. I followed the formulas used in the commented code that I posted:

- 1 / 100Hz = 10ms

- period = 10ms/256 = 39.06us with 256 as size of the lookup table

- 48MHz is the clock frequency

- Considering that the prescaler value of the arduino m0 are: 1,2,4,8,64,256,1024:

48MHz/1 = 48MHz => 20.83nsec

48MHz/2 = 24MHz => 41.66nsec

48MHz/4 = 12MHz => 83.33nsec

48MHz/8 = 6MHz => 166,66nsec

48MHz/64 = 750KHz => 1.33usec

48MHz/256 = 187.5KHz => 5.33usec

48MHz/1024 = 46.87KHz => 21.34usec

- Dividing the period by the clock divided by the prescaler, I obtain:

39.06usec/20.83nsec = 1875.18

39.06usec/41.66nsec = 937.6

39.06usec/83.33nsec = 468.74

39.06usec/166.66nsec = 234.37

39.06usec/1.33usec = 29.37

39.06usec/5.33usec = 7.33

39.06usec/21.34usec = 1.83

Now according to the guy's calculation, due to the fact that the register is 8bit, I have to subtract 256 with one of the number of the final calculation. Due to the fact that I need a number close to 256, I should get 1.83 and so, have a reload of the timer with 254, correct?

Moreover the count of the interrupt has to arrive to 256 and then has to be reset, right?