![]() |
Unable to use BCM7 as REVERSE switch input - Printable Version +- BlueWave Studio forum (https://bluewavestudio.io/community) +-- Forum: OpenAuto Pro (https://bluewavestudio.io/community/forum-86.html) +--- Forum: General (https://bluewavestudio.io/community/forum-81.html) +--- Thread: Unable to use BCM7 as REVERSE switch input (/thread-2081.html) |
Unable to use BCM7 as REVERSE switch input - gecko242 - 10-04-2020 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 RE: Unable to use BCM7 as REVERSE switch input - gecko242 - 10-08-2020 Has anyone managed to look into this? Many Thanks, Sam RE: Unable to use BCM7 as REVERSE switch input - BlueWave - 10-08-2020 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? RE: Unable to use BCM7 as REVERSE switch input - gecko242 - 10-08-2020 (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
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 RE: Unable to use BCM7 as REVERSE switch input - BlueWave - 10-08-2020 Please have a look at this thread https://bluewavestudio.io/community/showthread.php?tid=2059 RE: Unable to use BCM7 as REVERSE switch input - gecko242 - 10-09-2020 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. RE: Unable to use BCM7 as REVERSE switch input - BlueWave - 10-10-2020 Please have a look at https://www.raspberrypi.org/forums/viewtopic.php?t=280687 and https://github.com/raspberrypi/linux/issues/3749 Isn't it similar to your problem? RE: Unable to use BCM7 as REVERSE switch input - gecko242 - 10-10-2020 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 |