For me the writeUSART() function is in the ChibiOS/hal/platforms/AT91SAM7/serial_lld.c ..
I guess there's been stuff modified already.. So maybe this is an added function.
But that function works with the RS232 Connector. It directly controls the USART registers TPR (Transmit Pointer Register), TCR (Transmit Counter Register) and PTCR (PDC (peripheral dma controller) Transfer Control Register).
Example: "pUSART0->US_PTCR = AT91C_PDC_TXTEN;"
pUSART0 is defined in the usart_init...() function, which I guess is also custom, as AT91C_BASE_US0; (pUSART0 = AT91C_BASE_US0;).
- usart_init()
is called from
- void sd_lld_start(SerialDriver *sdp)
which itself is called by
- sdStart(&SD2, &default_config);
in the main.c
I also tried to copy usart_init() to make a usart1_init() and use the pUSART0 = AT91C_BASE_US1; address instead of the US0.
But, I can't test anything of that if the connection from the MOD-USB-RS232 to the computer doesn't work.
Plugging in the MOD-USB-RS232 alone with the USBAM-USBAM to the computer should give me a new COMM Port in the device manager of the computer, right?
Or do I need to install a driver on the computer??
My supervisor suggested to build myself a cable to connect the UEXT directly to USB... Which doesn't make much sense right?...... Anyway, that's what the MOD-USB-RS232 is there for.... So why should I build it myself.. >.<
Thanks for the helpful replies already, and the interest in helping : P !
Edit:
Ohp, didn't see your reply there @ mabl.
Well, the output of the MOD-USB-RS232 is Mini-USB, so there's this mini-usb to usb (
http://www.amazon.co.uk/StarTech-com-Mi ... B002O1S8IE) and from there the USBAM-USBAM for the connection to the computer.
What kind of driver would I need? (I am using windows (XP)) On
https://www.olimex.com/dev/mod-usb-rs232.html there's just a firmware which I suppose is for the MOD-USB-RS232 itself...?