Hi Mike
It looks like analog 2 and analog 3 are RXD and TXD pins for the UART3 in the LPC2368. However these are not declared as being a serial port on the mbed pinout.
For what we are doing, it might be useful to make use of these two pins as a serial port. The question then arises of whether the mbed C++ library can support a serial port on these pins?
Good question. The answer is, yes, it does support all the pinout options of the underlying chip.
For simplicity, we only specified one of the available pinout options for each underlying hardware block. Specifying only one means people don't have to think about resource conflicts (e.g. describing the concept that it can pinout in multiple places, and hence you can't use both independently!)
However, the libraries quite happily support all the pinout options for a block. So for your UART3 example, TX comes out on pins 9 or 17 and RX on 10 and 18. So you could do:
// The following are valid pinouts for the underlying UART3 hardware block
// note: that means you can only choose one of these options at a time!
Serial uart(9, 10); // tx, rx
Serial uart(17, 18); // tx, rx
Serial uart(9, 18); // tx, rx
Serial uart(17, 10); // tx, rx
It is the same for any of the resources; all options are available, even if not in the primary quick-reference. Hope this makes it clear. We'll perhaps document all available options in our Ninja section!
Simon
Hi,
I have worked out that the LCP2368 ports map to the mbed IO as shown in the spreadsheet at:
ftp://internal.hitex.co.uk/pub/hitex/mbed/mbed-lpc2368mapping.xls
It looks like analog 2 and analog 3 are RXD and TXD pins for the UART3 in the LPC2368. However these are not declared as being a serial port on the mbed pinout.
For what we are doing, it might be useful to make use of these two pins as a serial port. The question then arises of whether the mbed C++ library can support a serial port on these pins?
Having done this pin mapping exercise it does raise the general point about whether mbed users can make use of alternate pin functions that are not officially declared as mbed IO.
Thanks
Mike Beach, Hitex