UART DebugPort via STLink Virtual COM Port

It’s fine.
STM32F401 - UART(PA2/PA3) - TTL-232R-3V3 - VisualStudio

But it’s NG.
STM32F401 - UART(PA2/PA3) - STLink(on NUCLEO-F401RE) - STLink Virtual COM Port - VisualStudio

Looking for a device on transport 'Serial'.
Found device port 'Serial' with ID '3dca2ecd-b447-4599-893f-6f025836bbe5' for transport 'Serial'.
Starting device deployment.
Attempting to connect to device 'Serial:COM11': iteration 0.
Opening port '\\.\COM11'.
Attaching debugger engine.
Cannot attach debugger engine!

I checked UART signal used Saleae Logic, STLink send data is parity added.

Then I test original application, parity is none.
Original App -> STLink Virtual COM Port - STLink(on NUCLEO-F401RE)

Can I see vsix source code?

remove jumper from st link it should work
because it will not act as st link debugger

CN2 jumber is select for SWD(CN4) or onboard STLink.
UART via STLink does not change.

It’s NG.
STM32F401 - UART(PA2/PA3) - STLink(on NUCLEO-F401RE) - STLink Virtual COM Port - VisualStudio

It’s UART signal.

I want to set dCB.Parity = 0 between GetCommState() and SetCommState().

This sequence is fine.
1.Connect PC and NUCLEO-F401RE.(UART debug firmware in NUCLEO)
2.Deploy apps on VisualStudio … ERROR
3.Run original windows app. (Set Parity none to COM)
4.Retry to deploy apps on VisualStudio … fine!

STRONGLY REQUEST modify .vsix code.

What modifications to the vsix are you proposing? I’m not sure which “original application” you’re referring to though.

Serial on Nucleo have different behaviour (if it was used throught ST-Link Virtual COM)
and need to change way of parity bit,

so for that @matsujirushi created and provided example how to do
it throught his exe app (which you can run on console mode) and allow VS to debug-deploy app throught ST-Link Virtual Com

1 Like

I want to set dcb.Parity = NOPARITY between GetCommState() and SetCommState() in AsyncSerialStream().

So I can understand correctly, you’re asking for this because the STLink serial port sets the parity on the PC to something not “None” and this conflicts with what the debugger on the device expects?

yes so we need with additional exe to change it,

and this way maybe can include inside vsix onto vs2017 so when we select serial to have ability to change also parity mode to none (or play with other modes too for serials) to debug/upload.

but only as mentioned @matsujirushi above which parts

Sorry. I can understand English a little.

I think this.

1.TinyCLR OS Firmware communicate 115200,8,1,N by UART.
2.vsix communicate 115200,8,1,?. (Not explicitly specified parity setting. use default setting.)
3.Some device’s default is none-parity. It worked nomally.
4.But STLink Virtual COM default is NOT none-parity. Don’t communicate between device and vsix.

Run original windows app to set none-parity after connecting the device. and immediately close application and UART port.
vsix communicate 115200,8.1.N.

@John_Brochue @valon_hoti_gmail_com

idea is to be able to change

115200,8.1.N or non N
and to keep both depend when is needed to use
(by using an changer/selector for it and to select needed value)

We’ve set parity to none for the next release.

1 Like