ataradov / mcu-starter-projects

Simple starter projects for bare-metal MCU development
307 stars 41 forks source link

Atmel SAME70Q21 (SAM E70 Xplained) - how to receive serial data? #1

Closed markfirmware closed 6 years ago

markfirmware commented 6 years ago

EDIT: The issue was a misunderstanding on the operation of the uart. It transmits when a button is pressed, but not continuously.

@ataradov My host is raspbian stretch lite. Can you recommend a way to receive and display the data received over the edbg virtual uart? I believe it enumerates as /dev/ttyACM0.

I have tried putty, minicom, microcom and some other means, but with no data received of any kind.

I'd very much appreciate instructions that are known to work.

Regards, Mark.

ataradov commented 6 years ago

All of them should work, just make sure that the port settings are correct (115200 8N1).

And try on PC first to see that your application actually sends anything.

markfirmware commented 6 years ago

I tried using putty on COM3 on win10 with 115200/8/N/1 and no response. Has https://github.com/ataradov/mcu-starter-projects/blob/master/same70/main.c#L170 been tested on any platform?

Thanks, Mark

ataradov commented 6 years ago

Yes, it has been tested on Windows an Linux. Make sure that you have GPNVM bit 1 set so that device actually boots from flash. If you have erased the chip using the ERASE pin, then the bit will be cleared.

markfirmware commented 6 years ago

Thank you for your help. The led flashes per main.c when I connect the board so I think it must be booting from flash. Tomorrow I will double check that I didn't modify the source and also check that I have the right tool chain on raspbian.

ataradov commented 6 years ago

Get to work on PC first.

BTW, it does not print anything then just running, it only prints a string on reset and then dots when the button is pressed.

markfirmware commented 6 years ago

Thanks - I had a misunderstanding that it would be transmitting all the time. Everything works, no issues. Thanks again.