Hi Martin
I can confirm that the last code posted works very well on my M0PRO, including serialUSB !
Now I need to go on with my project, then I have some basic questions :
First, I do need to run my Tx and Rx on the same board.
For Tx I am using your PWM code, which generate 40 kHz on Pin 7 thanks to timers based on GCLK4 clock , TCC0 and TCC1 etc...
For Rx (our last exchanges above), I use Pin 12 and attached interuption, and timers based on GCLK5 , TCC0 and TCC1 etc...
Did I well understand that both timers / interruptions can work at the same time ?
How to STOP / START timers individualy ?
For the external interruption linked to Pin 12, can we use "Nointerrupts() / Interrupts() instructions to stop it ? I mean, does other interruptions in the system will be affected ? and if yes how to manage it selectively ?
Thanks
Daniel