I'm new to Atmel SAM, so I got a SAMG55 Xplained board as a first intro. Now I am having trouble with the 'getting started' example from ASF.
I can compile & flash it ok, but the SAM gets stuck in 'usart_write()', particularly the check 'if (!(p_usart->US_CSR & US_CSR_TXRDY))' always evaluates to false. Removing all prints, the processor does go to the led-blinking part of the 'getting started' program, and does work just fine.
I have opened a terminal on the '/dev/ttyACM0' that shows up when I connect an USB cable to the EDBG port on the board. I double-checked the settings, 115200 8N1, no HW/SW flow control. I tried with both minicom and cutecom.
Now, thinking the ASF example could be buggy, I tried with the "ASF-free" version hinted to on these forums: https://github.com/ataradov/mcu-.... Exact same problem happens with its samg55-example project (which tries to write to the UART attached to the EDBG)
Am I missing something? I'm using OpenOCD (which needed a small fix to work with SAMG55, this could be the cause too, but what exactly goes wrong?), and the arm-none-eabi-gcc from Ubuntu 16.04 packages. The processor wants to boot by default from its ROM (which I assume has SAM-BA stuff on it). Does this ROM initialize the hardware peripherals in some way the 'getting started' project on ASF doesn't? OpenOCD just makes the device boot from flash directly. How does Atmel Studio program the chip: directly or over SAM-BA? Is there something more to be done with EDBG than the documented "connect to it with a terminal application"? What is the preferred way of programming SAM processors with the GCC/Makefile apporoach in ASF? I'd try with Atmel Studio, but I don't have easy access to a Windows machine.
Any suggestions appreciated & thanks in advance,