GPIO PRU Example

142 views
Skip to first unread message

Anton Nikiforov

unread,
Oct 15, 2018, 4:01:29 PM10/15/18
to BeagleBoard
Trying to load some examples for blinking LED i got 2 different types of code for it:
1. 
While (1) {
   __R30
|= (1 << R30_out_bit );
   delay(10000000);
   __R30 &= ~(1 << R30_out_bit );
}

R30_out_bit = 0 (P8_45 pin)

2.
while(1) {
   __R30
^= 0x000F;
   delay
(10000000);
}

What the difference beetwen these two and why the first one dosen't working properly (no blinking at all)?   

Robert Nelson

unread,
Oct 15, 2018, 4:06:00 PM10/15/18
to Beagle Board, Anton Nikiforov
In your mind, unroll your first while loop, you'll then see what's happening..

Put a 2nd delay after the 2nd out_bit statement..

Regards,

--
Robert Nelson
https://rcn-ee.com/

Anton Nikiforov

unread,
Oct 19, 2018, 11:38:10 AM10/19/18
to BeagleBoard
Thank's a lot, now it's working properly.

понедельник, 15 октября 2018 г., 23:06:00 UTC+3 пользователь RobertCNelson написал:
Reply all
Reply to author
Forward
0 new messages