cancel
Showing results for 
Search instead for 
Did you mean: 

STM32 Virtual COM Port and BREAK

T B
Associate II
Posted on January 29, 2018 at 12:02

Hello!

Is it possible to send a UART break (0.3 seconds) over the Virtual COM Port.

It seems that UART break is connected with NRST.

-Thomas

1 ACCEPTED SOLUTION

Accepted Solutions
Posted on January 29, 2018 at 16:08

So, if you want the BREAK to reach the target STM32, you'll have to use a separate connection direct to the target's UART pins (and break the links to the ST-Link UART if you want to use those pins)

View solution in original post

13 REPLIES 13
Posted on January 29, 2018 at 12:28

Is it possible to send a UART break (0.3 seconds) over the Virtual COM Port

In which direction?

  • PC --> STM32?
  • STM32 --> PC?
T B
Associate II
Posted on January 29, 2018 at 13:45

PC --> STM32 (The STM32 resets.)

On the PC I generate the break with RealTerm or with pyserial. Both has the same effect.
Posted on January 29, 2018 at 14:12

Now I'm confused.

So you're saying that you are sending a break, and that it causes your STM32 to reset?

But you don't want the STM32 to reset?

So why not use the debugger to see what happens when you send that break ... ?

Posted on January 29, 2018 at 14:27

Are you running a custom application on the STM32 or you are in the DFU mode (bootloader)?

Posted on January 29, 2018 at 14:56

I have tried it on the STM32F3DISCOVERY and NUCLEO-F302R8 boards. Both have the same behavior.

If I press ''Set Break'' in RealTerm'' then PIN T_NRST (PB0) of the ST-LINK MCU (U2) assert low and

the MCU (STM32F30X) resets.0690X00000609XIQAY.png
Posted on January 29, 2018 at 15:05

Ok. It means that the st-link captures the ctr-c and resets the target MCU.

STM32F3DISCOVERY does not emulates the VCOM because of st-link v2 so the VCOM should not be seen in the Device Manager, I guess

NUCLEO-F302R8has the VCOM (st-link v2-1).

It does not explain the behavior.

Posted on January 29, 2018 at 15:14

Note that a break is not the same as a Ctrl+C ...

Posted on January 29, 2018 at 15:15

Well, that's a whole load of information & context that was missing from the OP!

Posted on January 29, 2018 at 15:54

Right. Thanks.