GPIO API, rtems_semaphore_obtain fails

Steve B sbattazzo at gmail.com
Fri Oct 30 22:38:38 UTC 2015


On Fri, Oct 30, 2015 at 3:25 PM, Steve B <sbattazzo at gmail.com> wrote:

>
> Hi guys,
>
> I've gotten around to updating my rtems src from the git repo, to a new
> version that includes the GPIO API commit and the Beaglebone Black BSP work
> contributed by Ketul Shah.
>
> I'm trying to simply do
>
> sc = rtems_gpio_request_pin(LED1, DIGITAL_OUTPUT, false, false, NULL);
> assert(sc == RTEMS_SUCCESSFUL);
>
> And at runtime I see:
>
> assertion "rtems_semaphore_obtain(gpio_bank_state[bank].lock, RTEMS_WAIT,
> RTEMS_NO_TIMEOUT ) == RTEMS_SUCCESSFUL" failed: file
> "../../../../../../../../rtems-src/c/src/lib/libbsp/arm/beagle/../../shared/gpio.c",
> line 1319, function: rtems_gpio_request_pin
>
> I have called rtems_gpio_initialize() which I see is the function that
> creates gpio_bank_state[bank].lock and this has returned RTEMS_SUCCESSFUL
> before the above error happens.
> I have also tried this on both Rev B and Rev C Beaglebone Black hardware,
> with the same result.
>
> Any thoughts on what might cause this?
>
> Steve
>

Disregard that, it's now solved!
I just needed to define a value for CONFIGURE_MAXIMUM_SEMAPHORES at the
bottom of my init.c and my program now runs.

Steve
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/users/attachments/20151030/8d40b7a4/attachment-0002.html>


More information about the users mailing list