I'll answer my own question:
In order to get your square wave out on TIOA you have to set the appropriate bits on the TC Channel Mode Register:
TC_Configure(chTC, chNo,
TC_CMR_TCCLKS_TIMER_CLOCK4 |
TC_CMR_WAVE | // Waveform mode
TC_CMR_WAVSEL_UP_RC | // Counter running up and reset when equals to RC
TC_CMR_ACPA_SET | // RA compare sets TIOA
TC_CMR_ACPC_CLEAR ); // RC compare clears TIOA
This solution is much accurate than using interrupts but it has the drawback that you have to use the pin associated with the TIOA0 signal (on arduino DUE this is pin 2).
Best regards,
Dan.