On Thu, Dec 31, 2020, 6:03 AM Sebastian Huber < sebastian.hu...@embedded-brains.de> wrote:
> Hello Mattia, > > On 24/12/2020 11:24, Mattia Bottaro wrote: > > I need to develop a multitasking real-time application with RTEMS > > (preferably in Ada, but also C solutions are welcomed). I see that I > > can use the Classic API > > <https://docs.rtems.org/branches/master/c-user/index.html>, but they > > are unsuitable to my purposes. As you can read here > > < > https://docs.rtems.org/branches/master/c-user/task/directives.html#task-wake-when-wake-up-when-specified>, > > > the rtems_task_wake_when directive is too coarse: "The timing > > granularity of this directive is a second.". > > I need to work with microseconds-granularity and I cannot find how to > > do it. > > this limitation is do some implementation constraints which no longer > apply. From an API point of view > > /** > * @ingroup RTEMSAPIClassicTypes > * > * @brief This type represents Classic API calendar times. > */ > typedef struct { > [...] > > /** > * @brief This member contains the clock tick of the second with > values from 0 > * to rtems_clock_get_ticks_per_second() minus one. > */ > uint32_t ticks; > } rtems_time_of_day; > > it would be possible to also specify the clock driver ticks of a time > point. The rtems_task_wake_when() uses _Thread_Timer_insert_realtime() > which uses a time with a nanoseconds resolution. It would be easy to > change the implementation of rtems_task_wake_when() to use the clock > driver ticks. > This could be changed but I believe the original specifications called for second boundary. > > As already mentioned, the clock_nanosleep() provides this functionality > already. > > -- > embedded brains GmbH > Herr Sebastian HUBER > Dornierstr. 4 > 82178 Puchheim > Germany > email: sebastian.hu...@embedded-brains.de > phone: +49-89-18 94 741 - 16 > fax: +49-89-18 94 741 - 08 > > Registergericht: Amtsgericht München > Registernummer: HRB 157899 > Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler > Unsere Datenschutzerklärung finden Sie hier: > https://embedded-brains.de/datenschutzerklaerung/ > > _______________________________________________ > users mailing list > users@rtems.org > http://lists.rtems.org/mailman/listinfo/users
_______________________________________________ users mailing list users@rtems.org http://lists.rtems.org/mailman/listinfo/users