9 years, 9 months ago.

why does frdm_serial example program not work when I change USBRX to NC on a FRDM-KL25Z?

  1. include "mbed.h"

DigitalOut myled(LED_GREEN); Serial pc(USBTX, NC);

int main() { int i = 0; pc.printf("Hello World!\n");

while (true) { wait(0.5f); wait a small period of time pc.printf("%d \n", i); print the value of variable i i++; increment the variable myled = !myled; toggle a led }

Question relating to:

frdm serial example for the Freescale freedom platform FRDM, Freedom, Freescale, Serial

2 Answers

9 years, 9 months ago.

What does happen? Does the red LED start blinking? I know for some time that wasn't allowed, but in recent mbed libraries that should have been fixed again. Make sure you use the latest mbed library: Right click on it, click update, try again :).

9 years, 6 months ago.

I tested the below code, running on K64F-FRDM is fine. but need to press reset button when update binary complete

  1. include "mbed.h"

DigitalOut myled(LED_GREEN); Serial pc(USBTX, NC);

int main() { int i = 0;  pc.baud(115200);  wait(1.0f); pc.printf("Hello World!\r\n");

while (true) { wait(0.5f); wait a small period of time pc.printf("%d \r\n", i); print the value of variable i i++; increment the variable myled = !myled; toggle a led  } }