9 years, 11 months ago.

MK20 Received break signal from PC

Hi,

Does the MK20 interface firmware support detecting break signal from PC? What will present on the UART to main MCU when received the break signal from PC?

Best regards

Question relating to:

1 Answer

9 years, 11 months ago.

The standard behavior when a break is received is to reset the target MCU.

Does it mean that MK20 will pull dowm the target MCU's reset pin using a GPIO? I searched a lot and found that the break signal is to issue a long period low level on the TX pin. As the interface firmware also acts as a USB-UART bridge, will the MK20 issue a long period low level on its TX pin when received a break signal from PC? If not, how can I detect the break signal receved from PC so that I can config MK20's register to issue a break signal on its TX to target MCU? I need target MCU receive the break signal across MK20 from PC .

Thanks for your help!

Best regards

posted by RedBearLab Hong Kong 04 Dec 2014

Which target do you mean specifically? I assume one of the BLE boards? Yes it will pull the reset pin low when it receives a break char.

You can only change that by rewriting its firmware, which while possible, is not exactly straightforward. I don't know for the BLE targets, but possibly you can reconfigure the reset input to GPIO input, and detect a break by detecting the reset pulse. However obviously now it won't be able to be reset anymore for programming. Using Keil uVision I have been able to erase a target in this condition, but that isn't really handy if you have to do that everytime you want to reprogram, and I don't even know if it is possible with your target.

posted by Erik - 04 Dec 2014

My target is a wifi implemented ARM core MCU. To update its firmware, I first make the target MCU run its UART bootloader and then I send a break signal to its UART RX to trig the firmware update,. But it seams that the MK20 eats the break signal from PC. I don't want to reset the target MCU when MK20 received a break signal but to deliver the break signal to target MCU. So I prefer to rewrite the MK20's firmware that when it detects a break signal from PC, it just issues a break signal to target MCU. And note that the UART bootloader on target MCU is a binary provided and we can't modify it. I have tried that the CH340, a USB-UART converter, and the FTDI can deliver the break signal to target MCU. So I am intrested whether the CMSIS-DAP firmware support detecting the break signal and deliver it to target MCU.

Thanks a lot!

Best regards

posted by RedBearLab Hong Kong 05 Dec 2014

Well you can search the break detection in the MK20s firmware and then change it to also send a break.

posted by Erik - 05 Dec 2014