I notice that the USB Serial (the lowest numbered COM port of the three, that's connected to the Cortex-M33) isn't opened in a Serial Terminal before the application starts, it never works. If you reboot the CPU, it then works fine.
1. Connect the DK to the PC.
2. Observe COM3, COM4 and COM5 appear.
3. Open a serial terminal on COM3.
4. Observe that the serial terminal doesn't work - no output is printed and no input appears to reach the MCU.
5. Press the reboot button on the DK.
6. Observe that serial terminal is fine - text appears and MCU responds to input.
7. Disconnect the Serial Terminal from COM3. MCU should still be running at this point.
7. Connect the Serial Terminal to COM3 again. MCU should still be running at this point.
4. Observe that the serial terminal doesn't work - no output is printed and no input appears to reach the MCU.
I have an Actinius Icarus and this is quite happy to have the USB serial connected and disconnected, so I'm fairly sure it's not my code (unless it's pin config). On the DK I am configuring the serial terminal thus:
let cdc_uart = Uarte::new(
p.UARTE0_NS,
uarte::Pins {
txd: pins0.p0_29.into_push_pull_output(Level::High).degrade(),
rxd: pins0.p0_28.into_floating_input().degrade(),
cts: Some(pins0.p0_27.into_floating_input().degrade()),
rts: Some(pins0.p0_26.into_push_pull_output(Level::High).degrade()),
},
UartParity::EXCLUDED,
UartBaudrate::BAUD115200,
);
and on the Icarus:
let cdc_uart = Uarte::new(
p.UARTE0_NS,
uarte::Pins {
txd: pins0.p0_09.into_push_pull_output(Level::High).degrade(),
rxd: pins0.p0_06.into_floating_input().degrade(),
cts: Some(pins0.p0_25.into_floating_input().degrade()),
rts: Some(pins0.p0_07.into_push_pull_output(Level::High).degrade()),
},
UartParity::EXCLUDED,
UartBaudrate::BAUD115200,
);