Hi there,
I'm working on a Arduino Zero compatible board and I'm having some issues with USB and SPI. Since I installed a 12.288 MHz clock on pins PA14-15 (XOSC) rather than the 32.768 KHz on pins PA00-01 (XOSC32K) like the Zero, I thought the USB/SPI issues may be due to wrong clocking.
The startup.c file of the Zero core contains all the Clock Controller stuff (and I already changed every reference from XOSC32K to XOSC); when I uncomment the lines that refer to GCLK_GENCTRL_OE so to enable GCLK0,1 and 3 outputs on their pins I see nothing on the oscilloscope.
I also tried to modify variant.cpp file so that the relative pins' alternate function (should be PIO_AC_CLK) was enabled (I tried with pins PB22, PB23, PA17) but that did not work either.
The line I used to set the alternate function is (only one shown here)
{ PORTA, 17, PIO_AC_CLK, PIN_ATTR_DIGITAL, No_ADC_Channel, NOT_ON_PWM, NOT_ON_TIMER, EXTERNAL_INT_NONE },
What may the issue be?
For any reference, original project page w/ loads of details here:
also, Github repo w/ branch of Arduino Zero core is here:
Thanks for any feedback,
Mick