Document number
204911
Version
Rev. K
Issue date
2016-10-11
Sirius Breadboard User Manual
www.aacmicrotec.com
Page
66
of
106
5.10.3. Usage description
5.10.3.1. Send Telemetry
1.
Open the device “/dev/ccsds-tm”, “/dev/ccsds-tc” and “/dev/ccsds”. Set up the TM path
by ioctl-
call CCSDS_SET_TM_CONFIG on device “/dev/ccsds-tm” or ioctl CCSDS_INIT
on device “/dev/ccsds”
2. Enable the different interrupts to be generated by ioctl CCSDS_SET_IE_CONFIG on
device “/dev/ccsds”.
3. Prepare DMA-
descriptors by ioctl CCSDS_SET_DMA_DESC on device “/dev/ccsds-
tm”.
4. Enable DMA by ioctl CCSDS_ENABLE_DMA
5.
Enable TM by ioctl CCSDS_ENABLE_TM on device “/dev/ccsds-tm”.
6. Prepare the content in SDRAM that will be fetched by DMA-transfer by writing to
“/dev/ccsds-tm”
5.10.3.2. Receive Telecommands
1.
Open the device “/dev/ccsds-tm”, “/dev/ccsds-tc” and “/dev/ccsds”. Set up the TC path
by ioctl-
call CCSDS_SET_TC_CONFIG on device “/dev/ccsds-tc” or or ioctl
CCSDS_INIT on device “/dev/ccsds”
2. Enable the different interrupts to be generated by ioctl CCSDS_SET_IE_CONFIG
3.
Do a read from “/dev/ccsds-tc”. This call will block until a new TC has been received.
5.10.3.3. Application configuration
Inclusion of <fcntl.h> and <unistd.h> are required for using the POSIX functions open(),
close(), read(), write() and ioctl() to access the CCSDS device.
Inclusion of <errno.h> is required for retrieving error values on failures.
Inclusion of <bsp/ccsds_rtems.h> is required for data-types, definitions of IOCTL of device
CCSDS.
CONFIGURE_APPLICATION_NEEDS_CCSDS_DRIVER must be defined to use the
CCSDS driver from the application.