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.
5 years, 4 months ago.
Serial can't be remapped to other output pins?
I was attempting to change the Serial output from the default USB virtual com one to one of the other supported pin pairs (PB_6, PB_7) but I end up getting an error over USB serial stating "new serial object is using same UART as STDIO"... so can one not use the UART for anything other than debugging over USB? Is there a way to disable that? Seems silly to advertise certain pins as having UART capability when they can't be used for that purpose.
Question relating to:
2 Answers
5 years, 3 months ago.
It's advertised correctly. F031K6 has only one serial port, you have an option to remap it to different pins. But since it's connected to USB bridge, debug goes there by default. If you want to use serial for something else you can, but you need to use macro NDEBUG to disable debug (printf).
Although I haven't tried it yet with Mbed OS 5, the SoftSerial library could help, when you are out of serial pins.
posted by 06 Sep 2019