First let me say XIAO is a nice product.
However from within the Arduino IDE, I uploaded some code which directly modifies some TCC0 control registers and interrupt ISR (as defined within Microchip’s TCC0.h component header file, as also seemingly used by Seeed’s TimerTCC0 XIAO driver); I can no longer access the device via its USB interface even after reseting the device by tapping the reset pin quickly twice; which results in the yellow led adjacent to the green power led, pulsing softly at about 4 hertz, but never blinking slowing as it should if the boot loader has successfully brought up its USB host interface port; as if it’s trying to reset, but the default boot loader keeps being interrupted by something?
I suspect my code corrupted some system state which the boot-loader relies upon, but which should not happen if the boot-loader only executes after the system was fully hw-reset, and only executes user partition code if not receiving a second reset-pulse within some period of time?
So as it stands now, the device is useless, which begins executing my corrupt code before it locks up, and apparently can’'t be successfully reset to execute the boot-loader resulting in a functional USB interface to the host Arduino IDE?
Any suggestions would be appreciated.
(Please also consider improving the robustness of the boot-loader, as it should always work, regardless of what state is possibly corrupted by user-code, to help prevent this in the future.)
I was attempting to configure TCC0 as a 24bit 1MHz wrap-around counter which would generate an interrupt upon matching a value in its compare register (while the counter continues to count). Which the TimerTCC0 driver appears not to currently support. So also please consider updating this or another driver to enable this, or please suggest a possibly different approach I should consider.