Hello world Ada-example on RaspberryPi

Jan Sommer soja-misc at aries.uberspace.de
Tue Jul 7 18:43:46 UTC 2015


Am Montag, 6. Juli 2015, 13:27:34 schrieb Joel Sherrill:
> 
> Just to make sure the math in the Pi clock driver is OK, it would be
> a good idea to change the microseconds per tick value in the ticker
> sample. If it stays true to running ~30 seconds, then the math is right
> in the driver. If it doesn't remain true to "real world" time, then
> the math in the Pi clock driver may be wrong.
> 

The ticker example all use the classic rtems API where you delay a certain number of ticks (if I am not mistaken).
Anyways I checked out the implementation of gnat for delay until and they use nanosleep.
Based on the posix_examples from examples-v2 I made a short test for nanosleep which tries sleeps for 10s (attached):

The results are: 
If CONFIGURE_MICROSECONDS_PER_TICK is not defined:  sleeps for 10 s.
If  CONFIGURE_MICROSECONDS_PER_TICK = RTEMS_MILLISECONDS_TO_MICROSECONDS(1): sleeps for 100 s
If  CONFIGURE_MICROSECONDS_PER_TICK = RTEMS_MILLISECONDS_TO_MICROSECONDS(10): sleeps for 10 s
If  CONFIGURE_MICROSECONDS_PER_TICK = RTEMS_MILLISECONDS_TO_MICROSECONDS(100): sleeps for 1 s

Where do I find the clock driver for the Pi? I am not sure if it is not too low level for me, but I can take a look.

Cheers,

   Jan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test1.c
Type: text/x-csrc
Size: 1475 bytes
Desc: not available
URL: <http://lists.rtems.org/pipermail/users/attachments/20150707/46aab51b/attachment-0004.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Makefile
Type: text/x-makefile
Size: 457 bytes
Desc: not available
URL: <http://lists.rtems.org/pipermail/users/attachments/20150707/46aab51b/attachment-0005.bin>


More information about the users mailing list