On Sun, Jul 31, 2016, at 10:44 PM, Charles Steinkuehler wrote:
> On 7/31/2016 9:20 PM, John Kasunich wrote:
> > 
> > 3) I successfully loaded it using input pin 803 (header P8, pin 3)
> > 
> > loadrt hal_bb_gpio input_pins=803
> > 
> > Jul 31 21:39:54 beaglebone msgd:0: hal_lib:522:rt memmapped gpio port 1 to 
> > 0xb66a5000, oe: 0xb66a5134, set: 0xb66a5194, clr: 0xb66a5190
> > Jul 31 21:39:54 beaglebone msgd:0: hal_lib:522:rt pin 3 maps to pin 1-6, 
> > mode 85
> > 
> > Now it gets interesting.
> > I unloaded the driver:
> > 
> > unloadrt hal_bb_gpio
> > 
> > And tried reloading it with the same pin number, just as a 
> > test before moving to a different pin number.
> > 
> > loadrt hal_bb_gpio input_pins=803
> > 
> > this time it didn't work
> > 
> > Jul 31 21:40:25 beaglebone rtapi:0: rtapi_app_main(hal_bb_gpio): -1 
> > Operation not permitted
> > Jul 31 21:40:25 beaglebone msgd:0: hal_lib:522:rt hal_bb_gpio: ERROR: pin 
> > p8.03 is not available as a GPIO.
> > Jul 31 21:40:25 beaglebone msgd:0: rtapi_app:522:user 
> > rtapi_app_main(hal_bb_gpio): -1 Operation not permitted
> > 
> > That error message is printed when the "claimed" field
> > of the pin structure is non-zero.  Those fields are set to
> > zero in beaglebone_gpio.h, and I expected that unloading
> > and reloading the module would reset them...
> > 
> > I completely exited from HAL ("quit" at the halcmd prompt)
> > and then tried again loading multiple pins.  Success.
> 
> This looks like an actual bug...good catch!  Could you open an issue
> on github so it won't get lost?
> 

What is the bug?  "claimed" fields retaining their value
over an unloadrt/loadrt cycle?  Since they are arrays and
are initialized as part of the declaration, I don't see how 
it can be a bug in the driver code.

What about the 0x803 as a control_offset value instead of
a multiple of 4?  That sounds like a typo to me, I've never
seen a chip that had such a break in the pattern of I/O 
addresses.

-- 
  John Kasunich
  [email protected]

-- 
website: http://www.machinekit.io blog: http://blog.machinekit.io github: 
https://github.com/machinekit
--- 
You received this message because you are subscribed to the Google Groups 
"Machinekit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
Visit this group at https://groups.google.com/group/machinekit.
For more options, visit https://groups.google.com/d/optout.

Reply via email to