Ticket #484 (Invalid)Sun May 03 16:43:14 UTC 2020
GPIO does not show data for GPIO pins higher than 27
Reported by: | Timo Hartong (2813) | Severity: | Normal |
Part: | Release: | ||
Milestone: | Status | Invalid |
Details by Timo Hartong (2813):
While working on Bluetooth for the Raspberry Pi 3 Model B+ I noticed GPIO_ReadMode only works to gpio pin 27. On the Pi there are more.
Version of RISC-OS : 5.24
Test program used :
10 : FOR pin% = 0 TO 63
11 : SYS “XGPIO_ReadMode”,pin% TO result%
20 : PRINT pin%, result%
21 : NEXT pin%
Changelog:
Modified by Sprow (202) Sun, May 03 2020 - 21:24:01 GMT
There are others on the System On Chip, but they’re not designated for use as GPIO. Therefore, the GPIO module doesn’t offer them to you (eg. they shouldn’t appear in the GPIO_Info pin enumeration).
For example, the GPIO 47 is sometimes the SD card detect and sometimes a status LED, that is the responsibility of the SDIO driver and isn’t offered as GPIO.
The Compute module does track some of the higher pins as GPIO, so would list them.
Modified by Timo Hartong (2813) Mon, May 04 2020 - 10:02:14 GMT
- Status changed from Open to Fixed
Hi Sprow,
Thanks for the explanation. It is not a bug but a feature. I will do gpio 32 / 33 needed for the bluetooth chip in that case myself
Modified by Sprow (202) Mon, May 04 2020 - 20:57:05 GMT
- Status changed from Fixed to Invalid
The best thing to do would be to get a new HAL device type assigned, and have an entry point that does /whatever/ with GPIO 32/33 via a well defined API. That way, on another platform with Bluetooth your main driver will still work, and not try writing to the Pi’s GPIO address!