Short version:
Could it be that Robot HAT’s power supply circuit prevents drawing enough current from the USB port on the board?
Long version:
I have PiCarX and have been testing some Python routines without the actual robot assembly (like the “Some projects” at the end of the Robot HAT documentation).
I’m trying to save the battery life by not using it (not connecting it to the Robot HAT).
I also have Raspberry Pi connected to a separate power supply through it own USB C connector.
When I run a short test code driving the two motors it works the first time it is run.
When I run it the second time the motors do not move and Robot HAT enters a weird state where the green LED near the MCU as well as the red battery state LEDs loose brightness.
The Robot HAT MCU does not seem to be frozen as it reacts to Picarx.Reset() command (the green LED blinks 3 times).
Without having RPi powered separately, on that second run it will freeze (obviously because the power supply voltage dips below threshold).
I have 3A power supplies both for the RPi and the Robot HAT, as well as USB cables that can deliver 3A at 5V (tested) - so that is not a problem.
When the battery is connected there are no problems at all.
The only way to exit this state is to power off the HAT via the onboard switch, wait a few seconds and power it back on.
So, could it be that Robot HAT’s power supply circuit prevents drawing enough current from the USB port on the board?