I am trying to pass a string (possibly quite a long string) to the E70 using a COM port via the USB connection for the purpose of controlling program flow of the E70 from a PC. As far as I can tell, the simplest way to do this is using the USB CDC protocol and I am using the ASF example to try and understand how this works.
I am able to get the example project to work with the two terminal windows echoing the input.
Up to a point, I am able to follow the example and I can see that the data is being processed by various functions in udi_cdc.c. However, this all seems to be occurring in the USART ISR (which is in uart_sam.c), even when the data is coming in through the USB port.
So my questions are:
- Where the USB data is coming in – i.e. what register(s) does this data occupy?
- How is the USART ISR being triggered by the USB?
- It also appears that the data is coming in one character at a time. How would one best go about sending, for example, 1000 characters to the E70? Individually processing each one doesn’t feel right, but I think if the data is coming into some register then the DMA can probably be used quite efficiently.