Pantilthat and BCM16


#1

Is the HAT doing anything with BCM16?
Is there a schematic for the HAT out there somewhere?

With the HAT attached it appears to be affecting BCM16.
I understand BCM16 by default is pulled low by the chip and left as such as the kernel configures the device tree.
I have BCM16 connected to the base of an NPN via a 1k resistor. The base if pulled low by a 10k resistor.
The NPN turns a relay on and off.
Without the HAT all good - the pin stays low at power-up and operates normally after a GPIO config.
With the HAT, as soon as power is applied, the BCM is pulled up to 2V and the relay closes.
I can config the GPIO as an output and then set low, all good then - but something is not right.
Measuring resistance between BCM16 and GND on the HAT shows 122k - this is with everything disconnected - servos and LEDs.
Hence why I’m asking is BCM16 used for something?
I tried with BCM13 and no issues.
Removing the connection to the NPN and just measuring BCM16 with the HAT - it’s pulled up to 3.3V.

With the HAT installed does this change the device tree set-up, could it change the default setting of BCM pins, from a pull-down input to a pull-up input?
Sorry, pure amateur when it comes to the details of the device tree process.


#2

You can see what pins pan tilt hat uses here

It does not appear to use BCM 16

From my knowledge everything’s controlled put a pic micro controller which you communicate with via i2c

So nothing should happen with bcm 16

Are you running anything else that could be effecting bcm16


#3

BCM 16 is, in fact, the EEPROM Write Protect. We should probably find a way of documenting these on Pinout- since the pin used for WP can vary from board to board.

We use Pi’s to program the EEPROMs on HATs, so the WP pin broken out on the header to avoid needing to make a messy pogo connection.

The WP pin is pulled up to 3.3v via a 1kOhm resistor, which would almost certainly explain your issue.


#4

OK. Thanks gadgetoid. Solved.
Any other BCM GPIOs I should stay clear of?
An update to pinout.xyz would be fantastic and/or adding the schematic of the HAT to GitHub.


#5

I’ve raised an issue against Pinout.xyz, and will look into updating all of our boards with the Write Protect pin. I can’t find any good reason not to. Previously we omitted documenting the EEPROM pins since they were present on all HATs and would just add unnecessary noise to the pinout diagrams.

While you can technically use BCM 0 and 1 as regular GPIOs, you should steer clear of those too in general if you’re using any HAT board on your Pi.