Hide thumbs Also See for Sirius OBC:
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 E
© ÅAC Microtec 2017
www.aacmicrotec.com
Document number
205065
Version
Rev E
Issue date
2017-03-07
Sirius OBC and TCM User Manual
Page 1 of 131

Advertisement

Table of Contents
loading
Need help?

Need help?

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

Questions and answers

Summary of Contents for AAC Microtec Sirius OBC

  • Page 1 Version Rev E Issue date 2017-03-07 Sirius OBC and TCM User Manual Sirius OBC and TCM User Manual Rev E © ÅAC Microtec 2017 Å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 Document number 205065 Version Rev E Issue date 2017-03-07 Sirius OBC and TCM User Manual REVISION LOG Date Change description First release, drafted from 204911 Sirius Breadboard User Manual 2016-10-25 Rev L 2016-12-15 Updated after editorial updates Release with updates to the following sections: ...
  • Page 3: Table Of Contents

    Document number 205065 Version Rev E Issue date 2017-03-07 Sirius OBC and TCM User Manual TABLE OF CONTENT 1. INTRODUCTION ....................... 6 1.1. Applicable releases ............................6 1.2. Intended users ..............................6 1.3. Getting support ............................... 6 1.4. Reference documents ............................ 7 2.
  • Page 4 Document number 205065 Version Rev E Issue date 2017-03-07 Sirius OBC and TCM User Manual 5.5.2. RTEMS API .............................. 41 5.5.3. Usage description ............................ 44 5.5.4. Limitations ..............................45 5.6. Mass memory ..............................45 5.6.1. Description ............................... 45 5.6.2. Data Structures ............................46 5.6.3.
  • Page 5 9.3. PWR – Power .............................. 119 9.4. SPW1 – Spacewire 1 ........................... 119 9.5. SPW2 – Spacewire 2 ........................... 120 9.6. ANALOG, Analog input and 3xGPIO (Sirius OBC only) ................120 9.7. DIGITAL, PPS input and 12xGPIO ......................121 9.8. UART0-2 - RS422/485 ..........................122 9.9.
  • Page 6: 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 7: Reference Documents

    Document number 205065 Version Rev E Issue date 2017-03-07 Sirius OBC and TCM User Manual 1.4. Reference documents Document ref Document name OpenRISC 1000 Architecture http://opencores.org/openrisc,architecture Manual SpaceWire – Links, nodes, ECSS-E-ST-50-12C routers and networks SpaceWire – Remote memory ECSS-E-ST-50-52C...
  • Page 8: Equipment Information

    Sirius OBC and TCM User Manual 2. Equipment information The Sirius OBC and Sirius OBC products are depicted in Figure 3-1 and Figure 3-2. 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 9 Control GPIO 10/100 SpaceWire CCSDS (Housekeeping) controller Error NVRAM Watchdog SCET NVRAM manager FPGA ETHERNET GPIO UMBI/EGSE Pulse CMD Analog inputs TCM/OBC Future option Figure 2-1 - The Sirius OBC / Sirius TCM SoC Overview www.aacmicrotec.com Page 9 of 131...
  • Page 10: Setup And Operation

    Document number 205065 Version Rev E Issue date 2017-03-07 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 11: Connecting Cables To The Sirius Products

    Sirius OBC and TCM User Manual 3.2. Connecting cables to the Sirius products UART0-2 JTAG-RTL UART3-5 DEBUG-SW SPW1 ANALOG SPW2 DIGITAL Figure 3-1 – ÅAC Sirius Sirius OBC with connector naming UART0-2 JTAG-RTL TRX2-LVDS DEBUG-SW TRX1-RS422 UMBI PULSE SPW1 DIGITAL SPW2 Figure 3-2 - ÅAC Sirius Sirius TCM with connector naming...
  • Page 12: 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 13: 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 14: Setup A Serial Terminal To The Device Debug Uart

    Version Rev E Issue date 2017-03-07 Sirius OBC and TCM User Manual Connect the Sirius products according to section 3.2 and switch on the power supply. Start the run_aac_debugger.sh script from a terminal. If the printed message is according to Figure 3-3, the connection is working.
  • Page 15: Loading An Application

    Issue date 2017-03-07 Sirius OBC and TCM User Manual On Debian 8, a more foolproof way of identifying the terminal to use is the by-id mechanism. Once you've identified the serial number of your debugger (see 3.5.4.), you can connect to it using the autocreated path at /dev/serial/by-id/.
  • Page 16: Programming An Application (Boot Image) To System Flash

    Document number 205065 Version Rev E Issue date 2017-03-07 Sirius OBC and TCM User Manual [363062.058207] usb 1-1.3.3.3: Manufacturer: AAC Microtec [363062.058220] usb 1-1.3.3.3: SerialNumber: FTZ7QCMF FTZ7QCMF where is the serial number for the debugger. 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 17 Document number 205065 Version Rev E Issue date 2017-03-07 Sirius OBC and TCM User Manual www.aacmicrotec.com Page 17 of 131...
  • Page 18: Software Development

    Rev E Issue date 2017-03-07 Sirius OBC and TCM User Manual 4. Software development Applications to be deployed on the Sirius products can either use a bare-metal approach or use the RTEMS OS. This corresponds to the two toolchain prefixes available: or1k-aac-elf-* or or1k-aac-rtems4.11-*...
  • Page 19: Rtems

    205065 Version Rev E Issue date 2017-03-07 Sirius OBC and TCM User Manual 5. RTEMS 5.1. Introduction This section presents the RTEMS drivers. The Block diagram representing driver functionality access via the RTEMS API is shown in Figure 5-1. Figure 5-1 - Functionality access via RTEMS API www.aacmicrotec.com...
  • Page 20: Watchdog

    205065 Version Rev E Issue date 2017-03-07 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 21: Usage

    Document number 205065 Version Rev E Issue date 2017-03-07 Sirius OBC and TCM User Manual 5.2.2.3. size_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...
  • Page 22 Version Rev E Issue date 2017-03-07 Sirius OBC and TCM User Manual Default value of the watch dog is enabled. When debugged it must be set disabled otherwise the system restart occasionally. 5.2.3.1. RTEMS The RTEMS driver must be opened before it can access the watchdog device. Once opened, all provided operations can be used as described in the RTEMS API defined in subchapter 5.2.2.
  • Page 23: Error Manager

    Version Rev E Issue date 2017-03-07 Sirius OBC and TCM User Manual Inclusion of <errno.h> is required for retrieving error values on failures. Inclusion of <bsp/wdt_rtems.h> is required for accessing watchdog device name RTEMS_WATCHDOG_DEVICE_NAME. CONFIGURE_APPLICATION_NEEDS_WATCHDOG_DRIVER must be defined for using the watchdog driver.
  • Page 24 Document number 205065 Version Rev E Issue date 2017-03-07 Sirius OBC and TCM User Manual errno values EALREADY Device already opened 5.3.2.2. int close(…) Closes access to the device. Argument name Type Direction Description File descriptor received at open Return value...
  • Page 25 Version Rev E Issue date 2017-03-07 Sirius OBC and TCM User Manual ERRMAN_GET_WDT_ERRCNT_IOCTL Gets the watchdog error count register. This register can store a value up to 15 and then wraps. After a wrap the WDT carry flag bit is set in the carry flag register.
  • Page 26 Document number 205065 Version Rev E Issue date 2017-03-07 Sirius OBC and TCM User Manual ERRMAN_SET_CPU_PARITY_ERRCNT_IOCTL Sets the CPU Parity error count register. The counter width is 4 bits i. e. 15 is the maximum value that can be written. ERRMAN_SET_SYS_SINGLE_ERRCNT_IOCTL Sets the system flash single (correctable) error counter.
  • Page 27 Document number 205065 Version Rev E Issue date 2017-03-07 Sirius OBC and TCM User Manual 5.3.2.3.2. Carry flag register Bit position Name Direction Description 31:8 RESERVED ERRMAN_PARCFLG Carry flag set when CPU Register File Parity Error counter overflow has occurred ‘0’...
  • Page 28: Usage

    Document number 205065 Version Rev E Issue date 2017-03-07 Sirius OBC and TCM User Manual ERRMAN_SECRICNT_SDRAM SDRAM EDAC single error counter for critical errors 5.3.2.3.4. Multiple EDAC error register Name Direction Description position 31:20 RESERVED 19:16 ERRMAN_MENOCNT SDRAM EDAC multiple error...
  • Page 29 Rev E Issue date 2017-03-07 Sirius OBC and TCM User Manual A subscriber must inspect the message according to the following table to determine whether to take action or not. Multiple subscribers are allowed and all subscribers will be notified upon a message.
  • Page 30: Limitations

    205065 Version Rev E Issue date 2017-03-07 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 31: Scet

    Version Rev E Issue date 2017-03-07 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 32: Rtems Api

    Rev E Issue date 2017-03-07 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 33 Document number 205065 Version Rev E Issue date 2017-03-07 Sirius OBC and TCM User Manual 5.4.4.1. Function int open(…) Opens access to the driver. The device can only be opened once at a time. Argument name Type Direction Description filename...
  • Page 34 Document number 205065 Version Rev E Issue date 2017-03-07 Sirius OBC and TCM User Manual Return value Description >=0 Number of bytes that were read. See errno values errno values EPERM Device not opened EINVAL Number of bytes to read, count is not 6 5.4.4.4.
  • Page 35 Document number 205065 Version Rev E Issue date 2017-03-07 Sirius OBC and TCM User Manual Command table Type Direction Description SCET_SET_PPS_SOURCE_IOCTL uint32_t Sets the PPS source. 0 = External PPS source 1 = Internal PPS source (default) SCET_GET_PPS_SOURCE_IOCTL uint32_t Gets the current PPS source...
  • Page 36 Document number 205065 Version Rev E Issue date 2017-03-07 Sirius OBC and TCM User Manual SCET_SET_GP_TRIGGER_LEVEL_IOCTL uint8_t Configures the trigger level of each trigger: Bit 0 is trigger 0, Bit N is trigger N, Bit 7 is trigger 7. Bit value 0 = trigger activates...
  • Page 37: Usage

    Document number 205065 Version Rev E Issue date 2017-03-07 Sirius OBC and TCM User Manual Return value Description >=0 Return value on commands that return these. 0 for success in other cases. -EINVAL Invalid value supplied to IOCTL -EIO Invalid IOCTL 5.4.5.
  • Page 38: Rtems Application Example

    Document number 205065 Version Rev E Issue date 2017-03-07 Sirius OBC and TCM User Manual ‘S’, ‘P’, ‘P’, ‘S’ handles PPS related messages with a prefix of: SCET_INTERRUPT_STATUS_* Table 5-2 Driver message queue message types Event name Description PPS_ARRIVED An external PPS signal has arrived...
  • Page 39 Document number 205065 Version Rev E Issue date 2017-03-07 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...
  • Page 40 Document number 205065 Version Rev E Issue date 2017-03-07 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);...
  • Page 41: Uart

    Version Rev E Issue date 2017-03-07 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 42: Document Number

    Document number 205065 Version Rev E Issue date 2017-03-07 Sirius OBC and TCM User Manual 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...
  • Page 43 Document number 205065 Version Rev E Issue date 2017-03-07 Sirius OBC and TCM User Manual EPERM Device not open EINVAL Invalid number of characters to be read 5.5.2.4. Function ssize_t write(…) Write data to the UART. The write call is blocking until all data have been transmitted.
  • Page 44: Usage Description

    Document number 205065 Version Rev E Issue date 2017-03-07 Sirius OBC and TCM User Manual UART_IOCTL_MODE_SELECT uint32_t Set the mode of the interface. Possible values: UART_RTEMS_MODE_RS422 (default) UART_RTEMS_MODE_RS485 UART_RTEMS_MODE_LOOPBACK (TX connected to RX internally) UART_IOCTL_RX_FLUSH uint32_t Flushes the RX software FIFO...
  • Page 45: Limitations

    Document number 205065 Version Rev E Issue date 2017-03-07 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);...
  • Page 46: Data Structures

    Document number 205065 Version Rev E Issue date 2017-03-07 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. Type Name Purpose Array of 5 uint8_t...
  • Page 47: Rtems Api

    Document number 205065 Version Rev E Issue date 2017-03-07 Sirius OBC and TCM User Manual massmem_error_injection_t * error_injection Pointer to error injection struct. See 5.6.2.2 for definition 5.6.3. RTEMS API 5.6.3.1. int open(…) Opens access to the driver. The device can only be opened once at a time.
  • Page 48 Document number 205065 Version Rev E Issue date 2017-03-07 Sirius OBC and TCM User Manual see errno values errno values EBADF The file descriptor fd is not an open file descriptor 5.6.3.3. off_t lseek(…) Sets page offset for read/ write operations.
  • Page 49 Document number 205065 Version Rev E Issue date 2017-03-07 Sirius OBC and TCM User Manual Return value Description >0 Number of bytes that were read. see errno values errno values EBADF The file descriptor fd is not an open file descriptor...
  • Page 50 Document number 205065 Version Rev E Issue date 2017-03-07 Sirius OBC and TCM User Manual Failed to write data. Block should be marked as a bad block. 5.6.3.6. int ioctl(…) Additional supported operations via POSIX Input/Output Control API. Argument Type...
  • Page 51 Document number 205065 Version Rev E Issue date 2017-03-07 Sirius OBC and TCM User Manual 5.6.3.6.3. Read control status data Reads the control status register value. Command Value type Direction Description MASSMEM_IO_READ_CTRL_STATUS uint8_t* Pointer to variable in which control status data is to be stored.
  • Page 52 Document number 205065 Version Rev E Issue date 2017-03-07 Sirius OBC and TCM User Manual 5.6.3.6.7. Read spare area Reads the spare area with given data. Command Value type Direction Description MASSMEM_IO_READ_SPARE_AREA massmem_ioctl_spare_area_args_t* in/out Pointer to struct with input page number specifier, and...
  • Page 53: Usage

    Document number 205065 Version Rev E Issue date 2017-03-07 Sirius OBC and TCM User Manual 5.6.3.6.9. Error Injection Injects errors in page write command call. The purpose is to test error corrections (EDAC). Command Value type Direction Description MASSMEM_IO_ERROR_INJECTION massmem_ioctl_error_injection_args_t*...
  • Page 54 Issue date 2017-03-07 Sirius OBC and TCM User Manual It is the user application’s responsibility to make sure any data the needs to be preserved after the erase block operation must first be read and rewritten after the erase block operation, with the new page information.
  • Page 55 205065 Version Rev E Issue date 2017-03-07 Sirius OBC and TCM User Manual 5.6.4.2. RTEMS application example In order to use the mass memory flash driver in RTEMS environment, the following code structure is suggested to be used: #include <bsp.h>...
  • Page 56: Error Injection

    Rev E Issue date 2017-03-07 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 57: Spacewire

    205065 Version Rev E Issue date 2017-03-07 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 58 Document number 205065 Version Rev E Issue date 2017-03-07 Sirius OBC and TCM User Manual Return value Description Device name deregistered successfully see errno values errno values The file descriptor fd is not an open file EBADF descriptor 5.7.2.3. size_t read(…) Reads a packet when available.
  • Page 59: Usage Description

    Document number 205065 Version Rev E Issue date 2017-03-07 Sirius OBC and TCM User Manual Return value Description >0 Number of bytes that were transmitted. ≤0 see errno values errno values The file descriptor fd is not an open file...
  • Page 60 Rev E Issue date 2017-03-07 Sirius OBC and TCM User Manual The logical address is tied to a device number. To register to the device, the application must use the predefined string SPWN_DEVICE_0_NAME_PREFIX with a chosen logical address to register itself to the driver. See code example in subchapter 5.7.3.3. The registration is done by function open and deregistered by the function close.
  • Page 61 Document number 205065 Version Rev E Issue date 2017-03-07 Sirius OBC and TCM User Manual 5.7.3.3. RTEMS application example In order to use the driver in RTEMS environment, the following code structure is suggested to be used: #include <bsp.h> #include <fcntl.h>...
  • Page 62: Gpio

    Version Rev E Issue date 2017-03-07 Sirius OBC and TCM User Manual CONFIGURE_APPLICATION_NEEDS_SPACEWIRE_DRIVER must be defined for using the driver. This will automatically initialise the driver at boot up. CONFIGURE_EXECUTIVE_RAM_SIZE must also be defined for objects needed by the driver.
  • Page 63 Issue date 2017-03-07 Sirius OBC and TCM User Manual The driver functionality is accessed through the RTEMS POSIX API for ease of use. In case of a failure on a function call, the errno value is set for determining the cause.
  • Page 64 Document number 205065 Version Rev E Issue date 2017-03-07 Sirius OBC and TCM User Manual void* Pointer to character buffer to put the read data count size_t Number of bytes to read, must be set to 1. Return value Description >=0...
  • Page 65: Usage Description

    Document number 205065 Version Rev E Issue date 2017-03-07 Sirius OBC and TCM User Manual GPIO_IOCTL_GET_FALL_EDGE_DETECTION uint32_t Get falling edge detection status of the pin. '0' detection disabled '1' detection enabled GPIO_IOCTL_SET_FALL_EDGE_DETECTION uint32_t Set falling edge detection configuration of the pin.
  • Page 66: Limitations

    Document number 205065 Version Rev E Issue date 2017-03-07 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...
  • Page 67: Ccsds

    Version Rev E Issue date 2017-03-07 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 68 Document number 205065 Version Rev E Issue date 2017-03-07 Sirius OBC and TCM User Manual vcf_flag The OCF-flag mcfc The master channel frame counter vcfc The virtual channel frame counter tr_frame_sec_head_flag The transfer frame secondary header flag tr_frame_sync_flag The transfer frame sync flag...
  • Page 69 Document number 205065 Version Rev E Issue date 2017-03-07 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...
  • Page 70 Document number 205065 Version Rev E Issue date 2017-03-07 Sirius OBC and TCM User Manual 5.9.2.7. int open(…) Opens the devices provided by the CCSDS RTEMS driver. The device can only be opened once at a time. Argument name Type...
  • Page 71 Document number 205065 Version Rev E Issue date 2017-03-07 Sirius OBC and TCM User Manual Return value Description ≥0 number of bytes that were written. see errno values errno values EINVAL Wrong arguments A physical access on the device failed 5.9.2.10.
  • Page 72: Usage Description

    Document number 205065 Version Rev E Issue date 2017-03-07 Sirius OBC and TCM User Manual CCSDS_GET_DMA_CONFIG /dev/ccsds-tm uint32_t* Returns a configuration of the DMA register. CCSDS_SET_DMA_DESC /dev/ccsds-tm dma_descriptor_t Configures a DMA-descriptor in the range (0-31). See 5.9.2.3 CCSDS_GET_DMA_DESC /dev/ccsds-tm dma_descriptor_t* Returns the configuration of a DMA- descriptor in the range (0-31).
  • Page 73 Version Rev E Issue date 2017-03-07 Sirius OBC and TCM User Manual 5.9.3.2. Receive Telecommands 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”...
  • Page 74: Adc

    2017-03-07 Sirius OBC and TCM User Manual 5.10. ADC 5.10.1. Description This section describes the driver for accessing the ADC device. The following ADC channels are available for the Sirius OBC: Parameter Abbreviation ADC channel Analog input ADC in 0...
  • Page 75: Rtems Api

    Document number 205065 Version Rev E Issue date 2017-03-07 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]...
  • Page 76 Rev E Issue date 2017-03-07 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.
  • Page 77 Document number 205065 Version Rev E Issue date 2017-03-07 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...
  • Page 78: Usage Description

    Document number 205065 Version Rev E Issue date 2017-03-07 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 79: Limitations

    Version Rev E Issue date 2017-03-07 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 80: Nvram

    Rev E Issue date 2017-03-07 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 81 Document number 205065 Version Rev E Issue date 2017-03-07 Sirius OBC and TCM User Manual 5.11.4.2. Function int open(...) Opens access to the requested SPI RAM. Argument name Type Direction Description pathname const char * The absolute path to the SPI RAM to be opened.
  • Page 82 205065 Version Rev E Issue date 2017-03-07 Sirius OBC and TCM User Manual 5.11.4.5. Function ssize_t write(...) Write data into the SPI RAM. The call block until all data has been written into the SPI RAM. Argument name Type Direction Description File descriptor received at open.
  • Page 83: Usage Description

    Document number 205065 Version Rev E Issue date 2017-03-07 Sirius OBC and TCM User Manual SPI_RAM_GET_EDAC_STATUS_IOCTL uint32_t Get EDAC status for previous read operations. SPI_RAM_UNLOCK_MEMORY_IOCTL uint32_t Unlocks system memory for writing. The input value is ignored. Must be called before every write operation (4 bytes) of the system memory.
  • Page 84 Document number 205065 Version Rev E Issue date 2017-03-07 Sirius OBC and TCM User Manual #include <bsp.h> #include <fcntl.h> #include <unistd.h> #include <errno.h> #include <bsp/spi_ram_rtems.h> #define CONFIGURE_APPLICATION_NEEDS_SPI_RAM_DRIVER #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 argument){ rtems_status_code status;...
  • Page 85: 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 86: Sirius Tcm

    205065 Version Rev E Issue date 2017-03-07 Sirius OBC and TCM User Manual 7. Sirius TCM 7.1. Description The Sirius TCM handles receiving of Telecommands (TCs) and Telemetry (TM) as well as Spacewire communication using the RMAP protocol. TC, received from ground, can be of two command types; a pulse command or a Telecommand.
  • Page 87: Block Diagram

    Document number 205065 Version Rev E Issue date 2017-03-07 Sirius OBC and TCM User Manual 7.2. Block diagram TCM-S RS422 / RS485 RS422 / RS485 LVDS LVDS SpaceWire Router Umbilical Umbilical RS422 / RS485 RS422 / RS485 UART RS422 RS422...
  • Page 88: Configuration

    Document number 205065 Version Rev E Issue date 2017-03-07 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...
  • Page 89 Document number 205065 Version Rev E Issue date 2017-03-07 Sirius OBC and TCM User Manual Configuration of UART-devices is done by Table 7-2 below. Table 7-2: UART_CONFIG Data Type Description The UART device. 0 - UART0 1 - UART1 2 - UART2...
  • Page 90: Telemetry

    Document number 205065 Version Rev E Issue date 2017-03-07 Sirius OBC and TCM User Manual Telecommand can be routed to nodes on the SpW by APID as specified in Table 7-4 below: Table 7-4: NVRAM APID Routing Byte Type Description...
  • Page 91: Telecommands

    205065 Version Rev E Issue date 2017-03-07 Sirius OBC and TCM User Manual  Pseudo randomization of telemetry can be enabled/disabled The TCM-S supports a format of TM Transfer Frames described in [RD8]. 7.6. Telecommands Telecommands can be received on the TRX1 or the UMBI interfaces. The TCM also support an alternative transmitter and hence have a TRX2 interface.
  • Page 92: Pulse Commands

    Rev E Issue date 2017-03-07 Sirius OBC and TCM User Manual 7.7. Pulse commands The CCSDS IP in the TCM has a built-in Command Pulse Distribution Unit (CPDU) execution functionality with the possibility to execute up to twelve CPDUs without interaction from software.
  • Page 93: Mass Memory Handling

    Version Rev E Issue date 2017-03-07 Sirius OBC and TCM User Manual A watchdog is enabled in the TCM-S that must be kicked by the TCM-S Application or a reset will occur. 7.11. Mass Memory Handling The mass memory in TCM-S is intended for storage of telemetry data while awaiting transfer to ground.
  • Page 94: Device Command Distribution Service

    Version Rev E Issue date 2017-03-07 Sirius OBC and TCM User Manual 7.12.2. PUS-2 Device Command Distribution Service The TCM-S supports the command pulse distribution unit (CPDU) pulse commands in hardware as defined in 7.2.2 in [RD4]. The CPDU listens on virtual channel 2, APID 2.
  • Page 95: Input

    Document number 205065 Version Rev E Issue date 2017-03-07 Sirius OBC and TCM User Manual Table 7-9: RMAP predefined fields for routing Field Value Target Spw Address 0x01, 0x03 Reply Address 0x01, 0x03 7.13.1. Input The RMAP commands supported by the Sirius TCM are specified in the table below. See chapter 7.14.1 for details on each specific command.
  • Page 96: Output

    Document number 205065 Version Rev E Issue date 2017-03-07 Sirius OBC and TCM User Manual MMPartitionConfig 0xFF 0x0500030x Configuration of partition x MMPartitionSpace 0xFF 0x0500040x Reads available space in partition x. MMDownloadPartitionData 0xFF 0x0500050x Downloads partition x data via telemetry.
  • Page 97 Document number 205065 Version Rev E Issue date 2017-03-07 Sirius OBC and TCM User Manual 0x01 – FIFO error. 0x00 – No transfer in progress. UINT8 0x01 – Transfer in progress. RMAP reply status: Table 7-14: TMStatus reply status codes...
  • Page 98 Document number 205065 Version Rev E Issue date 2017-03-07 Sirius OBC and TCM User Manual EINVAL The driver for the TM device has not been initialized. I/O error. The TM device cannot be accessed 7.14.1.3. TMControl Controls generation of telemetry.
  • Page 99 Document number 205065 Version Rev E Issue date 2017-03-07 Sirius OBC and TCM User Manual I/O error. The TM device cannot be accessed 7.14.1.5. TMMCFCControl Controls the Master Channel Frame Counter generation for transfer frames. Table 7-21: TMMCFCControl data Byte...
  • Page 100 Document number 205065 Version Rev E Issue date 2017-03-07 Sirius OBC and TCM User Manual 7.14.1.7. TMPRControl Controls the Pseudo Randomization for transfer frames. Table 7-25: TMPRControl data Byte Type Description 0x00 – Disable (Default) UINT8 0x01 – Enable RMAP reply status (if a reply is requested):...
  • Page 101 Version Rev E Issue date 2017-03-07 Sirius OBC and TCM User Manual 7.14.1.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.
  • Page 102 Document number 205065 Version Rev E Issue date 2017-03-07 Sirius OBC and TCM User Manual I/O error. The TM device cannot be accessed 7.14.1.11. TMTSControl Configures the timestamping for transfer frames. Table 7-33: TMTSControl data Byte Type Description 0x00 – No timestamping (Default) 0x01 –...
  • Page 103 205065 Version Rev E Issue date 2017-03-07 Sirius OBC and TCM User Manual 7.14.1.13. TMSend Sends telemetry to the TM path on virtual channel 0. The data must contain at least one telemetry PUS Packet. Table 7-37: TMSend data Byte...
  • Page 104 Document number 205065 Version Rev E Issue date 2017-03-07 Sirius OBC and TCM User Manual Status Description code Success. EINVAL The driver for the TC device has not been initialized. I/O error. The TC device cannot be accessed 7.14.1.15. TCDRControl Configures derandomization for telecommand frames.
  • Page 105 Document number 205065 Version Rev E Issue date 2017-03-07 Sirius OBC and TCM User Manual UINT8 SDRAM EDAC Single Errors on instructions UINT8 SDRAM EDAC Single Errors on data UINT8 SDRAM EDAC Multiple Errors on instructions UINT8 SDRAM EDAC Multiple Errors on data...
  • Page 106 Version Rev E Issue date 2017-03-07 Sirius OBC and TCM User Manual 7.14.1.18. SCETConfig The SCET can be configured in three modes: Free-running (default), Master or Slave. Free-running mode: No external synchronization, the SCET is free-running using the internal oscillator as reference and outputs no PPS.
  • Page 107 Document number 205065 Version Rev E Issue date 2017-03-07 Sirius OBC and TCM User Manual EINVAL The driver for the UART device has not been initialized. I/O error. The UARTdevice cannot be accessed 7.14.1.20. MMData Read or write data from/to a partition...
  • Page 108 Document number 205065 Version Rev E Issue date 2017-03-07 Sirius OBC and TCM User Manual 7.14.1.21. MMStatus Reads mass memory status. Table 7-53: MMStatus data Byte Type Description Chip 3 status Bit 7 - WP# (Write protect Off: 1/On: 0)
  • Page 109 Document number 205065 Version Rev E Issue date 2017-03-07 Sirius OBC and TCM User Manual 7.14.1.22. MMWritePointer The writepointer of the specified partition is set/read by this command. Table 7-55: MMWritePointer data Byte Type Description Pointer’s byte position in the partition.
  • Page 110 Document number 205065 Version Rev E Issue date 2017-03-07 Sirius OBC and TCM User Manual Table 7-59: MMPartitionConfig data Byte Type Description Size in bytes. Must be in multiples of mass memory block size UINT64 (2097152 bytes) UINT32 The offset in blocks from the first block of the Mass Memory.
  • Page 111: Output

    Rev E Issue date 2017-03-07 Sirius OBC and TCM User Manual 7.14.1.26. MMDownloadPartitionData Downloads the data from the specified partition. The Virtual Channel used for the download is set by the partition configuration. The command is finished when as much data as possible of the requested length has been downloaded.
  • Page 112: Limitations

    Rev E Issue date 2017-03-07 Sirius OBC and TCM User Manual During initialization of the Sirius TCM partition configuration, Rd/Wr-pointers and wrap-flags are read from NVRAM and populate an area in RAM storing partition information. Access to a partition of the Mass Memory is handled in two steps. In the first step data is written or read to/from the partition.
  • Page 113: System-On-Chip Definitions

    Sirius OBC and TCM User Manual 8. System-on-Chip definitions In this section the peripherals, memory sections and interrupts defined for the SoC for the Sirius OBC and Sirius TCM are described 8.1. Memory mapping Table 8-1 - Sirius memory structure definition...
  • Page 114: Interrupt Sources

    Document number 205065 Version Rev E Issue date 2017-03-07 Sirius OBC and TCM User Manual 8.2. Interrupt sources The following interrupts are available to the processor: Table 8-2 - Sirius interrupt assignment Interrupt no. Function Description Reserved Internal use UART Debug...
  • Page 115: Boot Images And Boot Procedure

    Version Rev E Issue date 2017-03-07 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 116: Limitations

    Document number 205065 Version Rev E Issue date 2017-03-07 Sirius OBC and TCM User Manual Safe copy #2 0x20000 Safe copy #3 0x40000 Updated copy #1 0x80000 Updated copy #2 0xA0000 Updated copy #3 0xC0000 Table 8.5 Software image header...
  • Page 117: Soc Information Map

    Rev E Issue date 2017-03-07 Sirius OBC and TCM User Manual 8.8. SoC information map The information included in the SoC info block for the Sirius products can be found in Table 8-6. This information must be fetched from the gdb prompt and can be used as a check of which SoC version that is flashed on the board.
  • Page 118: Connector Interfaces

    Document number 205065 Version Rev E Issue date 2017-03-07 Sirius OBC and TCM User Manual 9. Connector interfaces 9.1. JTAG-RTL, FPGA-JTAG connector The following pins are available on the ST60-10P connector, see Table 9-1. Table 9-1 - JTAG pin-outs Pin #...
  • Page 119: Pwr - Power

    Document number 205065 Version Rev E Issue date 2017-03-07 Sirius OBC and TCM User Manual Pin 18 DEBUG-JTAG-TCK Debug Test clock 9.3. PWR – Power The following pins are available on the nano-D9 socket connector, see Table 9-4 Table 9-3 - Power pin-outs...
  • Page 120: Spw2 - Spacewire 2

    Strobe out, Positive Pin 9 SPW2_DOUT_LVDS_P Data out, Positive 9.6. ANALOG, Analog input and 3xGPIO (Sirius OBC only) The following pins are available on the nanoD25 socket connector, see Table 9-5 Table 9-6 – ANALOGS, 4xGPIO pin-outs Pin # Signal name...
  • Page 121: Digital, Pps Input And 12Xgpio

    Document number 205065 Version Rev E Issue date 2017-03-07 Sirius OBC and TCM User Manual Pin 21 Ground Pin 22 BIAS 2.5V bias voltage Pin 23 BIAS 2.5V bias voltage Pin 24 GPIO15 3.3V Digital I/O Pin 25 Ground 9.7. DIGITAL, PPS input and 12xGPIO...
  • Page 122: Uart0-2 - Rs422/485

    UART2_TX_RS4XX_P UART 2 TX Pin 14 UART2_TX_RS4XX_N Pin 15 Ground 9.9. UART3-5 - RS422/485 (Sirius OBC only) The following pins are available on the nanoD15 socket connector, see Table 9-8 Table 9-9 COM35_RS4XX pin-outs Pin # Signal name Description Pin 1...
  • Page 123 Document number 205065 Version Rev E Issue date 2017-03-07 Sirius OBC and TCM User Manual Pin 15 Ground www.aacmicrotec.com Page 123 of 131...
  • Page 124: Trx1 - Rs422 Transceiver Interface (Sirius Tcm Only)

    Rev E Issue date 2017-03-07 Sirius OBC and TCM User Manual 9.10. TRX1 - RS422 Transceiver interface (Sirius TCM only) The following pins are available on the nano-D25, socket connector, see Table 9-9. This connector can, for instance, be used for an S-BAND radio.
  • Page 125: Umbi - Baseband Umbilical (Sirius Tcm Only)

    Document number 205065 Version Rev E Issue date 2017-03-07 Sirius OBC and TCM User Manual Pin 4 TRX2_COUT_LVDS_N Pin 5 TRX2_DIN_LVDS_P Baseband data in, LVDS Pin 6 TRX2_DIN_LVDS_N Pin 7 TRX2_CIN_LVDS_P Baseband clock in, LVDS Pin 8 TRX2_CIN_LVDS_N Pin 9...
  • Page 126: Pulse Command Outputs (Sirius Tcm Only)

    Document number 205065 Version Rev E Issue date 2017-03-07 Sirius OBC and TCM User Manual Pin 13 UMBI_DETECT Umbilical detect input Pin 14 Ground (reference) Pin 15 Ground (reference) 9.13. Pulse Command Outputs (Sirius TCM only) The following pins are available on the nano-D25, socket connector, see Table 9-10...
  • Page 127: Updating The Sirius Fpga

    Issue date 2017-03-07 Sirius OBC and TCM User Manual 10. Updating the Sirius FPGA To be able to update the SoC on the Sirius OBC and Sirius TCM you need the following items. 10.1. Prerequisite hardware  Microsemi FlashPro5 unit ...
  • Page 128 Rev E Issue date 2017-03-07 Sirius OBC and TCM User Manual Figure 10-1 - Startup view of FlashPro Express Once the file has loaded (warnings might appear), click RUN (see Figure 10-2). Please note that the connected FlashPro5 programmed ID should be shown.
  • Page 129: Mechanical Data

    Rev E Issue date 2017-03-07 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 10-3.
  • Page 130: Glossary

    Document number 205065 Version Rev E Issue date 2017-03-07 Sirius OBC and TCM User Manual 12. Glossary Analog Digital Converter APID Application Process ID Board Support Package CCSDS The Consultative Committee for Space Data Systems EDAC Error Detection and Correction...
  • Page 131 Document number 205065 Version Rev E Issue date 2017-03-07 Sirius OBC and TCM User Manual www.aacmicrotec.com Page 131 of 131...

This manual is also suitable for:

Sirius tcm

Table of Contents