UART

13 Sep 2014

At time of writing, the UART's aren't correct and fully functional.

UART_1 will not work as it is tied to the SDA chip for debug output (unless R5 and R6 are removed but will disable PCprint and any other SDA linked functions.

UART_0 is available and works on PTD7(tx) and PTD6(rx), but not shown on the overview pin outs.

UART_2 (PTD3, PTD2) is not working.

25 Sep 2014

Hi Paul - Thanks for giving this platform an early go. We've made this public today. Here are some responses to your comments.

Paul Staron wrote:

UART_1 will not work as it is tied to the SDA chip for debug output (unless R5 and R6 are removed but will disable PCprint and any other SDA linked functions.

Looking at the schematic UART1 is used for OpenSDA CDC and also D0/D1 on the arduino header. The pins are different but the peripheral is the same so both OpenSDA printf and D0/D1 cannot be used at the same time.

  • PTB17, PTC16 for OpenSDA
  • PTE1, PTE0 for Arduino header D0/D1

Paul Staron wrote:

UART_0 is available and works on PTD7(tx) and PTD6(rx), but not shown on the overview pin outs.

The pin diagrams are becoming more simplified as they're meant to describe a simple use case to get started. The schematic for the board and user manual for the MCU will indicate many more peripherals that the exposed pins can be used for.

Paul Staron wrote:

UART_2 (PTD3, PTD2) is not working.

Here is a simple example of an echo program. UART2 seems to be working. Can you give this a try? Just need to jump pins D11 and D12 together.

UART1 to UART2 echo

#include "mbed.h"

DigitalOut myled1(LED1);
DigitalOut myled2(LED2);
DigitalOut myled3(LED3);

Serial pc(USBTX, USBRX);
Serial u2(PTD3, PTD2);

int main() {
    myled2 = myled3 = 1;
    while(1) {
        if(pc.readable()) {
            u2.putc(pc.getc());
            myled1 = !myled1;
        }
        if(u2.readable()) {
            pc.putc(u2.getc());
            myled1 = !myled1;
        }
    }
}
25 Sep 2014

--

06 Nov 2014

Tried your example Sam which does indeed work but still not working on my 4DSystems Oled display. There may be a hardware track issue as I have had with the KL05 board. I will check more thoroughly with a small project board.