AAC Microtec Sirius TCM User Manual

Hide thumbs Also See for Sirius TCM:
Table of Contents

Advertisement

Quick Links

Sirius OBC and TCM User Manual
ÅAC Microtec AB owns the copyright of this document which is supplied in confidence and which shall
not be used for any purpose other than for which it is supplied and shall not in whole or in part be
reproduced, copied, or communicated to any person without written permission from the owner.
Rev. N
© ÅAC Microtec 2016-2019
www.aacmicrotec.com
Document number
205065
Version
Rev. N
Issue date
2019-02-04
Sirius OBC and TCM User Manual
Page 1 of 174

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the Sirius TCM and is the answer not in the manual?

Questions and answers

Summary of Contents for AAC Microtec Sirius TCM

  • Page 1 Document number 205065 Version Rev. N Issue date 2019-02-04 Sirius OBC and TCM User Manual Sirius OBC and TCM User Manual Rev. N © ÅAC Microtec 2016-2019 ÅAC Microtec AB owns the copyright of this document which is supplied in confidence and which shall not be used for any purpose other than for which it is supplied and shall not in whole or in part be reproduced, copied, or communicated to any person without written permission from the owner.
  • Page 2 2017-04-18 Release with updates to the following sections: • CCSDS (new API) • Sirius TCM (new timesync API, NVRAM table updated, new segment sizing for partitions) 2017-10-31 Release with updates to the following sections: • Fault tolerant design (new section) •...
  • Page 3 NVRAM (safe/update area address corrections) • Sirius TCM-S (bit error correction information for telecommands) 2019-02-01 Release with updates to the following sections: • Sirius TCM (noted possible pointer reset to address 0 on massmem handler recovery) www.aacmicrotec.com Page 3 of 174...
  • Page 4: Table Of Contents

    Document number 205065 Version Rev. N Issue date 2019-02-04 Sirius OBC and TCM User Manual TABLE OF CONTENT 1. INTRODUCTION ....................... 9 1.1. Applicable releases ............................9 1.2. Intended users ..............................9 1.3. Getting support ............................... 9 1.4. Reference documents ..........................10 2.
  • Page 5 5.12.3. RTEMS API ............................99 5.12.4. Usage description ..........................104 5.12.5. Debug detect ............................106 5.12.6. Limitations ............................106 6. SPACEWIRE ROUTER ....................107 7. SIRIUS TCM........................108 7.1. Description ..............................108 7.2. Block diagram ............................. 109 7.3. TCM-S application overview ........................109 www.aacmicrotec.com...
  • Page 6 Document number 205065 Version Rev. N Issue date 2019-02-04 Sirius OBC and TCM User Manual 7.4. Configuration .............................. 110 7.4.1. Creating and writing a new configuration ....................114 7.4.2. Fallback NVRAM parameters ......................... 115 7.5. Telemetry ..............................117 7.6. Telecommands ............................117 7.6.1.
  • Page 7 Document number 205065 Version Rev. N Issue date 2019-02-04 Sirius OBC and TCM User Manual 9.4.1. int32_t swu_init(…) ..........................155 9.4.2. int32_t swu_segment_add(…) ....................... 155 9.4.3. int32_t swu_check(…) ..........................156 9.4.4. int32_t swu_update(…) .......................... 156 9.4.5. int32_t swu_flash_check(…) ........................157 9.5.
  • Page 8 Document number 205065 Version Rev. N Issue date 2019-02-04 Sirius OBC and TCM User Manual 12. MECHANICAL DATA ....................172 13. GLOSSARY ......................... 173 www.aacmicrotec.com Page 8 of 174...
  • Page 9: Introduction

    This manual describes the functionality and usage of the ÅAC Sirius OBC and Sirius TCM products. The Sirius OBC or Sirius TCM differ in certain areas such as the SoC, interfaces etc. but can mostly be described with the same functionality and will throughout this document be referred to as “the Sirius products”...
  • Page 10: Reference Documents

    CCSDS 132.0-B-2 TM Space Data Link Protocol CCSDS 232.0-B-2 TC Space Data Link Protocol 205088 Sirius OBC electrical and RD10 mechanical ICD Sirius TCM electrical and RD11 205089 mechanical ICD Electrostatics - Part 5-1: Protection of electronic SS-EN 61340-5-1 RD12...
  • Page 11: Equipment Information

    Sirius OBC and TCM User Manual 2. Equipment information The Sirius OBC and Sirius TCM products are depicted in Figure 3-1 and Figure 3-2. In addition to the external interfaces, the Sirius products also include both a debugger interface for downloading and debugging software applications and a JTAG interface for programming the FPGA during manufacturing.
  • Page 12: Fault Tolerant Design

    Figure 2-1 - The Sirius OBC / Sirius TCM SoC Overview 2.2. Fault tolerant design The Sirius OBC and Sirius TCM are both fault tolerant by design to withstand the environmental loads that the modules are subjected to when used in space applications.
  • Page 13 Document number 205065 Version Rev. N Issue date 2019-02-04 Sirius OBC and TCM User Manual • All software stored in boot flash is, in addition to the EDAC protection of the flash data, encoded with a header for checksum and length. Each boot image is stored in three copies to allow for an automatic fallback option if the ECC and/or length check fails on one copy.
  • Page 14: Setup And Operation

    Document number 205065 Version Rev. N Issue date 2019-02-04 Sirius OBC and TCM User Manual 3. Setup and operation 3.1. User prerequisites The following hardware and software is needed for the setup and operation of the Sirius products. PC computer •...
  • Page 15: Connecting Cables To The Sirius Products

    JTAG-RTL TRX2-LVDS DEBUG-SW TRX1-RS422 UMBI PULSE SPW1 DIGITAL SPW2 Figure 3-2 - ÅAC Sirius TCM with connector naming • All products and ingoing material shall be handled with care to prevent damage of any kind. www.aacmicrotec.com Page 15 of 174...
  • Page 16: Installation Of Toolchain

    The ÅAC debugger is mainly used for development of custom software for the Sirius OBC or Sirius TCM and has both a debug UART for monitoring and a JTAG interface for debug capabilities. It is also used for programming an image to the system flash memory.
  • Page 17: Installing The Board Support Package (Bsp)

    The BSP can be downloaded from http://repo.aacmicrotec.com/bsp. Simply extract the tarball aac-or1k-xxx-x-bsp-y.tar.bz2 to a directory of your choice (xxx-x depends on your intended hardware target - Sirius OBC or Sirius TCM and y matches the current version number of that BSP). The newly created directory aac-or1k-xxx-x-bsp now contains the drivers for both bare-metal applications and RTEMS.
  • Page 18: Setup A Serial Terminal To The Device Debug Uart

    Document number 205065 Version Rev. N Issue date 2019-02-04 Sirius OBC and TCM User Manual Start the run_aac_debugger.sh script from a terminal. If the printed message is according to Figure 3-3, the connection is working. Figure 3-3 - Successful OpenOCD connection to the Sirius products The line target state: halted must be displayed in the output, otherwise the OpenOCD connection has failed and the...
  • Page 19: Loading An Application

    [363062.058152] usb 1-1.3.3.3: New USB device found, idVendor=0403, idProduct=6010 [363062.058176] usb 1-1.3.3.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [363062.058194] usb 1-1.3.3.3: Product: JTAG Debugger [363062.058207] usb 1-1.3.3.3: Manufacturer: AAC Microtec [363062.058220] usb 1-1.3.3.3: SerialNumber: FTZ7QCMF www.aacmicrotec.com Page 19 of 174...
  • Page 20: Programming An Application (Boot Image) To System Flash

    Document number 205065 Version Rev. N Issue date 2019-02-04 Sirius OBC and TCM User Manual where is the serial number for the debugger. FTZ7QCMF The GDB, telnet and TCL ports must be set to a unique value in the Linux user-available range 1025-65535, the defaults are GDB: 50001, telnet: 4444, TCL: 6666.
  • Page 21: Re-Initialising The Nvram

    Document number 205065 Version Rev. N Issue date 2019-02-04 Sirius OBC and TCM User Manual 3.7. Re-initialising the NVRAM In some situations, it may be desirable to clear and re-initialise the NVRAM from scratch, for example if a test application has written data to the NVRAM which does not match the expected format for the system flash bad block table.
  • Page 22: Rtems Step-By-Step Compilation

    Document number 205065 Version Rev. N Issue date 2019-02-04 Sirius OBC and TCM User Manual The toolchain (see chapter 3.3) provides RTEMS development tools with the or1k-aac- rtems4.11-* prefix, and the BSP provides drivers with the *_rtems.h postfix for use with RTEMS.
  • Page 23: Software Disclaimer Of Warranty

    Document number 205065 Version Rev. N Issue date 2019-02-04 Sirius OBC and TCM User Manual The RTEMS BSP can be compiled without debug output by replacing the command in make step 2. above with instead: make clean make BSP_AAC_DISABLE_DEBUG_OUTPUT=y (The command is only required if the BSP has previously been compiled with make clean a different configuraition.)
  • Page 24 Document number 205065 Version Rev. N Issue date 2019-02-04 Sirius OBC and TCM User Manual www.aacmicrotec.com Page 24 of 174...
  • Page 25: Watchdog

    Document number 205065 Version Rev. N Issue date 2019-02-04 Sirius OBC and TCM User Manual 5.2. Watchdog 5.2.1. Description This section describes the driver as one utility for accessing the watchdog device. 5.2.2. RTEMS API This API represents the driver interface from a user application’s perspective for the RTEMS driver.
  • Page 26: Usage Description

    Document number 205065 Version Rev. N Issue date 2019-02-04 Sirius OBC and TCM User Manual 5.2.2.3. ssize_t write(…) Any data is accepted as a watchdog kick. Argument name Type Direction Description File descriptor received at open void * Character buffer to read data from nbytes size_t Number of bytes to write...
  • Page 27 Document number 205065 Version Rev. N Issue date 2019-02-04 Sirius OBC and TCM User Manual Figure 2 – RTEMS driver usage description All calls to RTEMS driver are blocking calls. 5.2.3.2. RTEMS application example In order to use the watchdog driver on the RTEMS environment, the following code structure is suggested to be used: www.aacmicrotec.com Page 27 of 174...
  • Page 28 Document number 205065 Version Rev. N Issue date 2019-02-04 Sirius OBC and TCM User Manual #include <bsp.h> #include <fcntl.h> #include <unistd.h> #include <errno.h> #include <bsp/wdt_rtems.h> #define CONFIGURE_APPLICATION_NEEDS_WDT_DRIVER #define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER #define CONFIGURE_MAXIMUM_DRIVERS #define CONFIGURE_MAXIMUM_TASKS 2 /* Idle & Init */ #define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS 1 #define CONFIGURE_RTEMS_INIT_TASKS_TABLE #define CONFIGURE_INIT #include <bsp/bsp_confdefs.h>...
  • Page 29: Error Manager

    Document number 205065 Version Rev. N Issue date 2019-02-04 Sirius OBC and TCM User Manual 5.3. Error Manager 5.3.1. Description The error manager driver is a software abstraction layer meant to simplify the usage of the error manager for the application writer. This section describes the driver as one utility for accessing the error manager device 5.3.2.
  • Page 30 Document number 205065 Version Rev. N Issue date 2019-02-04 Sirius OBC and TCM User Manual Return value Description Device closed successfully 5.3.2.3. int ioctl(…) Ioctl allows for disabling/enabling functionality of the error manager, setting of the timeout and reading out counter values. Argument name Type Direction...
  • Page 31 Document number 205065 Version Rev. N Issue date 2019-02-04 Sirius OBC and TCM User Manual ERRMAN_GET_SYS_SINGLE_ERRCNT_IOCTL Gets the system flash single error (correctable) error count. This register is 4 bit wide and will wrap upon overflow. ERRMAN_GET_SYS_MULTI_ERRCNT_IOCTL Gets the system flash multiple error (un-correctable) error count.
  • Page 32 Document number 205065 Version Rev. N Issue date 2019-02-04 Sirius OBC and TCM User Manual 5.3.2.3.1. Status register Bit position Name Direction Description 31:12 RESERVED ERRMAN_PULSEFLG Pulse command flag bit is set. Clear flag by write a ‘1’ ERRMAN_POWFLG The power loss signal has been set. ERRMAN_MEMCLR The memory cleared signal is set from the scrubber unit function from the memory...
  • Page 33 Document number 205065 Version Rev. N Issue date 2019-02-04 Sirius OBC and TCM User Manual ERRMAN_MEOFLG Carry flag set when RAM EDAC multiple other error counter overflow has occurred ‘0’ – No CF set ‘1’ – Counter overflow(Cleared by write ‘1’) ERRMAN_SEOFLG Carry flag set when RAM EDAC single...
  • Page 34: Usage

    Document number 205065 Version Rev. N Issue date 2019-02-04 Sirius OBC and TCM User Manual ERRMAN_MECRICNT SDRAM EDAC multiple error counter for critical errors Return value Description Command executed successfully See errno values errno values RTEMS_NOT_DEFINED Invalid IOCTL INVAL Invalid value supplied to IOCTL 5.3.3.
  • Page 35: Limitations

    Document number 205065 Version Rev. N Issue date 2019-02-04 Sirius OBC and TCM User Manual 5.3.3.2. RTEMS application example In order to use the error manager driver on RTEMS environment, the following code structure is suggested to be used: #include <bsp.h> #include <fcntl.h>...
  • Page 36: Scet

    Document number 205065 Version Rev. N Issue date 2019-02-04 Sirius OBC and TCM User Manual 5.4. SCET 5.4.1. Description The main purpose of the SCET IP and driver is to track the time since power on and to act as a source of timestamps. The SCET has also been enhanced with General purpose triggers and PPS signaling.
  • Page 37: Rtems Api

    Document number 205065 Version Rev. N Issue date 2019-02-04 Sirius OBC and TCM User Manual To differentiate between the uses of the PPS signal synchronization methods, the SCET can be said to operate in a number of different modes: Free-running, Master, Master with time synchronization and Slave.
  • Page 38 Document number 205065 Version Rev. N Issue date 2019-02-04 Sirius OBC and TCM User Manual 5.4.4.1. Function int open(…) Opens access to the driver. The device driver allows multiple readers but only one writer at a time. Argument name Type Direction Description filename...
  • Page 39 Document number 205065 Version Rev. N Issue date 2019-02-04 Sirius OBC and TCM User Manual count size_t Number of bytes to read, must be set to 6. Return value Description >=0 Number of bytes that were read. See errno values errno values EBADF File descriptor not opened for...
  • Page 40 Document number 205065 Version Rev. N Issue date 2019-02-04 Sirius OBC and TCM User Manual Argument name Type Direction Description File descriptor received at open Command to send uint32_t Data according to the specific command. Command table Description SCET_SET_PPS_SOURCE_IOCTL Input value sets the PPS source. 0 = External PPS source 1 = Internal PPS source (default) SCET_GET_PPS_SOURCE_IOCTL...
  • Page 41 Document number 205065 Version Rev. N Issue date 2019-02-04 Sirius OBC and TCM User Manual SCET_GET_GP_TRIGGER_LEVEL_IOCTL Returns the currently configured level of the all GP triggers as a bit field: Bit 0 is trigger 0, Bit N is trigger N, Bit 7 is trigger 7.
  • Page 42: Usage Description

    Document number 205065 Version Rev. N Issue date 2019-02-04 Sirius OBC and TCM User Manual Return value Description >=0 Data returned from get commands, or 0 for success in other cases See errno values errno values EBADF File descriptor not opened for writing EINVAL Invalid value for command, or...
  • Page 43 Document number 205065 Version Rev. N Issue date 2019-02-04 Sirius OBC and TCM User Manual If the PPS threshold is configured to 65535 (max value) all incoming PPS are deemed acceptable. Lost events will not be detected at all. 5.4.5.3. Event callback via message queue The SCET driver exposes message queues for event messaging from the driver to the application.
  • Page 44 Document number 205065 Version Rev. N Issue date 2019-02-04 Sirius OBC and TCM User Manual #include <bsp.h> #include <fcntl.h> #include <unistd.h> #include <errno.h> #include <assert.h> #include <bsp/scet_rtems.h> #define CONFIGURE_APPLICATION_NEEDS_SCET_DRIVER #define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER #define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS 30 #define CONFIGURE_MAXIMUM_DRIVERS 10 #define CONFIGURE_RTEMS_INIT_TASKS_TABLE #define CONFIGURE_MAXIMUM_TASKS 20 #define CONFIGURE_MAXIMUM_MESSAGE_QUEUES 20 #define CONFIGURE_INIT #include <bsp/bsp_confdefs.h>...
  • Page 45: Limitations

    Document number 205065 Version Rev. N Issue date 2019-02-04 Sirius OBC and TCM User Manual secs_to_adjust, subsecs_to_adjust); memcpy(write_buffer, &secs_to_adjust, sizeof(uint32_t)); memcpy(write_buffer + sizeof(uint32_t), &subsecs_to_adjust, sizeof(uint16_t)); result = write(scet_fd, write_buffer, 6); assert(result == 6); result = read(scet_fd, read_buffer, 6); assert(result == 6); memcpy(&new_seconds, read_buffer, sizeof(uint32_t));...
  • Page 46: Uart

    Document number 205065 Version Rev. N Issue date 2019-02-04 Sirius OBC and TCM User Manual 5.5. UART 5.5.1. Description This driver is using the de facto standard interface for a 16550D UART given in [RD5] and as such has an 8-bit interface, but has been expanded to provide a faster and more delay- tolerant implementation.
  • Page 47: Document Number

    Document number 205065 Version Rev. N Issue date 2019-02-04 Sirius OBC and TCM User Manual O_RDWR Open for reading and writing. Return value Description A file descriptor for the device on success See errno values errno values ENODEV Device does not exist EALREADY Device is already open Failed to obtain internal...
  • Page 48 Document number 205065 Version Rev. N Issue date 2019-02-04 Sirius OBC and TCM User Manual 5.5.2.3. Function ssize_t read(…) Read data from the UART. The call blocks until data is received from the UART RX FIFO. Please note that it is not uncommon for the read call to return less data than requested. Argument name Type Direction...
  • Page 49 Document number 205065 Version Rev. N Issue date 2019-02-04 Sirius OBC and TCM User Manual 5.5.2.5. Function int ioctl(…) Ioctl allows for toggling the RS422/RS485/Loopback mode and setting the baud rate. RS422/RS485 mode selection is not applicable for safe bus and power ctrl UARTs. Argument name Type Direction...
  • Page 50: Usage Description

    Document number 205065 Version Rev. N Issue date 2019-02-04 Sirius OBC and TCM User Manual UART_IOCTL_SET_TRIGGER_LEVEL uint32_t Set the RX FIFO trigger level. Possible values: UART_TRIGGER_LEVEL_1 = 1 character UART_TRIGGER_LEVEL_4 = 1/4 full UART_TRIGGER_LEVEL_8 = 1/2 full UART_TRIGGER_LEVEL_14 = buffer_depth - 2 (default) UART_IOCTL_GET_TRIGGER_LEVEL uint32_t* Get the current trigger level...
  • Page 51: Limitations

    Document number 205065 Version Rev. N Issue date 2019-02-04 Sirius OBC and TCM User Manual #include <bsp.h> #include <fcntl.h> #include <unistd.h> #include <errno.h> #include <bsp/uart_rtems.h> #define CONFIGURE_APPLICATION_NEEDS_UART_DRIVER #define CONFIGURE_SEMAPHORES 40 #include <bsp/bsp_confdefs.h> #include <rtems/confdefs.h> #define CONFIGURE_INIT rtems_task Init (rtems_task_argument argument); rtems_task Init (rtems_task_argument ignored){} Inclusion of <fcntl.h>...
  • Page 52: Data Structures

    Document number 205065 Version Rev. N Issue date 2019-02-04 Sirius OBC and TCM User Manual 5.6.2. Data Structures 5.6.2.1. Struct massmem_cid_t This struct is used as the target for reading the mass memory chip IDs. The byte array constants massmem_cid_MT29F32G08AFABA and massmem_cid_MT29F64G08AFAAA are provided as chip id references for the possible chip types.
  • Page 53: Rtems Api

    Document number 205065 Version Rev. N Issue date 2019-02-04 Sirius OBC and TCM User Manual Type Name Purpose uint32_t page_num What page to write uint8_t * data_buf Pointer to data to write uint32_t size Size of data to write in bytes massmem_error_injection_t * error_injection Pointer to error injection struct.
  • Page 54 Document number 205065 Version Rev. N Issue date 2019-02-04 Sirius OBC and TCM User Manual 5.6.3.2. int close(…) Closes access to the device. Argument name Type Direction Description File descriptor received at open. Return value Description Device closed successfully see errno values errno values EBADF The file descriptor fd is not an...
  • Page 55 Document number 205065 Version Rev. N Issue date 2019-02-04 Sirius OBC and TCM User Manual 5.6.3.4. ssize_t read(…) Reads requested size of bytes from the device starting from the offset set in lseek. Note! For iterative read operations, lseek must be called to set page offset before each read operation.
  • Page 56 Document number 205065 Version Rev. N Issue date 2019-02-04 Sirius OBC and TCM User Manual Return value Description >0 Number of bytes that were written. see errno values errno values EBADF The file descriptor fd is not an open file descriptor EINVAL Page offset set in lseek is out of range or nbytes is too large...
  • Page 57 Document number 205065 Version Rev. N Issue date 2019-02-04 Sirius OBC and TCM User Manual 5.6.3.6.1. Reset mass memory device Resets the mass memory device. Command Value type Direction Description MASSMEM_IO_RESET 5.6.3.6.2. Read status data Reads the status register value. Command Value type Direction...
  • Page 58 Document number 205065 Version Rev. N Issue date 2019-02-04 Sirius OBC and TCM User Manual Return value Description -EINVAL The block number is out of range -EIO Failed to erase block. Block should be marked as a bad block 5.6.3.6.7. Read spare area Reads the spare area with given data.
  • Page 59 Document number 205065 Version Rev. N Issue date 2019-02-04 Sirius OBC and TCM User Manual Return value Description -EINVAL Indicates one or more of: • The page number is out of range • Size is 0 • Size + offset is larger than spare area size •...
  • Page 60 Document number 205065 Version Rev. N Issue date 2019-02-04 Sirius OBC and TCM User Manual Return value Description -EINVAL Indicates one or more of: • The page number is out of range • Size is 0 • Size is larger than page size •...
  • Page 61: Usage Description

    Document number 205065 Version Rev. N Issue date 2019-02-04 Sirius OBC and TCM User Manual This is provided in order to support the runtime-determined size usage mode, see 5.6.4.5. Command Value Direction Description type Pointer to variable in which the available spare MASSMEM_IO_GET_SPARE_AREA_BYTES uint32_t* area size in bytes is to be stored.
  • Page 62 Document number 205065 Version Rev. N Issue date 2019-02-04 Sirius OBC and TCM User Manual Figure 5 – RTEMS driver usage description Note! All calls to RTEMS driver are blocking calls. In order to support different chip types with different size characteristics, two separate modes of usage are available for determining the page size: 5.6.4.4.
  • Page 63 Document number 205065 Version Rev. N Issue date 2019-02-04 Sirius OBC and TCM User Manual 5.6.4.5. Runtime-determined size usage mode This usage mode allows support for differing page sizes at runtime, and defines MASSMEM_PAGE_BYTES_MAX and MASSMEM_SPARE_AREA_BYTES_MAX for use at compile time, when the sizes are not yet known. At runtime, the available page and spare area sizes will be accessible via the MASSMEM_IO_GET_PAGE_BYTES and MASSMEM_IO_GET_SPARE_AREA_BYTES ioctl() commands.
  • Page 64 Document number 205065 Version Rev. N Issue date 2019-02-04 Sirius OBC and TCM User Manual In order to use the mass memory flash driver in RTEMS environment with the runtime- determined size usage mode, the following code structure is suggested to be used: #include <bsp.h>...
  • Page 65: Error Injection

    Document number 205065 Version Rev. N Issue date 2019-02-04 Sirius OBC and TCM User Manual 5.6.5. Error injection Error injection is used to verify the EDAC capabilities of the IP. The IP always writes/reads 8 32-bit data words. If less or an uneven amount of data is requested from the application the drivers pads this internally.
  • Page 66: Spacewire

    Document number 205065 Version Rev. N Issue date 2019-02-04 Sirius OBC and TCM User Manual 5.7. Spacewire 5.7.1. Description This section describes the SpaceWire driver’s design and usability. 5.7.2. RTEMS API This API represents the driver interface from a user application’s perspective for the RTEMS driver.
  • Page 67 Document number 205065 Version Rev. N Issue date 2019-02-04 Sirius OBC and TCM User Manual Table 5-5 - Open flag symbols Symbol Description O_RDONLY Open for reading only O_WRONLY Open writing only O_RDWR Open for reading and writing 5.7.2.2. int close(…) Deregisters the device name from data transactions.
  • Page 68 Document number 205065 Version Rev. N Issue date 2019-02-04 Sirius OBC and TCM User Manual Return value Description >0 Received size of the actual packet. Can be less than nbytes. Packet size is 0, or buffer size was lower than received packet size, with errno value is set to EOVERFLOW.
  • Page 69 Document number 205065 Version Rev. N Issue date 2019-02-04 Sirius OBC and TCM User Manual errno values EBADF The file descriptor fd is not an open file descriptor. EINVAL Packet size is larger than SPWN_MAX_PACKET_SIZE. EBUSY Transmission already in progress. ETIMEDOUT Failed to transmit the complete packet.
  • Page 70 Document number 205065 Version Rev. N Issue date 2019-02-04 Sirius OBC and TCM User Manual EBADF The file descriptor fd is not an open file descriptor. EINVAL Invalid command, or invalid mode value. www.aacmicrotec.com Page 70 of 174...
  • Page 71: Usage Description

    Document number 205065 Version Rev. N Issue date 2019-02-04 Sirius OBC and TCM User Manual 5.7.3. Usage description 5.7.3.1. RTEMS 5.7.3.2. Overview The 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 a logical address.
  • Page 72 Document number 205065 Version Rev. N Issue date 2019-02-04 Sirius OBC and TCM User Manual Note! The data rate depends on the packet size and the transmission rate of the SpaceWire IP core. The larger the packet size, the higher the data rate. 5.7.3.4.
  • Page 73: Gpio

    Document number 205065 Version Rev. N Issue date 2019-02-04 Sirius OBC and TCM User Manual 5.8. GPIO 5.8.1. Description This driver software for the GPIO IP handles the setting and reading of general purpose input/output pins. It implements the standard set of device file operations according to [RD7]. The GPIO IP has, apart from logical pin and input/output operations, also a number of other features.
  • Page 74 Document number 205065 Version Rev. N Issue date 2019-02-04 Sirius OBC and TCM User Manual Argument name Type Direction Description pathname const char * The absolute path to the GPIO pin to be opened. All possible paths are given by "/dev/gpioX"...
  • Page 75 Document number 205065 Version Rev. N Issue date 2019-02-04 Sirius OBC and TCM User Manual errno values EINVAL Invalid options ETIMEDOUT Driver timed out waiting for the edge detection to trigger 5.8.2.4. Function ssize_t write(...) Sets the output value of the specified GPIO pin. If the pin is in input mode, the write is allowed, but its value will not be reflected on the pin until it is set in output mode.
  • Page 76: Usage Description

    Document number 205065 Version Rev. N Issue date 2019-02-04 Sirius OBC and TCM User Manual GPIO_IOCTL_GET_RISE_EDGE_DETECTION uint32_t Get rising edge detection status of the pin. '0' detection disabled '1' detection enabled GPIO_IOCTL_SET_RISE_EDGE_DETECTION uint32_t Set rising edge detection configuration of the pin. '0' detection disabled '1' detection enabled GPIO_IOCTL_GET_TIMESTAMP_ENABLE...
  • Page 77: Limitations

    Document number 205065 Version Rev. N Issue date 2019-02-04 Sirius OBC and TCM User Manual #include <bsp.h> #include <fcntl.h> #include <unistd.h> #include <errno.h> #include <bsp/gpio_rtems.h> #define CONFIGURE_APPLICATION_NEEDS_GPIO_DRIVER #define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER #define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER #define CONFIGURE_USE_IMFS_AS_BASE_FILESYSTEM #define CONFIGURE_MAXIMUM_DRIVERS 15 #define CONFIGURE_MAXIMUM_SEMAPHORES 20 #define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS 30 #define CONFIGURE_RTEMS_INIT_TASKS_TABLE #define CONFIGURE_MAXIMUM_TASKS 20 #define CONFIGURE_INIT...
  • Page 78: Ccsds

    Document number 205065 Version Rev. N Issue date 2019-02-04 Sirius OBC and TCM User Manual 5.9. CCSDS 5.9.1. Description This section describes the driver as a utility for accessing the CCSDS IP. On the telemetry, the frames are encoded with Reed Solomon encoding that conforms to the CCSDS standard with a (255-223) RS encoder implementation and an interleaving depth of 5.
  • Page 79: Blocking

    Document number 205065 Version Rev. N Issue date 2019-02-04 Sirius OBC and TCM User Manual application of the ccsds-driver must implement a listener of the message queue and take actions if an error occurred during transfer. . Steps 4 to 6 are repeated for all VC’s signaling an interrupt. 5.9.3.
  • Page 80 Document number 205065 Version Rev. N Issue date 2019-02-04 Sirius OBC and TCM User Manual The default configuration of the TM downlink is: • FECF is included in TM transfer frames. • Master Channel Frame counter is enabled for telemetry. •...
  • Page 81 Document number 205065 Version Rev. N Issue date 2019-02-04 Sirius OBC and TCM User Manual mc_cnt_enabled uint8_t Enable/Disable of master channel frame counter 0 – Disable 1 – Enable idle_frame_enabled uint8_t Enable/disable of generation of Idle frames 0 – Disable 1 –...
  • Page 82 Document number 205065 Version Rev. N Issue date 2019-02-04 Sirius OBC and TCM User Manual 5.9.5.5. Data type tm_error_cnt_t This datatype is a struct to store error counters of the TM path. The elements of the struct are described below: Element Type Description...
  • Page 83 Document number 205065 Version Rev. N Issue date 2019-02-04 Sirius OBC and TCM User Manual Element Type Description tc_sub_carrier uint8_t See RD8 tc_carrier uint16_t See RD8 5.9.5.9. int open(…) Opens the devices provided by the CCSDS RTEMS driver. Only one instance of every device can be opened.
  • Page 84 Document number 205065 Version Rev. N Issue date 2019-02-04 Sirius OBC and TCM User Manual 5.9.5.11. ssize_t write(…) To send data on virtual channel 0-6, the device descriptor described 5.9.5 shall be used. TM needs to enabled to successfully send telemetry. If the device is opened in blocking mode, the write operation will wait until all data has been transferred before returning.
  • Page 85 Document number 205065 Version Rev. N Issue date 2019-02-04 Sirius OBC and TCM User Manual Return value Description 0 or greater number of bytes that were read. see errno values errno values A read operation is not supported on the device. 5.9.5.13.
  • Page 86: Usage Description

    Document number 205065 Version Rev. N Issue date 2019-02-04 Sirius OBC and TCM User Manual CCSDS_INIT /dev/ccsds N.A. Sets a default configuration of CCSDS IP. See 5.9.1 CCSDS_SET_CLCW /dev/ccsds-tm uint32_t Set the CLCW. See RD8. CCSDS_GET_CLCW /dev/ccsds-tm uint32_t* Get the CLCW. See RD8.
  • Page 87 Document number 205065 Version Rev. N Issue date 2019-02-04 Sirius OBC and TCM User Manual 5.9.6.3. RTEMS – 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>...
  • Page 88: Adc

    Analog input ADC in 7 Regulated 1.2V Regulated 2.5V Regulated 3.3V Input voltage Input current Temperature Temp The following ADC channels are available for the Sirius TCM: Parameter Abbreviation ADC channel Regulated 1.2V Regulated 2.5V Regulated 3.3V Input voltage Input current...
  • Page 89: Rtems Api

    Document number 205065 Version Rev. N Issue date 2019-02-04 Sirius OBC and TCM User Manual HK channel Formula Temp [m°C] Temp_mV = (ADC_value*2500)/2^24 Temp_mC = (1000*(3V3_mV - Temp_mV) - Temp_mV*1210) / 0.00385*(Temp_mV - 3300) Iin [mA] Iin_mA = (ADC_value*5000)/(2^24) Vin [mV] Vin_mV = (ADC_value*20575)/(2^24) 3V3 [mV] 3V3_mV = (ADC_value*5000)/(2^24)
  • Page 90 Document number 205065 Version Rev. N Issue date 2019-02-04 Sirius OBC and TCM User Manual 5.10.2.2. Function int open(…) Opens access to the ADC. Only one instance can be open at any time, only read access is allowed and only blocking mode is supported. Argument name Type Direction...
  • Page 91 Document number 205065 Version Rev. N Issue date 2019-02-04 Sirius OBC and TCM User Manual Return value Description >= 0 Number of bytes that were read. see errno values errno values EPERM Device not open EINVAL Invalid number of bytes to be read ADC data buffer bit definition Description...
  • Page 92: Usage Description

    Document number 205065 Version Rev. N Issue date 2019-02-04 Sirius OBC and TCM User Manual errno values RTEMS_NOT_DEFINED Invalid IOCTL EINVAL Invalid value supplied to IOCTL 5.10.3. Usage description The following #define needs to be set by the user application to be able to use the ADC: CONFIGURE_APPLICATION_NEEDS_ADC_DRIVER 5.10.3.1.
  • Page 93: Limitations

    Document number 205065 Version Rev. N Issue date 2019-02-04 Sirius OBC and TCM User Manual 5.10.4. Limitations Only one ADC channel can be enabled at a time. To switch channels, disabling the old and enabling the new channel is required. Setting the clk divisor to something else than the default (255) might yield that some ADC reads returns 0.
  • Page 94: Nvram

    Document number 205065 Version Rev. N Issue date 2019-02-04 Sirius OBC and TCM User Manual 5.11. NVRAM The NVRAM on the OBC and TCM is a 262,144-bit magnetoresistive random access memory (MRAM) device organized as 32,768 bytes of 8 bits. EDAC is implemented on a byte basis meaning that half the address space is filled with checksums for correction.
  • Page 95 Document number 205065 Version Rev. N Issue date 2019-02-04 Sirius OBC and TCM User Manual Enumerator Description SPI_RAM_IOCTL_EDAC_ENABLE Error Correction and Detection enabled. SPI_RAM_IOCTL_EDAC_DISABLE Error Correction and Detection disabled. 5.11.4.2. Function int open(...) Opens access to the requested SPI RAM. Argument name Type Direction...
  • Page 96 Document number 205065 Version Rev. N Issue date 2019-02-04 Sirius OBC and TCM User Manual See errno values errno values EINVAL Invalid options ENODEV Internal RTEMS resource error. EIO and >= 0 return Read was successful and a value single or double-bit error was corrected using EDAC.
  • Page 97: Usage Description

    Document number 205065 Version Rev. N Issue date 2019-02-04 Sirius OBC and TCM User Manual 5.11.4.7. Function int ioctl(...) Input/output control for SPI RAM. Argument name Type Direction Description File descriptor received at open. uint32_t / uint32_t* Command to send. in/out Value to write or a pointer to a buffer where data will be written.
  • Page 98 Document number 205065 Version Rev. N Issue date 2019-02-04 Sirius OBC and TCM User Manual EDAC error information is reported via errors in the read operation, which is the recommended way to obtain this information. The SPI_RAM_GET_EDAC_STATUS_IOCTL command is deprecated and may be removed in future versions.
  • Page 99: System Flash

    Document number 205065 Version Rev. N Issue date 2019-02-04 Sirius OBC and TCM User Manual 5.12. System flash 5.12.1. Description The System flash holds the software images for the system as described in section 8.4. This section details the RTEMS interface to the System flash driver. 5.12.2.
  • Page 100 Document number 205065 Version Rev. N Issue date 2019-02-04 Sirius OBC and TCM User Manual Return value Description >0 A file descriptor for the device. see errno values errno values ENOENT Invalid filename EEXIST Device already opened. Table 5-6 - open flag symbols Symbol Description O_RDONLY...
  • Page 101 Document number 205065 Version Rev. N Issue date 2019-02-04 Sirius OBC and TCM User Manual 5.12.3.4. 13Function ssize_t read(…) Reads requested size of bytes from the device starting from the offset set using lseek. NOTE: For iterative read operations, lseek must be called to set page offset before each read operation.
  • Page 102 Document number 205065 Version Rev. N Issue date 2019-02-04 Sirius OBC and TCM User Manual EBUSY Flash controller busy. Semaphore error, internal driver error, program failed at chip level, block should be considered bad (double check chip status FAIL flag using SYSFLASH_IO_READ_CHIP_STATUS).
  • Page 103 Document number 205065 Version Rev. N Issue date 2019-02-04 Sirius OBC and TCM User Manual 5.12.3.6.4. Read ID Reads the flash chip ID. Command Value type Direction Description SYSFLASH_IO_READ_ID sysflash_cid_t * Pointer to struct in which ID is to be stored, see 5.6.2.1.
  • Page 104: Usage Description

    Document number 205065 Version Rev. N Issue date 2019-02-04 Sirius OBC and TCM User Manual Return value Description Operation successful. See errno values. errno values EINVAL Page number is out of range Buffer is NULL Program failed on chip level, block should be considered bad.
  • Page 105 Document number 205065 Version Rev. N Issue date 2019-02-04 Sirius OBC and TCM User Manual With NAND flash memory technology some blocks will be bad from the factory, and more bad blocks will appear due to wear. The driver itself does not manage bad blocks, but it will supply the information needed for the application software to implement a system to keep track of them.
  • Page 106: Debug Detect

    Document number 205065 Version Rev. N Issue date 2019-02-04 Sirius OBC and TCM User Manual 5.12.4.3. RTEMS application example In order to use the system flash driver in the RTEMS environment, the following code structure is suggested to be used: #include <bsp.h>...
  • Page 107: Spacewire Router

    In reference to the topology above, sending a package from the Sirius OBC to the Sirius or vice versa, the routing address will be 1-3. In addition to this, each end node, Sirius OBC or Sirius TCM, has one or more logical address(es) to help distinguish between different applications or services running on the same node.
  • Page 108: Sirius Tcm

    All other commands are handled by the Sirius TCM software. Any command not addressing the Sirius TCM will be routed to other nodes on the SpaceWire network according to the current Sirius TCM configuration.
  • Page 109: Block Diagram

    RS422 RS485 RS485 Figure 7-1 – Sirius TCM functionality layout with the external ports depicted 7.3. TCM-S application overview The TCM-S application is partitioned into several software modules who each handles a specific functional part. An overview of the software architecture of the TCM-S is presented in Figure 7.2.
  • Page 110: Configuration

    Document number 205065 Version Rev. N Issue date 2019-02-04 Sirius OBC and TCM User Manual HK Handler Error Mgr SCET NVRAM Handler NVRAM TM Handler CCSDS SpW Handler Message Spacewire Router TC Handler CCSDS UART Handler SF Handler MM Handler UART System Flash Mass Memory...
  • Page 111 Document number 205065 Version Rev. N Issue date 2019-02-04 Sirius OBC and TCM User Manual Partition configuration of mass memory is specified in Table 7-1 below. Table 7-1: PARTITION_CFG Data Type Description UINT32 Starting block number of the partition. Ending block number of the partition (exclusive). UINT32 Partition mode.
  • Page 112 Document number 205065 Version Rev. N Issue date 2019-02-04 Sirius OBC and TCM User Manual Configuration of UART-devices is done by Table 7-3 below. Table 7-3: UART_CONFIG Data Type Description The UART device. 0 - UART0 1 - UART1 2 - UART2 uart UINT8 3 - UART3...
  • Page 113 Document number 205065 Version Rev. N Issue date 2019-02-04 Sirius OBC and TCM User Manual Telecommand can be routed to nodes on the SpW by APID as specified in Table 7-5 below: Table 7-5: NVRAM APID Routing Byte Type Description UINT16 APID or lower APID in APID range Bit15: 0 –...
  • Page 114: Creating And Writing A New Configuration

    Document number 205065 Version Rev. N Issue date 2019-02-04 Sirius OBC and TCM User Manual Configuration of the TM path is described in Table 7-6 below: Table 7-6: TM_CONFIG Data Type Description The resulting TM bitrate is 0.5 * System Frequency/TM Clk TM Clk divisor UINT16 divisor...
  • Page 115: Fallback Nvram Parameters

    Document number 205065 Version Rev. N Issue date 2019-02-04 Sirius OBC and TCM User Manual The recommended way to create a new configuration is: • Create a copy of the example configuration at src/nv_config/src/configs/example.h with a different name located it in the same directory.
  • Page 116 Document number 205065 Version Rev. N Issue date 2019-02-04 Sirius OBC and TCM User Manual Table 7-11: Fallback UART Config Uart # Bitrate Mode Reserved 0 (UART0) 8 (115200 baud) 0 (RS422) 1 (UART1) 8 (115200 baud) 0 (RS422) 2 (UART2) 8 (115200 baud) 0 (RS422) 3 (UART3)
  • Page 117: Telemetry

    Document number 205065 Version Rev. N Issue date 2019-02-04 Sirius OBC and TCM User Manual Table 7-16: Fallback TC Handler APID Parameter Value Description Fallback APID configuration of APID of TC Handler in TCM TC Handler APID 0xAF Core Application 7.5.
  • Page 118: Pulse Commands

    Document number 205065 Version Rev. N Issue date 2019-02-04 Sirius OBC and TCM User Manual • When BCH has decoded the tail in the CLTU, all CLTU receptors are set in search mode again, scanning for the start pattern ready to receive a new telecommand. If one or more bit-errors occur in the tail sequence of the CLTU, the CLTU will be rejected.
  • Page 119: Time Management

    Document number 205065 Version Rev. N Issue date 2019-02-04 Sirius OBC and TCM User Manual AVAILABLE is set by signal Carrier lock in and the flag NO BIT LOCK is set by signal Sub- carrier lock in. 7.7. Time Management The TCM-S has an internal SCET timer that can be synchronised to an external time source.
  • Page 120: Partition Configuration

    Document number 205065 Version Rev. N Issue date 2019-02-04 Sirius OBC and TCM User Manual bytes, i.e. 16 kbytes, which will be used throughout the document where relevant. The total amount of mass memory available is 16 Gbytes. Due to the flash nature of the mass memory, each new block will require erasing before accepting writes, but the TCM software will handle this automatically.
  • Page 121 Document number 205065 Version Rev. N Issue date 2019-02-04 Sirius OBC and TCM User Manual In Continuous mode, all write accesses are sequential and can be of any size, but will return with an error when the partition is full. The MM handler internally implements free and write pointers to keep track of the data in the partition.
  • Page 122 Document number 205065 Version Rev. N Issue date 2019-02-04 Sirius OBC and TCM User Manual Continuous/circular Direct mode mode Free pointer 4 Gbytes Write pointer Unused space Used space Figure 7.5 Illustration of partition modes and the free/write pointers 7.9.1.2. Partition segment size The segment size is only applicable for downloading and for partitions of type PUS (see below).
  • Page 123 Document number 205065 Version Rev. N Issue date 2019-02-04 Sirius OBC and TCM User Manual Packet 1 Packet 2 Segment 1 Packet 3 Packet 4 No padding required Packet 5 Segment boundary Packet 1 Packet 2 Segment 2 Packet 3 Padding with idle packet Packet 4 Idle packet...
  • Page 124: Recovery

    Document number 205065 Version Rev. N Issue date 2019-02-04 Sirius OBC and TCM User Manual Downloads from an auto-padded partition should take into account the additional padding size for written data when calculating the download size. The free and write pointers can be used to determine the total current size of all written data including padding.
  • Page 125: Ecss Standard Services

    Document number 205065 Version Rev. N Issue date 2019-02-04 Sirius OBC and TCM User Manual 7.10. ECSS standard services The TCM-S supports a subset of the services described in [RD4] 7.10.1. PUS-1 Telecommand verification service The TCM-S performs a verification of APID of the incoming TC. If the verification fails, the telecommand is rejected and a Telecommand Acceptance Failure - report (1,2) is generated as described in [RD4].
  • Page 126: Distributing Device Command

    Document number 205065 Version Rev. N Issue date 2019-02-04 Sirius OBC and TCM User Manual Table 7-20 CPDU Command (2, 3) Output Line ID Duration 0-11 0 – 7 (1 octet) (1 octet) The duration is a multiple of the CPDU_DURATION_UNIT (D), defined to 12.5 ms, as detailed below.
  • Page 127: Spacewire Rmap

    Sirius TCM to compensate for topology external to the Sirius TCM and the embedded SpaceWire router. As can be seen Figure 7-1, if the Sirius TCM were to be addressed from SpaceWire port 1, the example addresses below must be added to the routing addresses in the RMAP header.
  • Page 128: Output

    Document number 205065 Version Rev. N Issue date 2019-02-04 Sirius OBC and TCM User Manual TMBRControl 0xFF 0x00000900 Sets telemetry clock frequency divisor. Enable/Disable inclusion of Operational TMOCFControl 0xFF 0x00000A00 Control field in TM Frames. TMTSControl 0xFF 0x00000B00 Configures Timestamp of telemetry. Latest timestamp of telemetry on virtual TMTSStatus 0xFF...
  • Page 129: Status Code In Reply Messages

    Document number 205065 Version Rev. N Issue date 2019-02-04 Sirius OBC and TCM User Manual 7.12.3. Status code in reply messages In the status field of write/read, the values in Table 7-15 can be returned, this replaces the standard RMAP status codes described in Table 7-27[RD3], see individual commands for specific status code interpretations.
  • Page 130 Document number 205065 Version Rev. N Issue date 2019-02-04 Sirius OBC and TCM User Manual Telemetry Control UINT8 0x00 – Disabled 0x01 – Enabled (default) OCF Control UINT8 0x00 – Disabled 0x01 – Enabled (default) Frame Error Counter Field Control UINT8 0x00 –...
  • Page 131 Document number 205065 Version Rev. N Issue date 2019-02-04 Sirius OBC and TCM User Manual 7.12.4.4. TMFEControl Controls Frame Error Control Field inclusion for transfer frames. Table 7-34: TMFEControl data Byte Type Description 0x00 – Disabled UINT8 0x01 – Enabled (default) RMAP reply status (if a reply is requested): Table 7-35: TMFEControl status codes Status code...
  • Page 132 Document number 205065 Version Rev. N Issue date 2019-02-04 Sirius OBC and TCM User Manual 0x01 – Enabled (default) RMAP reply status (if a reply is a requested): Table 7-39: TMIFControl status codes Status code Description Success. EINVAL The driver for the TM device has not been initialized or the argument is out of range I/O error.
  • Page 133 Document number 205065 Version Rev. N Issue date 2019-02-04 Sirius OBC and TCM User Manual 7.12.4.9. TMCEControl Controls the Convolutional Encoding for transfer frames. Note! Convolutional encoding doubles both the amount of telemetry data sent and also the telemetry clock frequency, keeping the same net datarate as without. Table 7-44: TMCEControl data Byte Type...
  • Page 134 Document number 205065 Version Rev. N Issue date 2019-02-04 Sirius OBC and TCM User Manual 7.12.4.11. TMTSControl Configures the timestamping for transfer frames. Table 7-48: TMTSControl data Byte Type Description 0x00 – No timestamping (default) 0x01 – Take a timestamp every time frame sent UINT8 0x02 –...
  • Page 135 Document number 205065 Version Rev. N Issue date 2019-02-04 Sirius OBC and TCM User Manual RMAP reply status (if a reply is requested): Table 7-53: TMSend status codes Status code Description Success. EINVAL The driver for the TM device has not been initialized. I/O error.
  • Page 136 Document number 205065 Version Rev. N Issue date 2019-02-04 Sirius OBC and TCM User Manual Byte Type Description 0x00 – Disabled (default) UINT8 0x01 – Enabled RMAP reply status (if a reply is requested): Table 7-57: TCDRControl status codes Status code Description Success.
  • Page 137 Document number 205065 Version Rev. N Issue date 2019-02-04 Sirius OBC and TCM User Manual RMAP reply status: Table 7-59: HKData status codes Status code Description Success. EINVAL The driver for the HK device has not been initialized. I/O error. The HK device cannot be accessed 7.12.4.17.
  • Page 138 Document number 205065 Version Rev. N Issue date 2019-02-04 Sirius OBC and TCM User Manual RMAP reply status (if a reply is requested): Table 7-63: UARTCommand status codes Status code Description Success. EINVAL The driver for the UART device has not been initialized.
  • Page 139 Document number 205065 Version Rev. N Issue date 2019-02-04 Sirius OBC and TCM User Manual The data field of the read/write RMAP message in Table 7-64 contains raw data written to or read from the partition. Table 7-64: MMData data Byte Type Description...
  • Page 140 Document number 205065 Version Rev. N Issue date 2019-02-04 Sirius OBC and TCM User Manual The start address of the range is inclusive, the end address of the range is excusive. Table 7-66: MMDataRange data Byte Type Description UINT32 Start address of first data range. UINT32 End address of first data range (exclusive).
  • Page 141 Document number 205065 Version Rev. N Issue date 2019-02-04 Sirius OBC and TCM User Manual RMAP reply status: Table 7-69: MMPartitionConfig data status codes Status code Description Success. EINVAL Invalid partition number. 7.12.4.22. MMPartitionSpace Gets the amount of free space in a partition. Note that due to the nature of the flash memory, as memory is freed, the space will become free for writing only in leaps as the free operation is used up to a block boundary.
  • Page 142 Document number 205065 Version Rev. N Issue date 2019-02-04 Sirius OBC and TCM User Manual In case an invalid Space packet length is encountered or a Space CRC error occurs in a memory segment during download, the rest of the segment will be downloaded with packet errors and the download will re-synchronise at the start of the next segment.
  • Page 143 Document number 205065 Version Rev. N Issue date 2019-02-04 Sirius OBC and TCM User Manual Continuous and circular mode - The free pointer position together with the length given in the RMAP command defines which memory area should be freed and the address field is ignored.
  • Page 144: Rmap Output Address Details

    Document number 205065 Version Rev. N Issue date 2019-02-04 Sirius OBC and TCM User Manual Status code Description Success. EINVAL Invalid partition number. I/O error. Failed to access storage or NVRAM. 7.12.4.26. MMStopDownloadData This command can be sent to stop a current download for a partition previously started by the MMDownloadPartitionData command.
  • Page 145: System-On-Chip Definitions

    UART 7 (Safe bus functionality, RS485) 0x97000000 UART 6 (PSU control functionality, RS485) 0x96000000 UART 5 0x95000000 UART 4 (Routed to LVDS HK on Sirius TCM) 0x94000000 UART 3 (Routed to RS422 HK on Sirius TCM) 0x93000000 UART 2 0x92000000...
  • Page 146: Interrupt Sources

    Triggered when telemetry sending on virtual channel 0 starts ccsds (Sirius TCM only) Triggered when one of the pins input changes states and edge gpio detection and timestamping are enabled Triggered when an ADC conversion is started www.aacmicrotec.com...
  • Page 147: Boot Images And Boot Procedure

    Document number 205065 Version Rev. N Issue date 2019-02-04 Sirius OBC and TCM User Manual 8.4. Boot images and boot procedure 8.4.1. Description The bootrom is a small piece of software built into a read-only memory inside the System- on-Chip. Its main function is to load a software image from the system flash to RAM and start it by jumping to the reset vector (0x100).
  • Page 148: Limitations

    The pulse command inputs on the Sirius products can be used to force a board to reboot from a specific image. Paired with the ability of the Sirius TCM to decode PUS-2 CPDU telecommands without software interaction and issue pulse commands, this provides a means to reset malfunctioning boards by direct telecommand from ground as a last resort.
  • Page 149: Soc Information Map

    Document number 205065 Version Rev. N Issue date 2019-02-04 Sirius OBC and TCM User Manual Each board has two pulse command inputs. Input 0 resets the board and loads the updated image while input 1 resets the board and loads the safe image. Both require an active-high pulse length between 20 - 40 ms to be valid.
  • Page 150: Software Upload

    Document number 205065 Version Rev. N Issue date 2019-02-04 Sirius OBC and TCM User Manual 9. Software upload 9.1. Description During the lifetime of a satellite, the on-board software might need adjustments as bugs are detected or the mission parameters adjusted. This module tries to solve that by providing a means for updating the on-board software in orbit.
  • Page 151: Ccsds Api - Custom Pus Service 130

    Document number 205065 Version Rev. N Issue date 2019-02-04 Sirius OBC and TCM User Manual 9.3. CCSDS API – custom PUS service 130 This service is provided to allow updates to the flight software on a node in a data handling system using ÅAC Microtec components, but can be used for any type of on-board computer.The subtypes consist of a set of commands.
  • Page 152: Subtype 1 - Image Transfer Start

    Document number 205065 Version Rev. N Issue date 2019-02-04 Sirius OBC and TCM User Manual Table 9.1 Telecommand acceptance failure error types Error code Data type Error description UINT8 Illegal APID (PAC error) UINT8 Incomplete or invalid length packet UINT8 Incorrect checksum UINT8 Illegal packet type...
  • Page 153: Subtype 3 - Verify Uploaded Image

    Document number 205065 Version Rev. N Issue date 2019-02-04 Sirius OBC and TCM User Manual A telecommand execution complete report (if requested in the PUS header) will return the values listed in Table 9.5 in case of a failure. Table 9.5 Image data telecommand execution failure codes Error code Data type Error description...
  • Page 154: Subtype 5 - Calculate Crc In Flash

    Document number 205065 Version Rev. N Issue date 2019-02-04 Sirius OBC and TCM User Manual Table 9.8 Write image command argument Checksum UINT32 A telecommand execution complete report (if requested in the PUS header) will return the values listed in Table 9.9 in case of a failure. Table 9.9 Write image telecommand execution failure codes Error code Data type...
  • Page 155: Software Api

    Document number 205065 Version Rev. N Issue date 2019-02-04 Sirius OBC and TCM User Manual Table 9.12 Calculated flash CRC report Image copy number Checksum UINT8 UINT32 9.4. Software API This API depicts the functions available on the level below the PUS API and share many similarities with these.
  • Page 156: Int32_T Swu_Check

    Document number 205065 Version Rev. N Issue date 2019-02-04 Sirius OBC and TCM User Manual Read/write error in intermediate storage area of -EIO flash (critical) Out of non-flash blocks in intermediate storage -ENOSPC area of slash (critical) -ENOENT No upload in progress 9.4.3.
  • Page 157: Int32_T Swu_Flash_Check

    Document number 205065 Version Rev. N Issue date 2019-02-04 Sirius OBC and TCM User Manual Checksum argument doesn’t match image -EINVAL checksum -EIO Error when accessing flash Out of non-bad blocks in one or more of the boot -ENOSPC image areas in flash -ENOENT No upload in progress 9.4.5.
  • Page 158: Tm/Tc-Structure And Cop-1

    Document number 205065 Version Rev. N Issue date 2019-02-04 Sirius OBC and TCM User Manual 10. TM/TC-structure and COP-1 10.1. SCID For commanding the spacecraft, a 10-bit Spacecraft Identifier is needed. For every mission, a mission specific SCID is configured in the TCM-S. 10.2.
  • Page 159: Randomization

    Document number 205065 Version Rev. N Issue date 2019-02-04 Sirius OBC and TCM User Manual Convolutional encoding with a Code rate 0.5, constraint length of 7 bits and polynomial generators 171 and 133 can be enabled/disabled by a configuration in NVRAM or by a RMAP command.
  • Page 160: Transfer Frame Header

    Document number 205065 Version Rev. N Issue date 2019-02-04 Sirius OBC and TCM User Manual 10.6.2. Transfer Frame Header Figure 10.2 Transfer Frame Header Table 10-1 Transfer Frame Header Field Description Comment VERSION NUMBER Shall be set to ‘00’ When this flag is set to ‘0’, the frame will be subject to Frame Acceptance Check of the FARM on TCM-S.
  • Page 161: Transfer Frame Data Field

    Document number 205065 Version Rev. N Issue date 2019-02-04 Sirius OBC and TCM User Manual Only virtual channel 0 is supported for TCs to be Virtual channel ID of handled by the SW in TCM- Virtual Channel ID Telecommand Virtual channel 2 is supported for CPDUs Shall be set to total number of The maximum number of...
  • Page 162: Frame Error Control Field

    Document number 205065 Version Rev. N Issue date 2019-02-04 Sirius OBC and TCM User Manual , where XXXXXXXX is the value the FARM shall set the Receiver Frame Sequence Number, V(R). 10.6.4. Frame Error Control Field The Frame Error Control holding an error detection code (checksum) shall always be included in the telecommand transfer frames, which allows the receiving application to verify the integrity of the telecommand frame data.
  • Page 163 Document number 205065 Version Rev. N Issue date 2019-02-04 Sirius OBC and TCM User Manual Identifier provided to be able to Sequence Count track a specific packet. Specifies number of octets within the packet data field. The Packet Length number shall be number of octets in packet data field –...
  • Page 164: Telemetry Format

    Document number 205065 Version Rev. N Issue date 2019-02-04 Sirius OBC and TCM User Manual 10.7. Telemetry Format This chapter describes the format of TM Transfer Frames and TM Packets send from the TCM-S to ground. 10.7.1. Telemetry Transfer Frame Figure 10.6 Telemetry Transfer Frame 10.7.2.
  • Page 165: Transfer Frame Secondary Header

    Document number 205065 Version Rev. N Issue date 2019-02-04 Sirius OBC and TCM User Manual TRANSFER FRAME DATA See below FIELD STATUS Figure 10.8 Transfer Frame Data Field Status Table 10-6 Transfer Frame Data Field Status Field Description Comment Shall be ‘1’ if Transfer Frame In the TCM-S, the Transfer TRANSFER FRAME Secondary Header is present.
  • Page 166: Transfer Frame Data Field

    Document number 205065 Version Rev. N Issue date 2019-02-04 Sirius OBC and TCM User Manual 10.7.4. Transfer Frame Data Field The Transfer Frame Data Field contains an integral number of octets of data formatted as TM Packets, see. The length of this field is fixed, but can be different for different configurations depending on inclusion of OCF and FECF.
  • Page 167: Frame Error Control Field

    Document number 205065 Version Rev. N Issue date 2019-02-04 Sirius OBC and TCM User Manual Shows Lockout status of the FARM. Set to ‘0’ when FARM is not in LOCK-OUT Lockout Set to ‘1’ when FARM is in Lockout Set to ‘1’ (Wait) indicates that all further Type-A Transfer Frames on that virtual channel will be rejected by FARM until the...
  • Page 168: Telemetry Packet Header

    Document number 205065 Version Rev. N Issue date 2019-02-04 Sirius OBC and TCM User Manual 10.7.8. Telemetry Packet Header Table 10-8 Command Link Control Word Field Description Comment Version Number Set to ‘000’ Type Set to ‘0’ Set to ‘1’ to indicate presence of All TM Packet generated by Data Field Header.
  • Page 169: Source Data

    Document number 205065 Version Rev. N Issue date 2019-02-04 Sirius OBC and TCM User Manual On TCM-S, the time field consist of CUC Time Time On-board reference time Seconds (32-bit), followed by CUC Time Fractions (16-bit) Spare Not used by TCM-S 10.7.10.
  • Page 170: Updating The Sirius Fpga

    Issue date 2019-02-04 Sirius OBC and TCM User Manual 11. Updating the Sirius FPGA To be able to update the SoC on the Sirius OBC and Sirius TCM you need the following items. 11.1. Prerequisite hardware • Microsemi FlashPro5 unit •...
  • Page 171 Document number 205065 Version Rev. N Issue date 2019-02-04 Sirius OBC and TCM User Manual Figure 11-1 - Startup view of FlashPro Express Once the file has loaded (warnings might appear), click RUN (see Figure 11-2). Please note that the connected FlashPro5 programmed ID should be shown. Figure 11-2 - View of FlashPro Express with project loaded.
  • Page 172 Document number 205065 Version Rev. N Issue date 2019-02-04 Sirius OBC and TCM User Manual The FPGA should now be loaded with the new firmware, which might take a few minutes. Once it is finalized the second last message should be “Chain programming PASSED”, see Figure 11-3.
  • Page 173 Document number 205065 Version Rev. N Issue date 2019-02-04 Sirius OBC and TCM User Manual 13. Glossary Analog Digital Converter APID Application Process ID Board Support Package CCSDS The Consultative Committee for Space Data Systems EDAC Error Detection and Correction Engineering model FIFO First In First Out...
  • Page 174 Version Rev. N Issue date 2019-02-04 Sirius OBC and TCM User Manual Contact us ÅAC Microtec AB AAC Microtec North America AAC Microtec UK Ltd Clyde Space Inc. Uppsala Science Park 5 Berry Patch Ln Columbia Atlas Building Skypark 5 Dag Hammarskjölds väg 48...

This manual is also suitable for:

Sirius obc

Table of Contents