Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
9 years, 9 months ago.
why does frdm_serial example program not work when I change USBRX to NC on a FRDM-KL25Z?
- 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:
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
- 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 } }