Hi - I am working on a SWI (Single Wire Interface) project. I am having timing issues with a ASF and a SAMD21 xplained pro. The single wire interface performs bit banging and it appears my timing is off. In the below code, I should see the signal go high and low every 1us, however it more like 8us.
for(int i = 0; i < 100; i++){ delay_us(1); REG_PORT_OUTSET1 = 0x40000000; delay_us(1); REG_PORT_OUTCLR1 = 0x40000000; }
I am using the default clock settings set by ASF. Any help is appreciated .