BPI-R4 in reboot loop on USB-C power supply

I’ve been using DC jack for the past month or so on my BPI-R4. Excellent performance. No power related issue whatsoever.

In the past few days, I tried out my USB-C power supply. My BPI-R4 entered reboot loops. Reboot happens a minute or two after startup. Before the reboot, the R4 functions normally. I could even SSH into it and poke around.

This issue really puzzled me. Out of blue and the curious me tried unplugging my FTDI adaptor from the debug port today. Hooray. Reboots never happen again. When the FTDI adaptor attached to the debug port, it was not even connected to my PC when reboots happen.

I might find another USB-seridal adaptor to try. But do any R4 owners run into similar issue /w FTDI R232 adaptor ?

if i understand it right reboot only happens with non-ftdi uart connector and usb-c power port?

which uart-connector is it? i guess rootcause is similar to wifi-issues on r3 where non ftdi uart-adapter pulls down/up something related too much

Reboot happens when powered by USB-C + FTDI R232 USB-serial adaptor attached to R4 (need not even connected to PC).

Never had reboots when powered by 12V DC jack + the same FTDI R232 USB-serial adaptor attached to R4.

This FTDI R232 adaptor:

Oh, interesting to know.

ok, then i misunderstood, sorry…then i have no idea why this happens…any logmessage on the uart?

maybe it is some instability on gnd or a pull-up/down issue like r3 (afair it was because uart shared pins with bootstrap pins and prevented the wifi frontend to complete firmware load)…but r3 was working with ftdi, issue was only with non-ftdi

Seems the FTDI R232 adaptor is irrelevant to the issue.

I tested without the FTDI R232 adaptor attached to R4:

  • Powered R4 by 12V DC jack. Start up R4 and run for 5 minutes
  • Power off R4. Unplug 12 DC jack. Plug in USB-C power supply.
  • Start up R4. R4 will reboot itself within 2mins

Though I notice that without the FTDI R232 attached, the reboot loop stops itself quickly. Perhaps only reboot once or twice. Then runs stably.

I suspect it’s another design glitch in BPI R4, just like the RTC battery circuity…

I hope it’s a transient issue of R4 only on swapping sources of power supply …

Anyone wants to look at the schematic to spot the culprit ?

EDIT: for clarity, change ‘switching’ to ‘swapping’

this looks more like the power supply itself needs some time to get stable…or the usb-c regulator is buggy

USB-C power supply is always on. It’s a very high quality one by LG Electronics passed all certification I assume.

Does it negotiate up to 20V? Or perhapse stays at 5V? Can you measure, without causing a shortcircuit ofcourse.

For a couple of euro you can buy a module that you can stick in between psu / board and measures voltage.

Tested a bit more in the past hour. Seems the FTDI R232 adaptor exacerbates the issue to “infinite” reboots. Without the FTDI R232 adaptor attached, reboot happens once or twice then stay stable. But for the first time, I let R4 run on USB-C long enough (>10mins) that R4 will reboot after 10mins being stable…happened once so far.

Also, swapping sources of power supply is irrelevant too. I unplug USB-C. Rest for 5mins. Plug back in USB-C. Reboots happen too.

Without opening up the official case, I can only quickly measure the voltage through the 12V DC jack. In both cases (stable or reboots), the voltage is 17.16V. Is that normal ? Haven’t checked if there is any sort of insulation between USB-C in and 12V DC jack in.

A good excuse for me to get one finally :smiley:

It’s been continuously stable for over two hours now. Really weird issue. Seems mostly happen on unplug & plug in the USB-C cable.

Perhaps I’m using a over-spec’ed USB-C cable. It’s capable of PD 90W + 4K display + USB 3.2 all at the same time…

Let me try with a ‘charging only cable’ on another day…

===

Btw, I did another experiment in the past hour or two. The surprising result of the experiment is guaranteed infinite reboot !!

So here is how to reproduce. Keep the 12V DC jack plugged in on the R4 BUT with main power of its adapter powered off. Now plug in the USB-C cable on the R4. drum roll Infinite reboot. You can reverse the two main steps… same result.

I think it’s convenient to have three power inputs: USB-C, 12DC jack and the white two-pin header on the PCB. But their unintended consequences (sometimes out of users’ stupidity) are also unforeseen…

For example, I just found out a moment ago I could tap 17V from the 5.5*2.1 DC jack to power some external low-power devices. With the main power supply comes from the USB-C. LOL

Running non-stop on USB-C for 13 hours now. So seems the issue is limited to the first few minutes after start-up.

And the ‘root cause’ increasingly looks like a USB-C negotiation issue. From the symptom looks like my USB-C power supply continues to negotiate or re-negotiate in the first few minutes after plug into BPI R4. Voltage drops below threshold and causes the reboots. It’s just like when I plug in a powered-off 12V DC adaptor into the DC jack. It causes a voltage drop that triggers reboots.

I believe a “charging only cable” will mitigate the issue. Unfortunately, I don’t have one on hand to quickly test. It’ll take some days to confirm…

I also looked at USB-C power meters. I recall it was in vogue a few years ago. That was the time when I bought my USB-A power meter. But now look on the market, all seems selling years old design. I check one popular USB-C power meter, its firmware was last updated back in 2020

I also don’t think a ‘cheap’ USB-C power meter will tell me the reason of negotiation issue or the reason of re-negotiation. So likely won’t tell me more info than I already can infer.

Anyway, recommendations of a good & recent design of USB-C power meter are welcome :smiley:

Attach a Fluke multimeter and set it to MIN to catch a voltage dip.

As before, I can only measure through the 12V 5.5*2.1 DC jack (I decided not to open the case to diagnosis just for this issue).

I don’t see a dip below 17V…no dip at all before the reboot. At the beginning of the reboot, sometimes & rare I see the voltage shoots up to 28V momentarily.

My multimeter doesn’t have Min/Max function. Neither I believe it’s time resolution high enough to capture milliseconds change. The LCD alone only updates 4 times per second. LOL

Now this issue become even more weird. After continuously running fine for more than 24hrs on USB-C. I can’t simply reproduce the issue with unplug & plug in the USB-C cable again. I had to cycle through the 12V DC jack power on/ run for a few minutes / power off/ unplug 12V DC adaptor. Then plug in USB-C cable to reproduce the reboot loops.

Whoever solves this riddle should receive a medal from me.

Whoever created this design glitch will get a Nobel Prize from Republic of Banana.

Received my ‘charge only cable’ today. It was manufactured by Luxshare - a big OEM for Apple, Huawei & etc. Support up to 3.3A, plenty for BPI-R4.

With a ‘charge only cable’, BPI-R4 still reboots once or twice on average. The first time plugging in is definitely more than rebooting three times. And then stabilised.

Up to now I think it’s a compatibility issue between BPI-R4 and my USB-C PD charger.

I should have disclosed that my ‘USB-C PD’ charger is the type embedded in a good quality monitor. In this particular case, it’s a LG Ultrafine 4K monitor with a USB-C 90W charger that can charge Apple MacBooks & etc.

Apparently for these chargers the protocol is doing something additional. Perhaps related to support of DisplayPort signal or not. So in this aspect, I would speculate BPI-R4 is not able to cope with.

BTW, I also purchased a new standalone high-quality USB-C PD 90W charger (instead of a USB-C power meter that I’ll perhaps use once or twice). With the original fully-cabled USB-C cable, no reboots issues with BPI-R4.

So I’m pretty convinced it’s a compatibility issue of BPI-R4 with a wide range of USB-C power supply, especially those expecting perhaps a response of support of DisplayPort (aka USB-C alternate mode) or not.

But I guess given the price of BPI-R4, I should have been more generous in terms of testing especially regarding compatibility with respect to a wide range of devices.

Cheers.

So BPI-R4 is using CH224K as USB-C PD negotiation chip. And looks like the circuitry is also one of the chip vendor’s reference design:

I don’t see anything suspicious. The ‘DP’ and ‘DM’ (which is USB 2.0 D+/D- pins) are shorted. And that’s proper setup IF a design doesn’t want USB-A charging which is the case for BPI-R4.

While someone on Reddit assured me that there is nothing extra in the USB-C PD protocol with DisplayPort Alt Mode support, I just found out there is something extra (and of course 'cos it makes sense).

After power supply voltage negotiation is done, the ‘Downstream Facing Port’ (DFP) i.e. the USB-C port on the monitor will proceed with next phrase of negotiation to enable DisplayPort Alt Mode.

And this phrase happens in Sideband Channel, SBU1 & SBU2 pins. I suspect DFP doesn’t get proper response and hence resets itself that in turn resets BPI-R4.

If someone has a monitor with USB-C (charging support), can you test it with BPI-R4 if your BPI-R4 also enters multiple reboots on plugging in the USB-C cable ?

Just for the purpose of SCIENCE.

1 Like

The USB PD protocol does indeed negotiate for the alternate modes but it shouldn’t make the CH224 incompatible as not responding is a valid way to say that the device doesn’t support alternate modes. The SBU have nothing to do with the negotiation they are used for example to carry the auxiliary channel of the DisplayPort connector. What I think is happening is that the 90W of the screen is only accessible in PPS mode and it doesn’t expose the more common 20V 3.25A (65W) or 20V 5A (100W) profiles that the CH224 is trying to get.

I appreciate your response.

CH224 cannot do PPS. It’s all fixed voltages configured through CFG{1,2,3}. My 90W USB-C PD charger (inside the monitor) can provide 20V. CH224 won’t request a particular ampere either.

The reboot issues I saw seems random but usually happen on the following conditions (scattered in my previous responses but summarise here for easier reading):

  • only on initially plugging in the USB-C cable to BPI-R4; or USB-C PD charger goes through a power off/power on cycle
  • about 2mins after startup (so by that time BPI-R4 is running well for ~2mins). The exact timing of reboots seem random. ~2min is more a typical case. I’ve seen as short as 10s or as long as 10mins after startup.

I’ve sorta had some good idea about the suspects of the cause. Would be really good if readers with a monitor having USB-C port (supporting charging) can try to reproduce my issue.

So that I can be sure if the issue is on the side of USB-C charger or the use of CH224 in BPI-R4’s design.