⚠️
Hi there.. thanks for coming to the forums. Exciting news! we’re now in the process of moving to our new forum platform that will offer better functionality and is contained within the main Dialog website. All posts and accounts have been migrated. We’re now accepting traffic on the new forum only - please POST any new threads at//www.xmece.com/support. We’ll be fixing bugs / optimising the searching and tagging over the coming days.
2 posts / 0 new
Last post
ainwood87
Offline
Last seen:2 years 9 months ago
加入:2017-08-21 21:10
UART2 when USB charging

Hi Dialog,

For my project I have configured debug prints to go over UART2, which I normally read using a terminal emulator program like picocom or miniterm.py, using the USB2(DBG) port. I can also read the logs using a USB to TTL adapter connected to P1_3 and P2_3 (default pin mapping for UART2 in most examples).

我想做的是读那些日志using the USB to TTL adapter while I'm charging with USB1(CHG). I'm using a USB to wall adapter to power the board, and the software appears to be functioning, but I'm getting garbage debug prints over UART2. In order to make the software functional, I had to enable this flag in my custom_config:

#define dg_configUSE_USB_CHARGER 1

Is there anything else I need to do to get serial working?

Device:
PM_Dialog
Offline
Last seen:3 days 17 hours ago
Staff
加入:2018-02-08 11:03
Hi ainwood87,

Hi ainwood87,

The problem you see with the UART does not have the root cause in the #define dg_configUSE_USB_CHARGER 1 macro definition.

What happens is that you probably have the VBAT supply at 3V. The external USB to UART TTL adapter usually works with 3.3-3.5V.

This triggers the protection on the pads and caused the problems you report.

When the #define dg_configUSE_USB_CHARGER 1 then when the USB1 is plugged the Charger is pumping the VBAT as it attempts to charge the supposed battery there and this compensates the electrical uneven voltage levels.

When the #define dg_configUSE_USB_CHARGER 0 then the USB supplies the system, but the voltages are still 3V on GPIOs and the GPIOS are going a little crazy.

Solution:

Guessing that you are using the PorDK.

  1. Unplug the ProDK.
  2. Remove the daughterboard.
  3. Plug-in the USB2(DBG)
  4. Move the J13 to position 2-3 (close to DBG-USB).
  5. Adjust the potensiometer until you get >3.5V (e.g 3.8V like if there is a battery connected) on the VBAT pin of the J3.
  6. If you will use the external USB-to-UART-TTL remove the J15 jumpers
  7. unplug the USB2(DBG)
  8. Put back the Daughterboard
  9. Plug-in everything and it will work fine.

Thanks, PM_Dialog