RTEMS on Beaglebone Black

Angelo Fraietta newsgroups at smartcontroller.com.au
Tue Jul 28 07:19:14 UTC 2015


I can confirm that the interrupts do work, however, it is on both edges,
not just the rising.
I wanted to see what sort of performance I could get out of the interrupts
by inputting various frequency signals
I modified the code so 13 would toggle every 8 interrupts. It toggled after
four full pulses, therefore it interrupted on both edges (see code at end)

Also, I found that it took 1.3us to service the interrupt (I measured the
time between the edge of interrupt pin and the toggle point of 13). The
beagle is supposed to be 1 1GHz machine. Is there any way I can push faster
than 1.3us with a setting in RTEMS (eg nanoseconds per tick) or is 1.3us my
absolute best?

Thanks


//ISR:
rtems_isr GPIO1_IRQHandler (rtems_vector_number vector)
{
  static int i = 0;

  i++;
  //Toggle other three LEDs here:
  *(unsigned long *)(GPIO1_ADDR+GPIO_DATAOUT) ^= ((1<<22)| (1<<23)
|(1<<24));

  //Clear interrupt:
  //Per AM335x technical reference manual, we can read IRQSTATUS,
  // and then write corresponding bits on IRQSTATUS to clear whichever one
was serviced.
  // in this application it's hard coded to number 12 so I just write that
bit.
  // For some reason writing IRQSTATUS value back to itself doesn't clear
the interrupt.
  unsigned long irqstat = *(unsigned long*)(GPIO1_ADDR + GPIO_IRQSTATUS_1);
  *(unsigned long*)(GPIO1_ADDR + GPIO_IRQSTATUS_1) = (1<<12);

  // we will toggle every
  //*(unsigned long*)(GPIO1_ADDR + GPIO_IRQSTATUS_1) = irqstat;
  if (!(i % 4))
    {
    *(unsigned long *)(GPIO1_ADDR+GPIO_DATAOUT) ^= (1<<13);
    }
}


On Tue, Jul 28, 2015 at 1:54 AM, Steve B <sbattazzo at gmail.com> wrote:

> Hi Angelo,
>
> Here's a handy diagram that shows which ones are which (found on Google
> Images):
> http://cholla.mmto.org/computers/beagle/hardware/pinout1-1024x585.png
>
> GPIO1_12 is connector P8 pin 12. I think I used the adjacent pin (P8 pin
> 11, or GPIO1_13) and installed a jumper wire between the two.
> I think it says so in my comments too but I know that may not exactly jump
> out.
>
> Steve
>
>
> On Sun, Jul 26, 2015 at 6:38 PM, Angelo Fraietta <
> newsgroups at smartcontroller.com.au> wrote:
>
>> Greetings Steve, I have modified your code so the standard task only
>> toggles one LED and the interrupt on GPIO12 should toggle the other 3.
>> However, IO cannot for the life of me find which pin is GPIO12 so I can
>> test on the hardware. I have posted the code with the mods I made at the
>> bottom of this email
>>
>> http://beagleboard.org/support/bone101
>>
>> What physical pin should I be toggling to make it work?
>>
>> Thanks
>>
>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/users/attachments/20150728/0bb114e7/attachment-0002.html>


More information about the users mailing list