Petergar
Posts: 5
Joined: Sat Jan 25, 2020 3:34 am

pi zero uart pins not configured correctly

Wed Feb 05, 2020 5:25 am

Hi,
I have a gps I wish to connect to a pi zero, using the uart.
It works with a pi zero w, but not with a pi zero.
The zero w is permanently wired to a piece of veroboard, while the zero has a connector attached to a pcb. I want to use the pcb.
I am accessing via /dev/serial0, which uses the PL011 on the zero, rather than the mini uart on the zero w.
Uart configuration is identical in both zeros. (according to termios output).

I have an oscilloscope, and if the gps connects to the pi zero, the transmitted serial signal dies. I double checked this by applying a generated signal to both pins 8 and 10 on the interface, which are supposed to be the uart Txd and Rxd respectively.

Pin 10 (Rxd) kills the generated signal, as if it were configured to be an output, while pin 8 (Txd) does not affect the signal at all, while if it were configured to be an output, it should kill the signal..

The zero w appears to have a bit less power, and the generated signal is only half killed on pin 8 (Txd), while the signal on pin 10 (Rxd) is unchanged, as would be expected.

So I conclude that at least one reason my gps is not working is that the gpio for pin 10 is configured as an output on the zero, when it should be an input.

I am using raspbian lite, dated 26 September 2019, but updated with packages.

Petergar
Posts: 5
Joined: Sat Jan 25, 2020 3:34 am

Re: pi zero uart pins not configured correctly

Thu Feb 06, 2020 11:49 pm

I wrote myself a utility to read the gpio registers (by mapping to /dev/gpiomem) and confirmed that the gpio control register at 7e200004 was being set correctly to 24000, which is ALT1 for each output, which is correct, so not apparently a software problem. The zero W had the register set to 12000, or ALT5 for each output, which is also correct.

I decided to recheck the IO condition without my added circuitry. Unfortunately the results were inconclusive. The pi zero stopped working, and started getting very hot, although 3.3V and 5V levels were satisfactory. It would no longer boot, or even flash its LED. I assume it is defunct. I think I will use a more sophisticated pi with the touchscreen display for my project, so will not be purchasing another zero to recheck my problem.

Thanks for all the views.

Return to “Troubleshooting”