Arduino MKR Zero + ETH Shield, what power supply?

I use Arduino MKR Zero and Arduino MKR ETH Shield. I want to power them from miniusb. What are the required Volts and Amperes?
Now it works when I connect it to my PC usb, but not when I connect it to my phone charger..

Thank you!

Volts is 5. USB is always 5V.

Phone chargers charges battories. Try using a power bank.

Phone chargers charges battories. Try using a power bank.

do you have "while (!Serial);" in setup()?

Yes,

void setup() {

  Serial.begin(9600);
  while (!Serial) {
    ;

  }

hariskar:
Yes,

void setup() {

Serial.begin(9600);
  while (!Serial) {
    ;

}

so, it waits here for the USB connection to computer

Juraj:
do you have "while (!Serial);" in setup()?

It's normal for Arduino with native usb like Leonardo/Pro Micro and various newer Arm-based Zero etc., ie. those that don't need a separate usb->serial adaptor chips.

Railroader:
Phone chargers charges battories. Try using a power bank.

"Phone charger" is just another name for "USB supply" or "5volt power supply"
There is no charging circuit in a "phone charger". The actual charging circuit is inside the phone.

Powerbanks could be more problematic, because they have an internal boost supply that could turn off after a few seconds (as you already know...)
Leo..

@Wawa
Thanks!
You are probably right. I have never tried to use a charger to supply my UNOs. Can You say anything about the difference between an 850 mA, 1A and 2 A charger in the respect of powering low current Arduino projs?
Due to the first topic question I felt "safe"....

Thank you for replies! I removed

while (!Serial) {
    ;

  }

and it works! Till now I prefer powering my Arduinos with usb instead of messing with more little cables and Dupont. Now I power it with 5V, 1A.

Well done! Merry Christmas!

Anything more than 500mA could be overkill, because the Arduino could have a 500mA fuse or a <=500mA backflow protection diode in the USB power line.
Leo…