Ticket #490 (Fixed)Sun Jun 07 21:34:14 UTC 2020
Setting pull-ups on a Raspberry Pi using the GPIO module doesn't work
Reported by: | Dave Higton (1515) | Severity: | Normal |
Part: | Release: | ||
Milestone: | Status | Fixed |
Details by Dave Higton (1515):
I’ve attempted to set pull-ups on GPIO lines 17, 18 and 19 using the GPIO module, but it doesn’t seem to set pull-ups at all. The same code works successfully on a BeagleBoard (using different GPIO lines but that’s the only change). Andrew Conroy reports the same problem.
Changelog:
Modified by Dave Higton (1515) Tue, June 16 2020 - 21:15:14 GMT
The error is in the HAL. In s.GPIO, change line 842 from:
STR a2, [v1, v2]
to:
STR a2, [v1, v4]
v4 contains the offset from the GPIO registers base (v1) to the appropriate pull up/down clock enable register. The offset is computed at lines 814 and 815.
Modified by Sprow (202) Wed, June 17 2020 - 07:26:05 GMT
Any view on line 834? Doesn’t that also want v4 offset rather than v2?
Modified by Dave Higton (1515) Thu, June 18 2020 - 11:02:14 GMT
I agree, I missed one. I’ve deleted my Git branch and submitted a new merge request. Unfortunately I didn’t set an assignee, but I’ve emailed code@
Modified by Jeffrey Lee (213) Mon, June 22 2020 - 23:25:20 GMT
- Status changed from Open to Fixed
Should be fixed with HAL_BCM2835 0.87 (thanks Dave!)