This hardware causes UART
to loop back at the hardware level.
Developed based on the STM32F042
and CH340
chips,
it taps the serial communication of the target software
using the baud-rate
auto-negotiation function of VCP
.
In addition, since the pins of the 'SL2.1A' chip are left, so I added the USB hub function to utilize them. and 'PD (Power Delivery)' input in case the current is insufficient.
- UART hardware loopback board with
USB Type-C
cable. - Target hardware and software.
- This tapping software.
- Connect the data cable,
USB Type-C
to your PC, - Attach a
COM
port ofF042VCP
to target software. - Then, attach a
COM
port ofCH340
to this tapping software. - And, configure this tapping software to communicate with the target hardware.
This board's
So, you can flash the SL2.1A
USB hub chip seems like that disable the SWD pins.
(This seems to be a problem that occurs when the DP/DM pins wired on the board activate DFU mode or probe-like something)F042F6P6
chip like:
This enables ST-Link
SWD pins. if BOOT0
pin is floating, the chip will never enable DFU
or SWD
pins.
BOOT0
-> pull down: enablesSWD
.BOOT0
-> pull up: enablesDFU
.
Solder the F042F6P6
chip to development board or use non-solder programming tools, and flash your chip, then re-solder it to this board.
Initially, the F042F6P6
chip will be booted in DFU mode.
-
download
DfuSe
tool from ST microelectronics website: https://www.st.com/content/my_st_com/en/products/development-tools/software-development-tools/stm32-software-development-tools/stm32-programmers/stsw-stm32080.license=1635064983409.product=STSW-STM32080.version=3.0.6.html#get-software -
install it and goto
[System drive]:\Program Files (x86)\STMicroelectronics\Software\DfuSe v3.0.6\Bin
using explorer. -
double click
DfuFileMgr.exe
-
check first option,
I want to GENERATE a DFU file from S19, HEX or BIN files
then clicknext
. -
put
DF11
toProduct ID
field. -
click
S19 or Hex...
button then, select your builtHEX
file, and clickGenerate
. -
close
DFU File Manager
tool, and double clickDfuSeDemo.exe
file. -
select
STM device in DFU mode
fromAvailable DFU Devices
combo box. -
click
Choose...
button onUpgrade or Verify Action
panel. -
select
DFU
file that generated at 6th process, then clickUpgrade
. -
finally, click
Leave DFU mode
onAvailable DFU Devices
panel. -
unplug your board and re-plug it.
-
done.