0
\$\begingroup\$

I'm redesigning the BW16 kit board to fit better with a project I am working on. The first stage of my process is trying to understand what is currently happening on the board.

There are two sections leading out of the RX and TX on the CH340C that are further modified and linked to the two receive and the two transmit UART ports on the BW16 chip itself. I would like some clarification on their function.

The first (pictured below) connects the RXD output of the CH340C to two resistors, one with 0R leading to the UART LOG TX port and one NC leading to the LP UART TX port.

CH340CRX to chip TX

The second (pictured below) CH340CTX line through a similar situation to the first, and then connecting these lines to PA8 and the RXD sockets from the dev board outputs to the PA8 and PB2 ports on the chip itself, while both of these lines are pulled high.

CH340CRX to chip RX

There is also a small table with the following text:

R4=0R R9=0R & R8=NC R10=NC Log Tx & Rx OK

R4=NC R9=NC & R8=OR R10=OR AT Tx & Rx OK

I'm assuming this is a way to switch between two differing types of UART but I am confused as to why they all come from the USB-C. Is it just a way of choosing which UART port the USB-C data will be fed into and which can be accessed from the board outputs?

In either case an explanation of the circuits would be extremely helpful. Here is a link to the full datasheet if more context is needed

\$\endgroup\$

2 Answers 2

0
\$\begingroup\$

The first schematic is probably for an the option to connect to a different uart, you populate R10 and depopulate R9 and you connect to a different uart.

The second schematic is unclear as it looks like the VCC pullups are for the same 3.3V rail. Usually this type of diode configuration on outputs or inputs is to ensure the limit of the rail does not go beyond 3.3V+0.7V and adds protection for the micro which has smaller diodes that can be easily overwhelmed by an overvoltage signal that has a lot of current, the external diode keeps it lower than ~4V.

\$\endgroup\$
0
\$\begingroup\$

So the schematics seem to have been just slabbed together from previously used building blocks.

As the CH340 and the MCU are powered from same supply, the 3V3, made from 5V, that is really a bit less than 5V which comes through diode from USB VBUS.

So the mystery diodes and resistors are there to select to which UART on the MCU the CH340 communicates with.

It sounds a bit like there is an ARM CPU based on the pin names. Many of them also have a standard UART peripheral or a few that is/are capable of firmware uploading through factory bootloader, among other features like high speed, FIFOs, DMA, hardware handshaking, IrDA, Smartcard, transmit enable pins etc. They also may have a simpler and lower speed and low power LPUART capable of running while MCU itself is in sleep mode.

So generally you would want the CH340 to connect to the firmware bootloader capable standard UART but this board allows to switch the LPUART to communicate with CH340.

The diodes are rather useless as CH340 is powered from same 3V3 supply as MCU. It may be a leftover from a design where CH340 has 3V3 output, but they do allow other devices to pull the lines low and there is no short circuits or outputs fighting between each other.

\$\endgroup\$

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.