SAMD support working

Hmm maybe it’s all working so well that I’m systematically sampling during the low phase of the pwm?

I’ll try to see if I can run it this weekend. It sounds like you made awesome progress!

I still cannot think of a solution to problem 2… where i was going with that was to input scan the whole adc pin range at each event, current code does not do that

Oh i may have an idea:

Enavle ovfeo on tcc0 → triggers adc conv on channel A
… In ADC_handler(), read the result, switch muxpos to channel B and enable tcc1 ovfeo → triggers adc conv on channel B
… In ADC_handler, etc…

Before I went threre I managed to find out why I have always reading 1.71V

First, I forgot to load the factory calibration. with that I’m back at 1.69

@runger Please make sure you use the version I just pushed if you happend to find the time to check.

Second, it was as I suspected, I was reading during the pwm dead time. using TCC_WAVEB_WAVEGENB_DSTOP instead of TCC_WAVEB_WAVEGENB_DSBOTTOM
solved it!
this is when I forfce my motor left and right.