Document number 205065Version Rev. NIssue date 2019-02-04Sirius OBC and TCM User Manualwww.aacmicrotec.com Page 71 of 1745.7.3. Usage description5.7.3.1. RTEMS5.7.3.2. OverviewThe driver provides SpaceWire link setup and data transaction via the SpaceWire device.Each application that wants to communicate via the SpaceWire device must register with alogical address.Registration to a logical address is performed by calling open with a device name consistingof the predefined string SPWN_DEVICE_0_NAME_PREFIX concatenated with a stringcorresponding to the chosen logical address number.Deregistration is performed via close.Multiple logic addresses may be registered at the same time. But each individual logicaddress may only be registered for read and write once at the same time.Logical addresses between 0 – 31 and 255 are reserved by the ESA’s ECSS SpaceWirestandard [RD2] and cannot be registered to.Note! A reception packet buffer must be aligned to 4 bytes in order to handle the packet’sreception correctly. It is therefore recommended to assign the reception buffer in thefollowing way:uint8_t __attribute__ ((aligned (4)) buf_rx[PACKET_SIZE];5.7.3.3. UsageThe RTEMS driver must be opened before it can be used to access the SpaceWire device.Once opened, all provided RTEMS API operations can be used as described subchapter 0.And, if desired, the access can be closed when not needed.Figure 5-6 – RTEMS driver usage descriptionNote! All calls to RTEMS driver are blocking calls.