Author Topic: RPi 4 / STM32 / ESP32 / Teensy 4 / RISC-V GAZPACHO  (Read 6495 times)

0 Members and 1 Guest are viewing this topic.

Online james_s

  • Super Contributor
  • ***
  • Posts: 9592
  • Country: us
Re: Raspberry Pi 4
« Reply #50 on: July 10, 2019, 03:51:52 pm »
I've also always hated the USB connector for power. The vast majority of my micro USB power supplies are inadequate and result in unreliable performance. Most of the cables are also insufficient and have too much resistance. I've resorted to soldering on a barrel jack on a pigtail and that has always been rock solid. I have loads of 5V wall warts with standard 2.1mm barrel jacks and I've never had one not work. Wish they'd at least provide pads for something more sensible.
 

Online eugenenine

  • Frequent Contributor
  • **
  • Posts: 786
  • Country: us
Re: Raspberry Pi 4
« Reply #51 on: July 10, 2019, 05:01:33 pm »
The option to power from pins on the GPIO has always been available.
 
The following users thanked this post: Siwastaja

Online NiHaoMike

  • Super Contributor
  • ***
  • Posts: 5613
  • Country: us
  • "Don't turn it on - Take it apart!"
    • Facebook Page
Re: Raspberry Pi 4
« Reply #52 on: July 11, 2019, 02:01:14 am »
I've also always hated the USB connector for power. The vast majority of my micro USB power supplies are inadequate and result in unreliable performance. Most of the cables are also insufficient and have too much resistance. I've resorted to soldering on a barrel jack on a pigtail and that has always been rock solid. I have loads of 5V wall warts with standard 2.1mm barrel jacks and I've never had one not work. Wish they'd at least provide pads for something more sensible.
My experience is that any cable and adapter that works well for charging a modern smartphone will work well for powering a Pi.
Cryptocurrency has taught me to love math and at the same time be baffled by it.

Cryptocurrency lesson 0: Altcoins and Bitcoin are not the same thing.
 

Offline coppice

  • Super Contributor
  • ***
  • Posts: 4720
  • Country: gb
Re: Raspberry Pi 4
« Reply #53 on: July 11, 2019, 07:46:35 pm »
I've also always hated the USB connector for power. The vast majority of my micro USB power supplies are inadequate and result in unreliable performance. Most of the cables are also insufficient and have too much resistance. I've resorted to soldering on a barrel jack on a pigtail and that has always been rock solid. I have loads of 5V wall warts with standard 2.1mm barrel jacks and I've never had one not work. Wish they'd at least provide pads for something more sensible.
My experience is that any cable and adapter that works well for charging a modern smartphone will work well for powering a Pi.
I agree. I've had troubles with USB cables powering a RasPi, but those were cables that wouldn't charge a phone properly. I haven't had any problems when using a USB cable that worked well with a phone. However, if the OP has lots of 5V wall warts around, there no reason not to use them.
 

Offline Berni

  • Super Contributor
  • ***
  • Posts: 2496
  • Country: si
Re: Raspberry Pi 4
« Reply #54 on: July 11, 2019, 08:16:00 pm »
Yeah i have seen WAY too many shitty USB cables that barely have any copper inside of them.

In fact at my day job i had a software guy come over about the product i designed, saying that no matter what he does it just won't charge the battery or it charges it with next to no current. So i hook it up at desk and it charges just fine, so i go over to see his setup and find a suspiciously flexible USB cable, turns out that cable was dropping a whole volt across it as soon as you tried to draw any proper current, so the charging IC inside my device was backing off the current thinking its overloading the charger due to the sagging input voltage.

These are the sort of cables that don't work on a Raspberry Pi and should be burned with there remains burred deep under so that nobody else would have to suffer there shitty performance anymore.
 

Offline coppice

  • Super Contributor
  • ***
  • Posts: 4720
  • Country: gb
Re: Raspberry Pi 4
« Reply #55 on: July 11, 2019, 08:56:52 pm »
Yeah i have seen WAY too many shitty USB cables that barely have any copper inside of them.
A lot of good quality USB cables have serious problems supplying high current because of dirt build up on the contacts. A good spray with switch cleaner frequently improves things greatly.
 

Offline Kjelt

  • Super Contributor
  • ***
  • Posts: 5698
  • Country: nl
Re: Raspberry Pi 4
« Reply #56 on: July 11, 2019, 10:31:23 pm »
It is just NOT a connector I feel comfortable running 2Amps continuously through.
 

Online james_s

  • Super Contributor
  • ***
  • Posts: 9592
  • Country: us
Re: Raspberry Pi 4
« Reply #57 on: July 11, 2019, 10:36:24 pm »
I've never had a smartphone that charges with a regular USB cable and I keep my phones for ~5 years so I don't exactly have a pile of quality micro USB cables laying around. You never really know what you're getting when buying them either until you actually try them.

Whatever the case the USB cable has been my biggest source of aggravation by far with these things. I've always had to either specifically hunt down something reported to work well and buy it, or hack the thing and solder in a standard barrel jack which has worked perfectly every time. It should just have a buck regulator onboard for the 5V as well as 3.3V so it could use any standard 9-12V wall wart which are common as muck and generally quite robust with reasonably heavy cable.

Starting with 5V and expecting to have 5V at the other end of a thin cable with a teeny tiny connector is just asking for trouble.
 

Offline Mr. Scram

  • Super Contributor
  • ***
  • Posts: 8117
  • Country: 00
  • Display aficionado
Re: Raspberry Pi 4
« Reply #58 on: July 11, 2019, 10:40:28 pm »
A lot of chargers don't start with 5V though. They take the drop into account and actually start higher.
 

Offline thm_w

  • Super Contributor
  • ***
  • Posts: 1521
  • Country: ca
Re: Raspberry Pi 4
« Reply #59 on: July 11, 2019, 10:46:01 pm »
The problem with that is someone plugs in a reverse polarized plug, or a 24V+ pack, and boom, warranty claim. It adds cost, complexity, etc. The USB plug was simple and you can't screw it up to the point of killing the Pi.

But agree it didn't work well for me either, I would always see the lightning undervoltage symbol during boot with every usb cable/adapter combo I tried (2.4A adapters, short cables, etc.), maybe thats normal?
 

Online chickenHeadKnob

  • Frequent Contributor
  • **
  • Posts: 816
  • Country: ca
  • doofus programus semi-retiredae
Re: Raspberry Pi 4
« Reply #60 on: July 12, 2019, 02:42:19 am »
--snip---
  with reasonably heavy cable.

Starting with 5V and expecting to have 5V at the other end of a thin cable with a teeny tiny connector is just asking for trouble.

Adafruit sells these; https://www.adafruit.com/product/1995 a 5V 2.5amp rated wart.

They have thicker cables (claimed 20 awg) and boosted voltage.  I seem to remember it used to be 5.15V now I see they claim 5.25V. Anyway I have no trouble powering R Pi's with them  and I have been a happy camper. Who knows what lurks inside the plastic shell, probably the typical horror show.  :scared:

I have never tried with  an R pi hosting a heavy consuming USB device. I would imagine going thru micro usb to power an additional 500 mA usb slave on top of the Pi power consumption dodgy as hell.
 

Offline floobydust

  • Super Contributor
  • ***
  • Posts: 2970
  • Country: ca
Re: Raspberry Pi 4
« Reply #61 on: July 12, 2019, 08:25:39 pm »
RPi 4 "reduced" schematic they got rid of the input polyfuse which always tripped with heavy USB draw on the RPi 3 and earlier. It was annoying always getting <4.8V due to the polyfuse drop with just a mouse and keyboard, I just jumper them.
Now there is only some 1005 10R resistors as fuses for the Vcore LDO.

But no RPi 4 USB schematic given, so who knows if they have anything for the 4 ports or if the USB IC looks after it. I've never had a USB peripheral short-circuit.
 
The following users thanked this post: thm_w

Online james_s

  • Super Contributor
  • ***
  • Posts: 9592
  • Country: us
Re: Raspberry Pi 4
« Reply #62 on: July 12, 2019, 11:00:02 pm »
The problem with that is someone plugs in a reverse polarized plug, or a 24V+ pack, and boom, warranty claim. It adds cost, complexity, etc. The USB plug was simple and you can't screw it up to the point of killing the Pi.

But agree it didn't work well for me either, I would always see the lightning undervoltage symbol during boot with every usb cable/adapter combo I tried (2.4A adapters, short cables, etc.), maybe thats normal?

The same thing happens if someone feeds reverse polarity to the GPIO header or wires the IO pins to 5V peripherals, or any number of other dumb things users are bound to do. You can't make it completely idiot proof, personally I'd rather have simple and reliable power for mine even if it meant a few more noobs blew theirs up, maybe they'd learn to be sensible about polarity and voltage rather than expecting someone else to prevent their mistakes.
 
The following users thanked this post: thm_w, Kjelt

Offline SiliconWizard

  • Super Contributor
  • ***
  • Posts: 3593
  • Country: fr
Re: Raspberry Pi 4
« Reply #63 on: July 13, 2019, 01:14:30 pm »
Keeping the USB connector (makes it easy for many) but adding a dedicated header or maybe even just pads for the power supply, just parallel to the USB VBUS, would have been a good idea. I find powering it through the GPIO headers clunky, error prone (if you put the +5V on a nearby pin, that's probably not going to be pretty) and as I recall, it bypasses any protection (though am I right in having understood that there is not much protection left on the RPi 4 anyway?) Adding a protection against reverse polarity would not have been a big deal either.

 

Offline CJay

  • Super Contributor
  • ***
  • Posts: 3370
  • Country: gb
  • M0UAW
Re: Raspberry Pi 4
« Reply #64 on: July 15, 2019, 05:59:02 am »
Keeping the USB connector (makes it easy for many) but adding a dedicated header or maybe even just pads for the power supply, just parallel to the USB VBUS, would have been a good idea. I find powering it through the GPIO headers clunky, error prone (if you put the +5V on a nearby pin, that's probably not going to be pretty) and as I recall, it bypasses any protection (though am I right in having understood that there is not much protection left on the RPi 4 anyway?) Adding a protection against reverse polarity would not have been a big deal either.

It's a known failure mode

https://hackaday.com/2019/06/12/shorting-pins-on-a-raspberry-pi-is-a-bad-idea-pmic-failures-under-investigation/
M0UAW
 

Offline Berni

  • Super Contributor
  • ***
  • Posts: 2496
  • Country: si
Re: Raspberry Pi 4
« Reply #65 on: July 15, 2019, 08:01:03 am »
Keeping the USB connector (makes it easy for many) but adding a dedicated header or maybe even just pads for the power supply, just parallel to the USB VBUS, would have been a good idea. I find powering it through the GPIO headers clunky, error prone (if you put the +5V on a nearby pin, that's probably not going to be pretty) and as I recall, it bypasses any protection (though am I right in having understood that there is not much protection left on the RPi 4 anyway?) Adding a protection against reverse polarity would not have been a big deal either.

It's a known failure mode

https://hackaday.com/2019/06/12/shorting-pins-on-a-raspberry-pi-is-a-bad-idea-pmic-failures-under-investigation/

This is not only a RaspberryPi thing. A lot of products out there with a 5V and 3V3 rail inside of them can die if the two are shorted together.

The problem is that regulator ICs can only source current and not sink it. So in the case of shorting a 5V and 3V3 rail the 5V regulator just outputs however much current is needed to keep its output at 5V while the 3V3 regulator will start outputting zero current in hopes that that will make its rail fall back down to 3.3V. Because of this the 3V3 rail is dragged up to be 5V too. And as you might guess putting 5V into 3.3V chips is not a good idea.

Tho in practice a lot of 3V3 chips appear to be able to survive being powered with 5V for a short time, but i guess that Raspberry Pi PMIC is not one of them.

For this very reason the high end lab power supplies are made capable of sinking current. It prevents the same thing from happening on a lab PSU by allowing the supply to pull down on its output if it rises too high, this hopefully forces the higher voltage supply into current limiting mode and saves the DUT from being blown up.
 

Online brucehoult

  • Super Contributor
  • ***
  • Posts: 1156
  • Country: nz
  • Currently at SiFive, previously Samsung R&D
Re: Raspberry Pi 4
« Reply #66 on: November 01, 2019, 10:42:04 am »
RPi is an interesting datapoint for the OSHW zealots.     There has never been full schematics and you can't get a CPU manual (easily).   It has always been the darling of the maker community.

Indeed.  But the sad truth is that there aren't the open alternatives there once were.  After TI got out of the high-end applications-processor market the choice has come down to nasty US semi mfgs (Broadcom, Nvidia, ...) and cheap Chinese stuff (Rockchip, Allwinner).  Oddly, I do get the sense sometimes that the Chinese chips are a little more open, but usable documentation is generally lacking.

Maybe RISC-V will save us :-\

Maybe, but any cheapish RISC-V board you see in the next 12-24 months will be around Pi 3+ or Odroid C2 A53 performance. No one has yet even announced anything at A72 levels.

Well, we've announced our A72-level U84 RISC-V core. Of course that means first customer chips are many months away.
 

Online brucehoult

  • Super Contributor
  • ***
  • Posts: 1156
  • Country: nz
  • Currently at SiFive, previously Samsung R&D
Re: Raspberry Pi 4
« Reply #67 on: November 01, 2019, 10:52:36 am »
I wonder if they will finally transition the supported/approved OS to 64-bit?
Still 32 bits. Raspbian Buster needs to be backwards compatible with older pi versions. Raspbian (32 bits) can address up to 4Gb. There is no need to change to 64 bits

One of my own benchmarks I use to compare CPUs shows the same C code running on an Odroid C2 being 22.7% faster when compiled for 64 bit than when compiled for 32 bit. This is a benchmark btw that uses less than 16 KB RAM, so 4 GB is not the issue.

19.500 sec Odroid C2 A53 @ 1536 MHz A64  276 bytes
23.940 sec Odroid C2 A53 @ 1536 MHz T32  204 bytes

Well, I just got a 4 GB Pi4 and tried my benchmark on it:

11.190 sec Pi4 Cortex A72 @ 1.5 GHz T32 Raspbian
11.445 sec Odroid XU4 A15 @ 2 GHz T32
12.190 sec Pi4 Cortex A72 @ 1.5 GHz A64 Ubuntu 64 bit
12.605 sec Pi4 Cortex A72 @ 1.5 GHz A32 Raspbian
30.420 sec Pi3 Cortex A53 @ 1.2 GHz T32
47.910 sec Pi2 Cortex A7 @ 900 MHz T32

So it whomps the Odroid C2 and of course the Pi3 and Pi2, and is very comparable to the A15 running 33% higher clock rate in the Odroid XU4.
 
The following users thanked this post: Mr. Scram

Online brucehoult

  • Super Contributor
  • ***
  • Posts: 1156
  • Country: nz
  • Currently at SiFive, previously Samsung R&D
Re: Raspberry Pi 4
« Reply #68 on: November 01, 2019, 10:53:57 am »
I wonder if they will finally transition the supported/approved OS to 64-bit?
Still 32 bits. Raspbian Buster needs to be backwards compatible with older pi versions. Raspbian (32 bits) can address up to 4Gb. There is no need to change to 64 bits

I installed a 64 bit Ubuntu Server on my Pi4 from here:

https://jamesachambers.com/raspberry-pi-ubuntu-server-18-04-2-installation-guide/
 
The following users thanked this post: HoracioDos

Offline SiliconWizard

  • Super Contributor
  • ***
  • Posts: 3593
  • Country: fr
Re: Raspberry Pi 4
« Reply #69 on: November 01, 2019, 03:48:41 pm »
I don't know enough about this benchmark, but is it assembly-based or pure C? In the latter case, the end result could significantly depend on the C compiler options and versions?
 

Online brucehoult

  • Super Contributor
  • ***
  • Posts: 1156
  • Country: nz
  • Currently at SiFive, previously Samsung R&D
Re: Raspberry Pi 4
« Reply #70 on: November 01, 2019, 08:00:56 pm »
I don't know enough about this benchmark, but is it assembly-based or pure C? In the latter case, the end result could significantly depend on the C compiler options and versions?

It's a simple C benchmark with quite a lot of memory access (L1 cache on bigger systems) and branches that aren't trivially predictable, designed to take long enough to measure on a fast PC, but also fit into the available RAM on a relatively small microcontroller.

http://hoult.org/primes.txt

You're certainly correct that the result is dependent on the compiler quality. I've always used gcc with -O1 as the only option but as I've been using this benchmark for a few years now the generated code does vary a little on the same ISA at different times with different gcc versions.

If something looks 10% faster or slower than something else, it might not be in reality or on other benchmarks. If something loooks twice faster or slower than something else there is probably something to it.
 
The following users thanked this post: Mr. Scram

Offline imo

  • Super Contributor
  • ***
  • Posts: 1968
  • Country: 00
Re: Raspberry Pi 4
« Reply #71 on: November 02, 2019, 11:03:18 am »
FYI - BluePill @72MHz, -O1, gcc, found 3713160 primes

// 927.547 sec BluePill Cortex M3 @ 72 MHz

 :)
 
The following users thanked this post: GeorgeOfTheJungle, Mr. Scram

Online GeorgeOfTheJungle

  • Super Contributor
  • ***
  • Posts: 2018
  • Country: pl
Re: Raspberry Pi 4
« Reply #72 on: November 02, 2019, 12:45:05 pm »
FYI - esp32 @ 240 MHz

3713160 primes found in 261068 ms (with -O1)
« Last Edit: November 14, 2019, 09:34:09 am by GeorgeOfTheJungle »
Even when the experts all agree, they may well be mistaken.
 
The following users thanked this post: Mr. Scram

Offline imo

  • Super Contributor
  • ***
  • Posts: 1968
  • Country: 00
Re: Raspberry Pi 4
« Reply #73 on: November 02, 2019, 04:35:47 pm »
FYI - BlackPill F407 @168MHz, -O1, gcc, found 3713160 primes

// 309.251 sec BlackPill Cortex M4F @ 168 MHz

:)
 
The following users thanked this post: GeorgeOfTheJungle, Mr. Scram

Online GeorgeOfTheJungle

  • Super Contributor
  • ***
  • Posts: 2018
  • Country: pl
Re: Raspberry Pi 4
« Reply #74 on: November 02, 2019, 06:31:21 pm »
FYI - esp8266 @ 160 MHz

3713160 primes found in 306988 ms

:)
« Last Edit: November 14, 2019, 09:34:28 am by GeorgeOfTheJungle »
Even when the experts all agree, they may well be mistaken.
 
The following users thanked this post: Mr. Scram


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf