How can I find which USART is connected to Serial, on the Nucleo-144 STM32F746ZG? I've searched, and looked at the variant definition, but I can't figure it out. It's currently connected to the user micro USB port, by default.
What I'd like to do is define the ST-Link one as Serial and have the micro USB one still available, but on another Serial<n> instance.
When I plug in a Nucleo-144 STM32F746ZG, I get two Virtual COM Ports. One shows as STMicroelectronics STLink Virtual COM Port and the other shows as STMicroelectronics Virtual COM Port. The second one is the one that's used by Serial. The ST-Link one is used by Serial3.
In the variant definition, variant_NUCLEO_F7x6ZG.h (
https://github.com/stm32duino/Arduino_C ... O_F7x6ZG.h ) says this:-
// UART Definitions
#ifndef SERIAL_UART_INSTANCE
#define SERIAL_UART_INSTANCE 3 //Connected to ST-Link
#endif
// Serial pin used for console (ex: stlink)
// Rerquired by Firmata
#ifndef PIN_SERIAL_RX
#define PIN_SERIAL_RX PD9
#endif
#ifndef PIN_SERIAL_TX
#define PIN_SERIAL_TX PD8
#endif
Based on viewtopic.php?t=926 this seems to put the console (Serial) on USART3, and also defines it as Serial3, but that's not what happens. Serial3 is connected to the ST-Link Virtual COM Port but Serial is connected (somehow) to a Virtual COM Port on the user micro USB connector at the opposite end.
Does the user micro USB port VCP have a Serial<n> definition? How can I override which one is used for Serial?
Nucleo-144 STM32F756ZG Virtual COM ports and Serial<n>
Re: Nucleo-144 STM32F756ZG Virtual COM ports and Serial<n>
You answer yourself,
the Serial is mapped to Serial3 using PD8/PD9.
If Serial is linked yo USB user connector, this simply mean you have enable the USB cdc which supersede Usart Serial.
So Serial is mapped to SerialUSB and Serial3 is instantiated but not used. Except if you use it explicitly Serial3.begin(), Serial3.println(),....
the Serial is mapped to Serial3 using PD8/PD9.
If Serial is linked yo USB user connector, this simply mean you have enable the USB cdc which supersede Usart Serial.
So Serial is mapped to SerialUSB and Serial3 is instantiated but not used. Except if you use it explicitly Serial3.begin(), Serial3.println(),....
Re: Nucleo-144 STM32F756ZG Virtual COM ports and Serial<n>
I have enabled USB CDC, yes, but out of habit. I think I needed that for the STM32F407G Discovery. I didn't know the consequences. I thought I had to do that to get USB serial output at all.
I'm still not entirely clear what those options do. The descriptions of them in the Arduino Tools menu are a few words short of an explanation. I assume there's a better description of them somewhere, but I haven't come across one yet.
I'm still not entirely clear what those options do. The descriptions of them in the Arduino Tools menu are a few words short of an explanation. I assume there's a better description of them somewhere, but I haven't come across one yet.