Current version of the OpenAuto Pro is 11
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Unable to use BCM7 as REVERSE switch input
#1
Hello, 

For some strange reason, I am unable to use GPIO 7 as a reverse input. It works fine inside a custom python script, however when set as the reverse switch pin, it does nothing.

It seems that the pinmode is not being set correctly, as it remains high even when set. 

Any pointers?

Many Thanks,
Sam
Reply
#2
Has anyone managed to look into this?

Many Thanks,
Sam
Reply
#3
Yes, it works with our reference setups. GPIO7 is shared with the SPI. Do you use SPI in your setup? How exactly did you connect to the pin?
Reply
#4
(10-08-2020, 09:01 AM)BlueWave Wrote: Yes, it works with our reference setups. GPIO7 is shared with the SPI. Do you use SPI in your setup? How exactly did you connect to the pin?

Yes, I feared it was due to GPIO7 being used as SPI CE1. I am using SPI, although I have the CE1 pin disabled via 
Code:
dtoverlay=spi0-1cs

The pin is connected through an optocoupler. If I write a python script, and set the GPIO up, it works fine, and I can read the state correctly(whilst SPI is enabled).
It seems OAP may not correctly initialise the pin? Have you tested with SPI enabled?

Thanks,

Sam
Reply
#5
Please have a look at this thread https://bluewavestudio.io/community/show...p?tid=2059
Reply
#6
Thanks for that.

Camera view is summonned correctly when selecting rear camera from main menu, or when a different GPIO is selected.

BCM7 is switching correctly when used inside a python script.

Camera view is not being summoned when BCM7 is selected.
Reply
#7
Please have a look at

https://www.raspberrypi.org/forums/viewt...p?t=280687
and
https://github.com/raspberrypi/linux/issues/3749

Isn't it similar to your problem?
Reply
#8
Yes, thats exactly the issue. Thanks for bringing that to my attention.

For anyone else interested, the fix was to add the following line, redirecting the CS1 pin to BCM24 (unused).

dtoverlay=spi0-cs,cs1_pin=24

Thanks again!
Sam
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)