├── 1939 ├── Datatype.h ├── can.c ├── can.h ├── test_j1939_can.c ├── test_j1939_can.h ├── test_j1939_common.c ├── test_j1939_common.h ├── test_j1939_tp.c └── test_j1939_tp.h ├── APP ├── IAR │ ├── OS3.dep │ ├── OS3.ewd │ ├── OS3.ewp │ └── OS3.eww ├── app.c ├── app_cfg.h ├── app_probe.c ├── app_probe.h ├── app_serial.c ├── app_serial.h ├── bsp_cfg.h ├── cpu_cfg.h ├── lib_cfg.h ├── os_app_hooks.c ├── os_app_hooks.h ├── os_cfg.h ├── os_cfg_app.h └── probe_com_cfg.h ├── BSP ├── IAR-HCG │ ├── RM48L952ZWT-IAR-HCG.dil │ ├── RM48L952ZWT-IAR-HCG.hcg │ ├── include │ │ ├── Device_RM48.h │ │ ├── Device_header.h │ │ ├── Device_types.h │ │ ├── MemMap.h │ │ ├── adc.h │ │ ├── can.h │ │ ├── crc.h │ │ ├── dcc.h │ │ ├── dmm.h │ │ ├── emac.h │ │ ├── emif.h │ │ ├── esm.h │ │ ├── fee_interface.h │ │ ├── gio.h │ │ ├── hal_stdtypes.h │ │ ├── het.h │ │ ├── htu.h │ │ ├── hw_emac.h │ │ ├── hw_emac_ctrl.h │ │ ├── hw_mdio.h │ │ ├── hw_reg_access.h │ │ ├── hw_usb.h │ │ ├── i2c.h │ │ ├── lin.h │ │ ├── mdio.h │ │ ├── mibspi.h │ │ ├── phy_dp83640.h │ │ ├── pinmux.h │ │ ├── pom.h │ │ ├── reg_adc.h │ │ ├── reg_can.h │ │ ├── reg_crc.h │ │ ├── reg_dcc.h │ │ ├── reg_dma.h │ │ ├── reg_dmm.h │ │ ├── reg_efc.h │ │ ├── reg_emif.h │ │ ├── reg_esm.h │ │ ├── reg_flash.h │ │ ├── reg_gio.h │ │ ├── reg_het.h │ │ ├── reg_htu.h │ │ ├── reg_i2c.h │ │ ├── reg_lin.h │ │ ├── reg_mibspi.h │ │ ├── reg_pbist.h │ │ ├── reg_pcr.h │ │ ├── reg_pinmux.h │ │ ├── reg_pmm.h │ │ ├── reg_pom.h │ │ ├── reg_rti.h │ │ ├── reg_rtp.h │ │ ├── reg_sci.h │ │ ├── reg_spi.h │ │ ├── reg_stc.h │ │ ├── reg_system.h │ │ ├── reg_tcram.h │ │ ├── reg_vim.h │ │ ├── rti.h │ │ ├── rtp.h │ │ ├── sci.h │ │ ├── spi.h │ │ ├── std_nhet.h │ │ ├── sys_common.h │ │ ├── sys_core.h │ │ ├── sys_dma.h │ │ ├── sys_mpu.h │ │ ├── sys_pcr.h │ │ ├── sys_pmm.h │ │ ├── sys_pmu.h │ │ ├── sys_selftest.h │ │ ├── sys_vim.h │ │ ├── system.h │ │ ├── ti_fee.h │ │ ├── ti_fee_cfg.h │ │ ├── ti_fee_types.h │ │ ├── usb-ids.h │ │ ├── usb.h │ │ ├── usb_serial_structs.h │ │ ├── usbcdc.h │ │ ├── usbdcdc.h │ │ ├── usbdevice.h │ │ ├── usbdevicepriv.h │ │ └── usblib.h │ └── source │ │ ├── dabort.asm │ │ ├── esm.c │ │ ├── notification.c │ │ ├── pinmux.c │ │ ├── sys_core.asm │ │ ├── sys_dma.c │ │ ├── sys_intvecs.asm │ │ ├── sys_link.cmd │ │ ├── sys_main.c │ │ ├── sys_mpu.asm │ │ ├── sys_pcr.c │ │ ├── sys_phantom.c │ │ ├── sys_pmm.c │ │ ├── sys_pmu.asm │ │ ├── sys_selftest.c │ │ ├── sys_startup.c │ │ ├── sys_vim.c │ │ └── system.c ├── bsp.c ├── bsp.h ├── bsp_int.c ├── bsp_int.h ├── bsp_sys.c ├── bsp_sys.h ├── cpu_bsp.c ├── os_bsp.c ├── os_bsp.h ├── serial_bsp_rm48.c └── serial_bsp_rm48.h ├── Docs ├── ISO11898-1.pdf ├── ISO15765-2-2004.pdf ├── ISO15765-4-2005.pdf ├── ISO_15765-3-2004.pdf ├── OBD-II PIDs.pdf ├── SAE-J1939-21-2006.pdf ├── SAEJ1939-73-2006.PDF └── SAEJ1939协议在重型车OBD中的应用.pdf ├── OS ├── uC-CAN │ ├── Drivers │ │ ├── RM48L950 │ │ │ ├── drv_can.c │ │ │ ├── drv_can.h │ │ │ └── drv_can_reg.h │ │ └── drv_def.h │ ├── OS │ │ └── uCOS-III │ │ │ ├── can_os.c │ │ │ └── can_os.h │ └── Source │ │ ├── can_bus.c │ │ ├── can_bus.h │ │ ├── can_drv.h │ │ ├── can_err.h │ │ ├── can_frm.c │ │ ├── can_frm.h │ │ ├── can_msg.c │ │ ├── can_msg.h │ │ ├── can_sig.c │ │ └── can_sig.h ├── uC-CPU │ ├── ARM-Cortex-A │ │ ├── CCS │ │ │ ├── cpu.h │ │ │ └── cpu_a.asm │ │ └── IAR │ │ │ ├── cpu.h │ │ │ └── cpu_a.asm │ ├── cpu_cache.h │ ├── cpu_core.c │ ├── cpu_core.h │ └── cpu_def.h ├── uC-LIB │ ├── lib_ascii.c │ ├── lib_ascii.h │ ├── lib_def.h │ ├── lib_math.c │ ├── lib_math.h │ ├── lib_mem.c │ ├── lib_mem.h │ ├── lib_str.c │ └── lib_str.h ├── uC-Probe │ └── Target │ │ └── Communication │ │ └── Generic │ │ ├── OS │ │ └── uCOS-III │ │ │ └── probe_com_os.c │ │ ├── Serial │ │ ├── OS │ │ │ └── uCOS-III │ │ │ │ └── probe_serial_os.c │ │ └── Source │ │ │ ├── probe_serial.c │ │ │ └── probe_serial.h │ │ └── Source │ │ ├── probe_com.c │ │ └── probe_com.h ├── uC-Serial │ ├── Driver │ │ └── TI │ │ │ ├── serial_drv_rm48.c │ │ │ └── serial_drv_rm48.h │ ├── Line │ │ ├── serial_line_dflt.c │ │ ├── serial_line_dflt.h │ │ ├── serial_line_probe.c │ │ ├── serial_line_probe.h │ │ ├── serial_line_tty.c │ │ └── serial_line_tty.h │ ├── OS │ │ ├── serial_os.h │ │ └── uCOS-III │ │ │ └── serial_os.c │ └── Source │ │ ├── serial.c │ │ ├── serial.h │ │ ├── serial_buf.c │ │ ├── serial_buf.h │ │ └── serial_type.h └── uCOS-III │ ├── Ports │ └── ARM-Cortex-A │ │ └── Generic │ │ ├── CCS │ │ ├── os_cpu.h │ │ ├── os_cpu_a_vfp-d16.asm │ │ ├── os_cpu_a_vfp-d32.asm │ │ ├── os_cpu_a_vfp-none.asm │ │ └── os_cpu_c.c │ │ └── IAR │ │ ├── os_cpu.h │ │ ├── os_cpu_a_vfp-d16.asm │ │ ├── os_cpu_a_vfp-d32.asm │ │ ├── os_cpu_a_vfp-none.asm │ │ └── os_cpu_c.c │ └── Source │ ├── os.h │ ├── os_cfg_app.c │ ├── os_core.c │ ├── os_dbg.c │ ├── os_flag.c │ ├── os_int.c │ ├── os_mem.c │ ├── os_msg.c │ ├── os_mutex.c │ ├── os_pend_multi.c │ ├── os_prio.c │ ├── os_q.c │ ├── os_sem.c │ ├── os_stat.c │ ├── os_task.c │ ├── os_tick.c │ ├── os_time.c │ ├── os_tmr.c │ ├── os_type.h │ └── os_var.c └── README.md /1939/Datatype.h: -------------------------------------------------------------------------------- 1 | /* 2 | *************************************************************************** 3 | ** 4 | ** Copyright 2015 LETV, Inc. All rights reserved. 5 | ** 6 | ** LETV Proprietary Information. 7 | ** This document contains proprietary and confidential information and is 8 | ** tendered for information and evaluation purposes only; no copy or other 9 | ** use or dissemination by a third party can be made of this information 10 | ** without the express written permission of LETV. 11 | ** 12 | *************************************************************************** 13 | */ 14 | 15 | /* 16 | *************************************************************************** 17 | ** Filename: Datatype.h 18 | ** Author: 19 | ** Date: 20 | ** Description: J1939 transmit protocol 21 | *************************************************************************** 22 | **/ 23 | #include "stdint.h" 24 | 25 | 26 | #ifndef _DATATYPE_H 27 | 28 | #define _DATATYPE_H 29 | 30 | /*** Define MISRA C datatype ***/ 31 | /* 32 | typedef signed char int8_t; 33 | typedef unsigned char uint8_t; 34 | typedef volatile signed char vint8_t; 35 | typedef volatile unsigned char vuint8_t; 36 | typedef signed short int16_t; 37 | typedef unsigned short uint16_t; 38 | typedef volatile signed short vint16_t; 39 | typedef volatile unsigned short vuint16_t; 40 | typedef signed long int int32_t; 41 | typedef unsigned long int uint32_t; 42 | typedef volatile signed long int vint32_t; 43 | typedef volatile unsigned long int vuint32_t; 44 | */ 45 | typedef float float32_t; 46 | typedef long double float64_t; 47 | typedef unsigned char bool_t; 48 | 49 | 50 | #ifndef FALSE 51 | #define FALSE 0U 52 | #endif 53 | 54 | #ifndef TRUE 55 | #define TRUE 1U 56 | #endif 57 | 58 | #ifndef NULL 59 | #define NULL 0 60 | #endif 61 | 62 | 63 | /*** CAN signal data define ****/ 64 | 65 | typedef struct 66 | { 67 | uint16_t startBit; /* bit, Motorola signal start bit */ 68 | uint8_t length; /* bits, signal length */ 69 | float32_t factor; /* units/bit, resolution */ 70 | float32_t offset; /* units, offset */ 71 | float32_t min; /* units, minimum allowed value */ 72 | float32_t max; /* units, maximum allowed value */ 73 | uint8_t is_signed; /* flag, signed value */ 74 | uint8_t byteOrder; /* byte order, Motorola or Intel format */ 75 | } struct_can_sig_consts; 76 | 77 | typedef struct 78 | { 79 | float32_t eng; /* engineering value */ 80 | const struct_can_sig_consts *sigdef; /* pointer to signal constants definition */ 81 | } struct_can_sig; 82 | 83 | 84 | #endif 85 | -------------------------------------------------------------------------------- /1939/test_j1939_can.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | *************************************************************************** 4 | ** Filename: test_j1939_can.h 5 | ** Author: 6 | ** Date: 7 | ** Description: mailbox index define 8 | *************************************************************************** 9 | **/ 10 | /*************************************************************************** 11 | *** MailBox for CAN1 Definition *******************************************/ 12 | 13 | /*************************************************************************** 14 | *** MailBox for CAN2 Definition *******************************************/ 15 | #define MAILBOX_CM_BCM_TO_CHG 1 16 | #define MAILBOX_DT_BCM_TO_CHG 2 17 | #define MAILBOX_CM_CHG_TO_BCM 3 18 | #define MAILBOX_TP_TRIG 4 19 | #define MAILBOX_MSG_BCL 5 20 | #define MAILBOX_MSG_BCP 6 21 | #define MAILBOX_MSG_BCS 7 22 | #define MAILBOX_MSG_BEM 8 23 | #define MAILBOX_MSG_BHM 9 24 | #define MAILBOX_MSG_BRO 10 25 | #define MAILBOX_MSG_BSD 11 26 | #define MAILBOX_MSG_BSM 12 27 | #define MAILBOX_MSG_BST 13 28 | #define MAILBOX_MSG_DEBUG 14 29 | #define MAILBOX_MSG_CCS 15 30 | #define MAILBOX_MSG_CEM 16 31 | #define MAILBOX_MSG_CHM 17 32 | #define MAILBOX_MSG_CML 18 33 | #define MAILBOX_MSG_CRM 19 34 | #define MAILBOX_MSG_CRO 20 35 | #define MAILBOX_MSG_CSD 21 36 | #define MAILBOX_MSG_CST 22 37 | #define MAILBOX_MSG_CTS 23 38 | 39 | /*************************************************************************** 40 | *** MailBox for CAN3 Definition *******************************************/ 41 | 42 | 43 | /*************************************************************************** 44 | *** API fucntion define **************************************************/ 45 | void CAN_MailBoxInit(void); 46 | 47 | -------------------------------------------------------------------------------- /1939/test_j1939_common.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | *************************************************************************** 4 | ** Filename: test_j1939_common.h 5 | ** Author: 6 | ** Date: 7 | ** Description: 8 | *************************************************************************** 9 | **/ 10 | #include "DataType.h" 11 | 12 | 13 | #ifndef _TEST_COMMON_H 14 | #define _TEST_COMMON_H 15 | 16 | 17 | /*************************************************************************/ 18 | /* Defines */ 19 | /*************************************************************************/ 20 | 21 | 22 | 23 | /*************************************************************************/ 24 | /* API functions */ 25 | /*************************************************************************/ 26 | struct_can_sig InitializeCanSignal(const struct_can_sig_consts *c); 27 | void RawToEng_sig(struct_can_sig* s, uint16_t raw); 28 | uint16_t EngToRaw_sig(const struct_can_sig s); 29 | uint32_t canUnPack32(const struct_can_sig_consts *sig, uint8_t *b); 30 | uint16_t canUnPack16(const struct_can_sig_consts *sig, uint8_t *b); 31 | uint8_t canUnPack8(const struct_can_sig_consts *sig, uint8_t *b); 32 | uint8_t canPack32(const struct_can_sig_consts *c, uint32_t value, uint8_t *b); 33 | uint8_t canPack16(const struct_can_sig_consts *c, uint16_t value, uint8_t *b); 34 | uint8_t canPack8(const struct_can_sig_consts *c, uint8_t value, uint8_t *b); 35 | float32_t Get_SigVal(struct_can_sig sig); 36 | void SetEngVal(struct_can_sig* s, float32_t eng); 37 | uint16_t LoopMe(uint16_t value, uint16_t limit); 38 | float32_t abs_f32(const float32_t value); 39 | #endif 40 | -------------------------------------------------------------------------------- /1939/test_j1939_tp.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | *************************************************************************** 4 | ** Filename: test_j1939_tp.h 5 | ** Author: 6 | ** Date: 7 | ** Description: J1939 transmit protocol 8 | *************************************************************************** 9 | **/ 10 | #include "DataType.h" 11 | #include "can.h" 12 | #include "test_j1939_can.h" 13 | #ifndef _TEST_J1939_H 14 | #define _TEST_J1939_H 15 | 16 | #define J1939_MAX_MESSAGE_LENGTH 170 //1785 17 | #define J1939_MAX_DATA_SIZE 8 18 | 19 | #define MAX_NUM_ERRORS 3 20 | 21 | 22 | /* 23 | --- Connection Management defines 24 | */ 25 | #define RTS_CONTROL_BYTE 0x10 26 | #define BAM_CONTROL_BYTE 0x20 27 | #define CTS_CONTROL_BYTE 0x11 28 | #define EOM_CONTROL_BYTE 0x13 29 | #define ABORT_CONTROL_BYTE 0xFF 30 | #define RESERVED_BYTE 0xFF 31 | #define CM_PDU_FORMAT 0xEC 32 | #define CM_PDU_DATA 0xEB 33 | #define CM_PDU_FORMAT_PGN 0xEC00 34 | #define CM_PDU_DATA_PGN 0xEB00 35 | 36 | 37 | #define CM_PDU_FORMAT 0xEC 38 | #define CM_PDU_DATA 0xEB 39 | #define CM_PDU_FORMAT_PGN 0xEC00 40 | #define CM_PDU_DATA_PGN 0xEB00 41 | 42 | /* State defines */ 43 | #define BAM_WAIT_STATE 0 44 | #define TIMER_RESETSTATE 1 45 | #define BAM_START_STATE 2 46 | #define BAM_NEXT_PACKET 3 47 | #define CM_START_STATE 4 48 | #define CM_WAIT_RESPONSE 5 49 | #define ABORT_STATE 6 50 | #define CM_NEXT_PACKET 7 51 | #define CM_NEXT_PACKET_WAIT 8 52 | 53 | /* connection timeout define */ 54 | #define TP_CM_TIMER 1250 /* 1250ms */ 55 | #define TP_CM_KEEP_TIMER 250 /* 250ms timer refresh after receive a keep waiting command */ 56 | 57 | /* default transport priority */ 58 | #define DEFAULT_TRANSPORT_PRIORITY 7 59 | 60 | /** define for J1939 CAN message **/ 61 | typedef unsigned long PGN_T; 62 | 63 | typedef struct 64 | { 65 | PGN_T PGN ; 66 | uint8_t data[J1939_MAX_MESSAGE_LENGTH] ; 67 | uint16_t byte_count ; 68 | uint8_t priority ; 69 | uint8_t dest_addr; 70 | 71 | } J1939_TX_MESSAGE_T ; 72 | 73 | typedef struct 74 | { 75 | PGN_T PGN ; 76 | uint8_t data[J1939_MAX_MESSAGE_LENGTH] ; 77 | uint16_t byte_count ; 78 | uint8_t source_addr ; 79 | uint8_t dest_addr ; 80 | } J1939_RX_MESSAGE_T ; 81 | 82 | typedef struct 83 | { 84 | J1939_TX_MESSAGE_T tx_msg_ptr ; 85 | uint16_t time ; 86 | int8_t retry ; 87 | uint8_t packet_index ; 88 | uint8_t total_packets ; 89 | uint8_t packets_ok_to_send; 90 | uint8_t state ; 91 | } J1939_TRANSPORT_TX_INFO ; 92 | 93 | typedef enum 94 | { 95 | ENUM_TP_TYPE_RTS = 16, 96 | ENUM_TP_TYPE_CTS = 17, 97 | ENUM_TP_TYPE_ENDOFACK = 19, 98 | ENUM_TP_TYPE_ABORT = 255, 99 | }enum_tp_control_type; 100 | 101 | typedef enum 102 | { 103 | ENUM_CM_TIMEOUT_NORMAL = 0, 104 | ENUM_CM_TIMEOUT_ABNORMAL = 1, 105 | }enum_cm_timeout_type; 106 | /** define J1939 transmit step **/ 107 | typedef enum 108 | { 109 | ENUM_J1939_TX_WAIT, 110 | ENUM_J1939_TX_CM_START, 111 | ENUM_J1939_TX_CM_WAIT, 112 | ENUM_J1939_TX_DT, 113 | ENUM_J1939_WAIT_ACK, 114 | ENUM_J1939_TX_ERROR, 115 | ENUM_J1939_TX_DONE, 116 | }enum_j1939_tx_step; 117 | 118 | 119 | /* API for J1939 TP*/ 120 | void J1393_Init(void); 121 | void J1939_Main(uint16_t dt_ms); 122 | void J1939_CAN_Tx(J1939_TX_MESSAGE_T msg); 123 | #endif 124 | -------------------------------------------------------------------------------- /APP/IAR/OS3.eww: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | $WS_DIR$\OS3.ewp 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /APP/app_probe.c: -------------------------------------------------------------------------------- 1 | /* 2 | ********************************************************************************************************* 3 | * EXAMPLE CODE 4 | * 5 | * This file is provided as an example on how to use Micrium products. 6 | * 7 | * Please feel free to use any application code labeled as 'EXAMPLE CODE' in 8 | * your application products. Example code may be used as is, in whole or in 9 | * part, or may be used as a reference only. This file can be modified as 10 | * required to meet the end-product requirements. 11 | * 12 | * Please help us continue to provide the Embedded community with the finest 13 | * software available. Your honesty is greatly appreciated. 14 | * 15 | * You can find our product's user manual, API reference, release notes and 16 | * more information at https://doc.micrium.com. 17 | * You can contact us at www.micrium.com. 18 | ********************************************************************************************************* 19 | */ 20 | 21 | /* 22 | ********************************************************************************************************* 23 | * 24 | * uC/Probe 25 | * Application Code 26 | * 27 | * Filename : app_probe.c 28 | * Version : V1.00 29 | * Programmer(s) : FT 30 | ********************************************************************************************************* 31 | */ 32 | 33 | /* 34 | ********************************************************************************************************* 35 | * INCLUDE FILES 36 | ********************************************************************************************************* 37 | */ 38 | #define APP_PROBE_MODULE 39 | #include 40 | 41 | 42 | /* 43 | ********************************************************************************************************* 44 | * ENABLE 45 | ********************************************************************************************************* 46 | */ 47 | 48 | #if (APP_CFG_PROBE_COM_EN == DEF_ENABLED) 49 | 50 | /* 51 | ********************************************************************************************************* 52 | * LOCAL GLOBAL VARIABLES 53 | ********************************************************************************************************* 54 | */ 55 | 56 | 57 | /* 58 | ********************************************************************************************************* 59 | * FUNCTION PROTOTYPES 60 | ********************************************************************************************************* 61 | */ 62 | 63 | 64 | /* 65 | ********************************************************************************************************* 66 | * LOCAL CONFIGURATION ERRORS 67 | ********************************************************************************************************* 68 | */ 69 | 70 | 71 | /* 72 | ********************************************************************************************************* 73 | * App_ProbeInit() 74 | * 75 | * Description : Initialize all uC/Probe modules. 76 | * 77 | * Argument(s) : none. 78 | * 79 | * Return(s) : none. 80 | * 81 | * Note(s) : none 82 | ********************************************************************************************************* 83 | */ 84 | 85 | 86 | void App_ProbeInit (void) 87 | { 88 | #if (APP_CFG_PROBE_COM_EN == DEF_ENABLED) && \ 89 | (PROBE_COM_CFG_SERIAL_EN == DEF_ENABLED) 90 | SERIAL_IF_CFG uart_cfg; 91 | #endif 92 | 93 | #if (APP_CFG_PROBE_COM_EN == DEF_ENABLED) 94 | APP_TRACE_INFO(("Initializing uC/Probe ... \n\r")); 95 | ProbeCom_Init(); /* Initialize the uC/Probe communications module */ 96 | 97 | #if ((PROBE_COM_CFG_SERIAL_EN == DEF_ENABLED ) && \ 98 | (APP_SERIAL_CFG_TRACE_EN == DEF_DISABLED ) && \ 99 | (APP_CFG_TRACE_LEVEL == TRACE_LEVEL_OFF)) 100 | uart_cfg.Baudrate = SERIAL_BAUDRATE_115200; 101 | uart_cfg.DataBits = SERIAL_DATABITS_8; 102 | uart_cfg.StopBits = SERIAL_STOPBITS_1; 103 | uart_cfg.Parity = SERIAL_PARITY_NONE; 104 | uart_cfg.FlowCtrl = SERIAL_FLOW_CTRL_NONE; 105 | 106 | ProbeSerial_Init((CPU_CHAR *)APP_CFG_PROBE_SERIAL_PORT_NAME, 107 | (SERIAL_IF_CFG *)&uart_cfg); 108 | #endif 109 | 110 | 111 | #if (PROBE_COM_CFG_TCPIP_EN == DEF_ENABLED) 112 | ProbeTCPIP_Init(); 113 | #endif 114 | #endif 115 | } 116 | 117 | #endif 118 | -------------------------------------------------------------------------------- /APP/bsp_cfg.h: -------------------------------------------------------------------------------- 1 | /* 2 | ********************************************************************************************************* 3 | * EXAMPLE CODE 4 | * 5 | * This file is provided as an example on how to use Micrium products. 6 | * 7 | * Please feel free to use any application code labeled as 'EXAMPLE CODE' in 8 | * your application products. Example code may be used as is, in whole or in 9 | * part, or may be used as a reference only. This file can be modified as 10 | * required to meet the end-product requirements. 11 | * 12 | * Please help us continue to provide the Embedded community with the finest 13 | * software available. Your honesty is greatly appreciated. 14 | * 15 | * You can find our product's user manual, API reference, release notes and 16 | * more information at https://doc.micrium.com. 17 | * You can contact us at www.micrium.com. 18 | ********************************************************************************************************* 19 | */ 20 | 21 | 22 | /* 23 | ********************************************************************************************************* 24 | * MICRIUM BOARD SUPPORT PACKAGE 25 | * 26 | * Texas Instruments 27 | * RM48x Hercules Development Kit(HDK) 28 | * 29 | * Filename : bsp_cfg.h 30 | * Version : V1.00 31 | * Programmer(s) : FF 32 | ********************************************************************************************************* 33 | */ 34 | 35 | #ifndef BSP_CFG_H 36 | #define BSP_CFG_H 37 | 38 | 39 | /* 40 | ********************************************************************************************************* 41 | * MODULES ENABLE 42 | ********************************************************************************************************* 43 | */ 44 | 45 | #define BSP_CFG_CAN_EN 0 /* Enable (1) or Disable (0) uC/CAN */ 46 | #define BSP_CFG_CAN_OPEN_EN 0 /* Enable (1) or Disable (0) uC/CANopen */ 47 | #define BSP_CFG_FS_EN 0 /* Enable (1) or Disable (0) uC/FS */ 48 | #define BSP_CFG_GUI_EN 0 /* Enable (1) or Disable (0) uC/GUI */ 49 | #define BSP_CFG_MBM_EN 0 /* Enable (1) or Disable (0) uC/Modbus-Master */ 50 | #define BSP_CFG_MBS_EN 0 /* Enable (1) or Disable (0) uC/Modbus-Slave */ 51 | #define BSP_CFG_NET_EN 0 /* Enable (1) or Disable (0) uC/TCP-IP */ 52 | #define BSP_CFG_OS2_EN 0 /* Enable (1) or Disable (0) uC/OS-II */ 53 | #define BSP_CFG_OS3_EN 1 /* Enable (1) or Disable (0) uC/OS-III */ 54 | #define BSP_CFG_USBD_EN 0 /* Enable (1) or Disable (0) uC/USB-D */ 55 | #define BSP_CFG_USBH_EN 0 /* Enable (1) or Disable (0) uC/USB-H */ 56 | 57 | /* 58 | ********************************************************************************************************* 59 | * INTERRUPT VECTOR TABLE 60 | ********************************************************************************************************* 61 | */ 62 | 63 | 64 | /* 65 | ********************************************************************************************************* 66 | * CLOCK MANAGEMENT 67 | ********************************************************************************************************* 68 | */ 69 | 70 | #define BSP_CFG_SYS_EXT_CLK_FREQ 16000000uL 71 | 72 | /* 73 | ********************************************************************************************************* 74 | * BOARD SPECIFIC BSPs 75 | ********************************************************************************************************* 76 | */ 77 | 78 | #define BSP_CFG_SER_EN 0 /* Enable (1) or Disable (0) Serial port BSP */ 79 | 80 | #endif 81 | -------------------------------------------------------------------------------- /APP/os_app_hooks.h: -------------------------------------------------------------------------------- 1 | /* 2 | ************************************************************************************************************************ 3 | * uC/OS-III 4 | * The Real-Time Kernel 5 | * 6 | * (c) Copyright 2009-2015; Micrium, Inc.; Weston, FL 7 | * All rights reserved. Protected by international copyright laws. 8 | * 9 | * APPLICATION HOOKS 10 | * 11 | * File : OS_APP_HOOKS.H 12 | * By : JJL 13 | * Version : V3.04.05 14 | * 15 | * LICENSING TERMS: 16 | * --------------- 17 | * uC/OS-III is provided in source form for FREE short-term evaluation, for educational use or 18 | * for peaceful research. If you plan or intend to use uC/OS-III in a commercial application/ 19 | * product then, you need to contact Micrium to properly license uC/OS-III for its use in your 20 | * application/product. We provide ALL the source code for your convenience and to help you 21 | * experience uC/OS-III. The fact that the source is provided does NOT mean that you can use 22 | * it commercially without paying a licensing fee. 23 | * 24 | * Knowledge of the source code may NOT be used to develop a similar product. 25 | * 26 | * Please help us continue to provide the embedded community with the finest software available. 27 | * Your honesty is greatly appreciated. 28 | * 29 | * You can find our product's user manual, API reference, release notes and 30 | * more information at https://doc.micrium.com. 31 | * You can contact us at www.micrium.com. 32 | ************************************************************************************************************************ 33 | */ 34 | 35 | #ifndef OS_APP_HOOKS_H 36 | #define OS_APP_HOOKS_H 37 | 38 | 39 | #ifdef OS_APP_HOOKS_H_GLOBALS 40 | #define OS_APP_HOOKS_H_EXT 41 | #else 42 | #define OS_APP_HOOKS_H_EXT extern 43 | #endif 44 | 45 | /* 46 | ************************************************************************************************************************ 47 | * INCLUDE HEADER FILES 48 | ************************************************************************************************************************ 49 | */ 50 | 51 | #include 52 | 53 | /* 54 | ************************************************************************************************************************ 55 | * FUNCTION PROTOTYPES 56 | ************************************************************************************************************************ 57 | */ 58 | 59 | void App_OS_SetAllHooks (void); 60 | void App_OS_ClrAllHooks (void); 61 | 62 | 63 | /* ---------------------- HOOKS --------------------- */ 64 | void App_OS_TaskCreateHook(OS_TCB *p_tcb); 65 | void App_OS_TaskDelHook (OS_TCB *p_tcb); 66 | void App_OS_TaskReturnHook(OS_TCB *p_tcb); 67 | 68 | void App_OS_IdleTaskHook (void); 69 | void App_OS_InitHook (void); 70 | void App_OS_StatTaskHook (void); 71 | void App_OS_TaskSwHook (void); 72 | void App_OS_TimeTickHook (void); 73 | 74 | #endif 75 | -------------------------------------------------------------------------------- /APP/os_cfg_app.h: -------------------------------------------------------------------------------- 1 | /* 2 | ************************************************************************************************************************ 3 | * uC/OS-III 4 | * The Real-Time Kernel 5 | * 6 | * (c) Copyright 2009-2015; Micrium, Inc.; Weston, FL 7 | * All rights reserved. Protected by international copyright laws. 8 | * 9 | * OS CONFIGURATION (APPLICATION SPECIFICS) 10 | * 11 | * File : OS_CFG_APP.H 12 | * By : JJL 13 | * Version : V3.04.05 14 | * 15 | * LICENSING TERMS: 16 | * --------------- 17 | * uC/OS-III is provided in source form for FREE short-term evaluation, for educational use or 18 | * for peaceful research. If you plan or intend to use uC/OS-III in a commercial application/ 19 | * product then, you need to contact Micrium to properly license uC/OS-III for its use in your 20 | * application/product. We provide ALL the source code for your convenience and to help you 21 | * experience uC/OS-III. The fact that the source is provided does NOT mean that you can use 22 | * it commercially without paying a licensing fee. 23 | * 24 | * Knowledge of the source code may NOT be used to develop a similar product. 25 | * 26 | * Please help us continue to provide the embedded community with the finest software available. 27 | * Your honesty is greatly appreciated. 28 | * 29 | * You can find our product's user manual, API reference, release notes and 30 | * more information at https://doc.micrium.com. 31 | * You can contact us at www.micrium.com. 32 | ************************************************************************************************************************ 33 | */ 34 | 35 | #ifndef OS_CFG_APP_H 36 | #define OS_CFG_APP_H 37 | 38 | /* 39 | ************************************************************************************************************************ 40 | * CONSTANTS 41 | ************************************************************************************************************************ 42 | */ 43 | 44 | /* --------------------- MISCELLANEOUS ------------------ */ 45 | #define OS_CFG_MSG_POOL_SIZE 100u /* Maximum number of messages */ 46 | 47 | #define OS_CFG_ISR_STK_SIZE 512u /* Stack size of ISR stack (number of CPU_STK elements) */ 48 | 49 | #define OS_CFG_TASK_STK_LIMIT_PCT_EMPTY 10u /* Stack limit position in percentage to empty */ 50 | 51 | 52 | /* ---------------------- IDLE TASK --------------------- */ 53 | #define OS_CFG_IDLE_TASK_STK_SIZE 128u /* Stack size (number of CPU_STK elements) */ 54 | 55 | 56 | /* ------------------ ISR HANDLER TASK ------------------ */ 57 | #define OS_CFG_INT_Q_SIZE 10u /* Size of ISR handler task queue */ 58 | #define OS_CFG_INT_Q_TASK_STK_SIZE 128u /* Stack size (number of CPU_STK elements) */ 59 | 60 | 61 | /* ------------------- STATISTIC TASK ------------------- */ 62 | #define OS_CFG_STAT_TASK_PRIO 2u /* Priority */ 63 | #define OS_CFG_STAT_TASK_RATE_HZ 10u /* Rate of execution (1 to 10 Hz) */ 64 | #define OS_CFG_STAT_TASK_STK_SIZE 128u /* Stack size (number of CPU_STK elements) */ 65 | 66 | 67 | /* ------------------------ TICKS ----------------------- */ 68 | #define OS_CFG_TICK_RATE_HZ 1000u /* Tick rate in Hertz (10 to 1000 Hz) */ 69 | #define OS_CFG_TICK_TASK_PRIO 1u /* Priority */ 70 | #define OS_CFG_TICK_TASK_STK_SIZE 128u /* Stack size (number of CPU_STK elements) */ 71 | 72 | 73 | /* ----------------------- TIMERS ----------------------- */ 74 | #define OS_CFG_TMR_TASK_PRIO 12u /* Priority of 'Timer Task' */ 75 | #define OS_CFG_TMR_TASK_RATE_HZ 10u /* Rate for timers (10 Hz Typ.) */ 76 | #define OS_CFG_TMR_TASK_STK_SIZE 128u /* Stack size (number of CPU_STK elements) */ 77 | 78 | #endif 79 | -------------------------------------------------------------------------------- /BSP/IAR-HCG/include/Device_RM48.h: -------------------------------------------------------------------------------- 1 | /********************************************************************************************************************** 2 | * FILE DESCRIPTION 3 | * ------------------------------------------------------------------------------------------------------------------- 4 | * File: Device_RM57.c 5 | * Project: Tms570_TIFEEDriver 6 | * Module: TIFEEDriver 7 | * Generator: None 8 | * 9 | * Description: This file defines the number of sectors. 10 | *--------------------------------------------------------------------------------------------------------------------- 11 | * Author: Vishwanath Reddy 12 | *--------------------------------------------------------------------------------------------------------------------- 13 | * Revision History 14 | *--------------------------------------------------------------------------------------------------------------------- 15 | * Version Date Author Change ID Description 16 | *--------------------------------------------------------------------------------------------------------------------- 17 | * 01.15.00 06Jun2014 Vishwanath Reddy History Added. 18 | *********************************************************************************************************************/ 19 | 20 | /* 21 | * Copyright (C) 2009-2015 Texas Instruments Incorporated - www.ti.com 22 | * 23 | * 24 | * Redistribution and use in source and binary forms, with or without 25 | * modification, are permitted provided that the following conditions 26 | * are met: 27 | * 28 | * Redistributions of source code must retain the above copyright 29 | * notice, this list of conditions and the following disclaimer. 30 | * 31 | * Redistributions in binary form must reproduce the above copyright 32 | * notice, this list of conditions and the following disclaimer in the 33 | * documentation and/or other materials provided with the 34 | * distribution. 35 | * 36 | * Neither the name of Texas Instruments Incorporated nor the names of 37 | * its contributors may be used to endorse or promote products derived 38 | * from this software without specific prior written permission. 39 | * 40 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 41 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 42 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 43 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 44 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 45 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 46 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 47 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 48 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 49 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 50 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 51 | * 52 | */ 53 | 54 | /********************************************************************************************************************* 55 | * INCLUDES 56 | *********************************************************************************************************************/ 57 | 58 | #ifndef DEVICE_RM48_H 59 | #define DEVICE_RM48_H 60 | 61 | 62 | /** @def DEVICE_CONFIGURATION_VERSION 63 | * @brief Device Configuration Version 64 | * 65 | * @note Indicates the current version of the device files 66 | */ 67 | #define DEVICE_CONFIGURATION_VERSION 0U /* Indicates the current version of the device files */ 68 | 69 | /** @def DEVICE_NUMBER_OF_FLASH_BANKS 70 | * @brief Number of Flash Banks 71 | * 72 | * @note Defines the number of Flash Banks on the device 73 | */ 74 | #define DEVICE_NUMBER_OF_FLASH_BANKS 1U /* Defines the number of Flash Banks on the device */ 75 | 76 | 77 | /** @def DEVICE_BANK_MAX_NUMBER_OF_SECTORS 78 | * @brief Maximum number of Sectors 79 | * 80 | * @note Defines the maxium number of sectors in all banks 81 | */ 82 | #define DEVICE_BANK_MAX_NUMBER_OF_SECTORS 4U /* Defines the maxium number of sectors in all banks */ 83 | 84 | /** @def DEVICE_BANK1_NUMBER_OF_SECTORS 85 | * @brief Number of Sectors 86 | * 87 | * @note Defines the number of sectors in bank1 88 | */ 89 | #define DEVICE_BANK1_NUMBER_OF_SECTORS 4U /* Defines the number of sectors in bank1 */ 90 | 91 | 92 | /** @def DEVICE_NUMBER_OF_READ_CYCLE_THRESHOLDS 93 | * @brief Number of Sectors 94 | * 95 | * @note Defines the number of Read Cycle Thresholds 96 | */ 97 | #define DEVICE_NUMBER_OF_READ_CYCLE_THRESHOLDS 4U /* Defines the number of Read Cycle Thresholds */ 98 | 99 | 100 | /* Include Files */ 101 | #ifndef _PLATFORM_TYPES_H_ 102 | #define _PLATFORM_TYPES_H_ 103 | #endif 104 | #include "F021.h" 105 | #include "hal_stdtypes.h" 106 | #include "Device_types.h" 107 | 108 | #endif /* DEVICE_RM48_H */ 109 | 110 | /* End of File */ 111 | -------------------------------------------------------------------------------- /BSP/IAR-HCG/include/Device_header.h: -------------------------------------------------------------------------------- 1 | /********************************************************************************************************************** 2 | * FILE DESCRIPTION 3 | * ------------------------------------------------------------------------------------------------------------------- 4 | * File: Device_header.h 5 | * Project: Tms570_TIFEEDriver 6 | * Module: TIFEEDriver 7 | * Generator: None 8 | * 9 | * Description: This file includes the header file. 10 | *--------------------------------------------------------------------------------------------------------------------- 11 | * Author: Vishwanath Reddy 12 | *--------------------------------------------------------------------------------------------------------------------- 13 | * Revision History 14 | *--------------------------------------------------------------------------------------------------------------------- 15 | * Version Date Author Change ID Description 16 | *--------------------------------------------------------------------------------------------------------------------- 17 | * 01.15.00 06Jun2014 Vishwanath Reddy History Added. 18 | *********************************************************************************************************************/ 19 | 20 | /* 21 | * Copyright (C) 2009-2015 Texas Instruments Incorporated - www.ti.com 22 | * 23 | * 24 | * Redistribution and use in source and binary forms, with or without 25 | * modification, are permitted provided that the following conditions 26 | * are met: 27 | * 28 | * Redistributions of source code must retain the above copyright 29 | * notice, this list of conditions and the following disclaimer. 30 | * 31 | * Redistributions in binary form must reproduce the above copyright 32 | * notice, this list of conditions and the following disclaimer in the 33 | * documentation and/or other materials provided with the 34 | * distribution. 35 | * 36 | * Neither the name of Texas Instruments Incorporated nor the names of 37 | * its contributors may be used to endorse or promote products derived 38 | * from this software without specific prior written permission. 39 | * 40 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 41 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 42 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 43 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 44 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 45 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 46 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 47 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 48 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 49 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 50 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 51 | * 52 | */ 53 | 54 | 55 | /********************************************************************************************************************* 56 | * INCLUDES 57 | *********************************************************************************************************************/ 58 | 59 | #ifndef TI_FEE_DEVICEHEADER_H 60 | #define TI_FEE_DEVICEHEADER_H 61 | 62 | /* Uncomment the appropriate include file depending on the device you are using */ 63 | #include "Device_RM48.h" 64 | 65 | /* End of file */ 66 | #endif 67 | 68 | -------------------------------------------------------------------------------- /BSP/IAR-HCG/include/MemMap.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright (C) 2009-2015 Texas Instruments Incorporated - www.ti.com 4 | * 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions 8 | * are met: 9 | * 10 | * Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 13 | * Redistributions in binary form must reproduce the above copyright 14 | * notice, this list of conditions and the following disclaimer in the 15 | * documentation and/or other materials provided with the 16 | * distribution. 17 | * 18 | * Neither the name of Texas Instruments Incorporated nor the names of 19 | * its contributors may be used to endorse or promote products derived 20 | * from this software without specific prior written permission. 21 | * 22 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 23 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 24 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 25 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 26 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 27 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 28 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 29 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 30 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 31 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 32 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 33 | * 34 | */ 35 | 36 | #ifndef __MEM_MAP_H__ 37 | #define __MEM_MAP_H__ 38 | 39 | #endif /* __MEM_MAP_H__ */ 40 | -------------------------------------------------------------------------------- /BSP/IAR-HCG/include/emif.h: -------------------------------------------------------------------------------- 1 | /** @file emif.h 2 | * @brief emif Driver Definition File 3 | * @date 03.Apr.2015 4 | * @version 04.04.00 5 | * 6 | */ 7 | 8 | /* 9 | * Copyright (C) 2009-2015 Texas Instruments Incorporated - www.ti.com 10 | * 11 | * 12 | * Redistribution and use in source and binary forms, with or without 13 | * modification, are permitted provided that the following conditions 14 | * are met: 15 | * 16 | * Redistributions of source code must retain the above copyright 17 | * notice, this list of conditions and the following disclaimer. 18 | * 19 | * Redistributions in binary form must reproduce the above copyright 20 | * notice, this list of conditions and the following disclaimer in the 21 | * documentation and/or other materials provided with the 22 | * distribution. 23 | * 24 | * Neither the name of Texas Instruments Incorporated nor the names of 25 | * its contributors may be used to endorse or promote products derived 26 | * from this software without specific prior written permission. 27 | * 28 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 29 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 30 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 31 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 32 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 33 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 34 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 35 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 36 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 37 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 38 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 39 | * 40 | */ 41 | 42 | 43 | #ifndef _EMIF_H_ 44 | #define _EMIF_H_ 45 | 46 | #include "reg_emif.h" 47 | 48 | #ifdef __cplusplus 49 | extern "C" { 50 | #endif 51 | 52 | /* USER CODE BEGIN (0) */ 53 | /* USER CODE END */ 54 | 55 | /** @enum emif_pins 56 | * @brief Alias for emif pins 57 | * 58 | */ 59 | enum emif_pins 60 | { 61 | emif_wait_pin0 = 0U, 62 | emif_wait_pin1 = 1U 63 | }; 64 | 65 | 66 | /** @enum emif_size 67 | * @brief Alias for emif page size 68 | * 69 | */ 70 | enum emif_size 71 | { 72 | elements_256 = 0U, 73 | elements_512 = 1U, 74 | elements_1024 = 2U, 75 | elements_2048 = 3U 76 | }; 77 | 78 | /** @enum emif_port 79 | * @brief Alias for emif port 80 | * 81 | */ 82 | enum emif_port 83 | { 84 | emif_8_bit_port = 0U, 85 | emif_16_bit_port = 1U 86 | }; 87 | 88 | 89 | /** @enum emif_pagesize 90 | * @brief Alias for emif pagesize 91 | * 92 | */ 93 | enum emif_pagesize 94 | { 95 | emif_4_words = 0U, 96 | emif_8_words = 1U 97 | }; 98 | 99 | /** @enum emif_wait_polarity 100 | * @brief Alias for emif wait polarity 101 | * 102 | */ 103 | enum emif_wait_polarity 104 | { 105 | emif_pin_low = 0U, 106 | emif_pin_high = 1U 107 | }; 108 | 109 | 110 | #define PTR ((uint32 *)(0x80000000U)) 111 | 112 | 113 | /* Configuration registers */ 114 | typedef struct emif_config_reg 115 | { 116 | uint32 CONFIG_AWCC; 117 | uint32 CONFIG_SDCR; 118 | uint32 CONFIG_SDRCR ; 119 | uint32 CONFIG_CE2CFG; 120 | uint32 CONFIG_CE3CFG; 121 | uint32 CONFIG_CE4CFG; 122 | uint32 CONFIG_CE5CFG; 123 | uint32 CONFIG_SDTIMR; 124 | uint32 CONFIG_SDSRETR; 125 | uint32 CONFIG_INTMSK; 126 | uint32 CONFIG_PMCR; 127 | } emif_config_reg_t; 128 | 129 | 130 | /** 131 | * @defgroup EMIF EMIF 132 | * @brief External Memory Interface. 133 | * 134 | * This EMIF memory controller is compliant with the JESD21-C SDR SDRAM memories utilizing a 16-bit 135 | * data bus. The purpose of this EMIF is to provide a means for the CPU to connect to a variety of external 136 | * devices including: 137 | * - Single data rate (SDR) SDRAM 138 | * - Asynchronous devices including NOR Flash and SRAM 139 | * The most common use for the EMIF is to interface with both a flash device and an SDRAM device 140 | * simultaneously. contains an example of operating the EMIF in this configuration. 141 | * 142 | * Related Files 143 | * - reg_emif.h 144 | * - emif.h 145 | * - emif.c 146 | * @addtogroup EMIF 147 | * @{ 148 | */ 149 | /* EMIF Interface Functions */ 150 | 151 | void emif_SDRAMInit(void); 152 | void emif_ASYNC1Init(void); 153 | void emif_ASYNC2Init(void); 154 | void emif_ASYNC3Init(void); 155 | void emifGetConfigValue(emif_config_reg_t *config_reg, config_value_type_t type); 156 | 157 | /* USER CODE BEGIN (1) */ 158 | /* USER CODE END */ 159 | 160 | /**@}*/ 161 | #ifdef __cplusplus 162 | } 163 | #endif /*extern "C" */ 164 | 165 | #endif /*EMIF_H_*/ 166 | -------------------------------------------------------------------------------- /BSP/IAR-HCG/include/hal_stdtypes.h: -------------------------------------------------------------------------------- 1 | /** @file hal_stdtypes.h 2 | * @brief HALCoGen standard types header File 3 | * @date 03.Apr.2015 4 | * @version 04.04.00 5 | * 6 | * This file contains: 7 | * - Type and Global definitions which are relevant for all drivers. 8 | */ 9 | 10 | /* 11 | * Copyright (C) 2009-2015 Texas Instruments Incorporated - www.ti.com 12 | * 13 | * 14 | * Redistribution and use in source and binary forms, with or without 15 | * modification, are permitted provided that the following conditions 16 | * are met: 17 | * 18 | * Redistributions of source code must retain the above copyright 19 | * notice, this list of conditions and the following disclaimer. 20 | * 21 | * Redistributions in binary form must reproduce the above copyright 22 | * notice, this list of conditions and the following disclaimer in the 23 | * documentation and/or other materials provided with the 24 | * distribution. 25 | * 26 | * Neither the name of Texas Instruments Incorporated nor the names of 27 | * its contributors may be used to endorse or promote products derived 28 | * from this software without specific prior written permission. 29 | * 30 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 31 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 32 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 33 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 34 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 35 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 36 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 37 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 38 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 39 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 40 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 41 | * 42 | */ 43 | 44 | 45 | #ifndef __HAL_STDTYPES_H__ 46 | #define __HAL_STDTYPES_H__ 47 | 48 | #include 49 | #include 50 | 51 | /* USER CODE BEGIN (0) */ 52 | /* USER CODE END */ 53 | /************************************************************/ 54 | /* Type Definitions */ 55 | /************************************************************/ 56 | #ifndef _UINT64_DECLARED 57 | typedef uint64_t uint64; 58 | #define _UINT64_DECLARED 59 | #endif 60 | 61 | #ifndef _UINT32_DECLARED 62 | typedef uint32_t uint32; 63 | #define _UINT32_DECLARED 64 | #endif 65 | 66 | #ifndef _UINT16_DECLARED 67 | typedef uint16_t uint16; 68 | #define _UINT16_DECLARED 69 | #endif 70 | 71 | #ifndef _UINT8_DECLARED 72 | typedef uint8_t uint8; 73 | #define _UINT8_DECLARED 74 | #endif 75 | 76 | #ifndef _BOOLEAN_DECLARED 77 | #ifdef __cplusplus 78 | typedef bool boolean; 79 | #else 80 | typedef _Bool boolean; 81 | #endif 82 | #define _BOOLEAN_DECLARED 83 | #endif 84 | 85 | #ifndef _SINT64_DECLARED 86 | typedef int64_t sint64; 87 | #define _SINT64_DECLARED 88 | #endif 89 | 90 | #ifndef _SINT32_DECLARED 91 | typedef int32_t sint32; 92 | #define _SINT32_DECLARED 93 | #endif 94 | 95 | #ifndef _SINT16_DECLARED 96 | typedef int16_t sint16; 97 | #define _SINT16_DECLARED 98 | #endif 99 | 100 | #ifndef _SINT8_DECLARED 101 | typedef int8_t sint8; 102 | #define _SINT8_DECLARED 103 | #endif 104 | 105 | #ifndef _FLOAT32_DECLARED 106 | typedef float float32; 107 | #define _FLOAT32_DECLARED 108 | #endif 109 | 110 | #ifndef _FLOAT64_DECLARED 111 | typedef double float64; 112 | #define _FLOAT64_DECLARED 113 | #endif 114 | 115 | typedef uint8 Std_ReturnType; 116 | 117 | typedef struct 118 | { 119 | uint16 vendorID; 120 | uint16 moduleID; 121 | uint8 instanceID; 122 | uint8 sw_major_version; 123 | uint8 sw_minor_version; 124 | uint8 sw_patch_version; 125 | } Std_VersionInfoType; 126 | 127 | /*****************************************************************************/ 128 | /* SYMBOL DEFINITIONS */ 129 | /*****************************************************************************/ 130 | #ifndef STATUSTYPEDEFINED 131 | #define STATUSTYPEDEFINED 132 | #define E_OK 0x00 133 | 134 | typedef unsigned char StatusType; 135 | #endif 136 | 137 | #define E_NOT_OK 0x01 138 | 139 | #define STD_ON 0x01 140 | #define STD_OFF 0x00 141 | 142 | 143 | /************************************************************/ 144 | /* Global Definitions */ 145 | /************************************************************/ 146 | /** @def NULL 147 | * @brief NULL definition 148 | */ 149 | 150 | #ifndef NULL 151 | /*SAFETYMCUSW 218 S MR:20.2 "Custom Type Definition." */ 152 | #define NULL ((void *) 0U) 153 | #endif 154 | 155 | /*****************************************************************************/ 156 | /* Define: NULL_PTR */ 157 | /* Description: Void pointer to 0 */ 158 | /*****************************************************************************/ 159 | #ifndef NULL_PTR 160 | #define NULL_PTR ((void *)0x0) 161 | #endif 162 | 163 | /** @def TRUE 164 | * @brief definition for TRUE 165 | */ 166 | #ifndef TRUE 167 | #define TRUE true 168 | #endif 169 | 170 | /** @def FALSE 171 | * @brief BOOLEAN definition for FALSE 172 | */ 173 | #ifndef FALSE 174 | #define FALSE false 175 | #endif 176 | 177 | /*****************************************************************************/ 178 | /* Define: NULL_PTR */ 179 | /* Description: Void pointer to 0 */ 180 | /*****************************************************************************/ 181 | #ifndef NULL_PTR 182 | #define NULL_PTR ((void *)0x0) 183 | #endif 184 | 185 | /* USER CODE BEGIN (1) */ 186 | /* USER CODE END */ 187 | 188 | #endif /* __HAL_STDTYPES_H__ */ 189 | -------------------------------------------------------------------------------- /BSP/IAR-HCG/include/htu.h: -------------------------------------------------------------------------------- 1 | /** @file htu.h 2 | * @brief HTU Driver Definition File 3 | * @date 03.Apr.2015 4 | * @version 04.04.00 5 | * 6 | */ 7 | 8 | /* 9 | * Copyright (C) 2009-2015 Texas Instruments Incorporated - www.ti.com 10 | * 11 | * 12 | * Redistribution and use in source and binary forms, with or without 13 | * modification, are permitted provided that the following conditions 14 | * are met: 15 | * 16 | * Redistributions of source code must retain the above copyright 17 | * notice, this list of conditions and the following disclaimer. 18 | * 19 | * Redistributions in binary form must reproduce the above copyright 20 | * notice, this list of conditions and the following disclaimer in the 21 | * documentation and/or other materials provided with the 22 | * distribution. 23 | * 24 | * Neither the name of Texas Instruments Incorporated nor the names of 25 | * its contributors may be used to endorse or promote products derived 26 | * from this software without specific prior written permission. 27 | * 28 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 29 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 30 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 31 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 32 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 33 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 34 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 35 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 36 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 37 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 38 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 39 | * 40 | */ 41 | 42 | 43 | 44 | #ifndef __HTU_H__ 45 | #define __HTU_H__ 46 | 47 | #include "reg_htu.h" 48 | 49 | #ifdef __cplusplus 50 | extern "C" { 51 | #endif 52 | 53 | /* USER CODE BEGIN (0) */ 54 | /* USER CODE END */ 55 | 56 | /* HTU General Definitions */ 57 | 58 | #define HTU1PARLOC (*(volatile uint32 *)0xFF4E0200U) 59 | #define HTU2PARLOC (*(volatile uint32 *)0xFF4C0200U) 60 | 61 | #define HTU1RAMLOC (*(volatile uint32 *)0xFF4E0000U) 62 | #define HTU2RAMLOC (*(volatile uint32 *)0xFF4C0000U) 63 | 64 | /* USER CODE BEGIN (1) */ 65 | /* USER CODE END */ 66 | 67 | #ifdef __cplusplus 68 | } 69 | #endif /*extern "C" */ 70 | 71 | #endif 72 | -------------------------------------------------------------------------------- /BSP/IAR-HCG/include/hw_emac_ctrl.h: -------------------------------------------------------------------------------- 1 | /* 2 | * hw_emac1.h 3 | */ 4 | 5 | /* 6 | * Copyright (C) 2009-2015 Texas Instruments Incorporated - www.ti.com 7 | * 8 | * 9 | * Redistribution and use in source and binary forms, with or without 10 | * modification, are permitted provided that the following conditions 11 | * are met: 12 | * 13 | * Redistributions of source code must retain the above copyright 14 | * notice, this list of conditions and the following disclaimer. 15 | * 16 | * Redistributions in binary form must reproduce the above copyright 17 | * notice, this list of conditions and the following disclaimer in the 18 | * documentation and/or other materials provided with the 19 | * distribution. 20 | * 21 | * Neither the name of Texas Instruments Incorporated nor the names of 22 | * its contributors may be used to endorse or promote products derived 23 | * from this software without specific prior written permission. 24 | * 25 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 26 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 27 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 28 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 29 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 30 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 31 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 32 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 33 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 34 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 35 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 36 | * 37 | */ 38 | 39 | 40 | #ifndef _HW_EMAC_CTRL_H_ 41 | #define _HW_EMAC_CTRL_H_ 42 | 43 | /* USER CODE BEGIN (0) */ 44 | /* USER CODE END */ 45 | 46 | #ifdef __cplusplus 47 | extern "C" { 48 | #endif 49 | 50 | /* USER CODE BEGIN (1) */ 51 | /* USER CODE END */ 52 | 53 | #define EMAC_CTRL_REVID (0x0U) 54 | #define EMAC_CTRL_SOFTRESET (0x4U) 55 | #define EMAC_CTRL_INTCONTROL (0xCU) 56 | #define EMAC_CTRL_C0RXTHRESHEN (0x10U) 57 | #define EMAC_CTRL_CnRXEN(n) ((uint32)0x14u + (uint32)((uint32)(n) << 4)) 58 | #define EMAC_CTRL_CnTXEN(n) ((uint32)0x18u + (uint32)((uint32)(n) << 4)) 59 | #define EMAC_CTRL_CnMISCEN(n) ((uint32)0x1Cu + (uint32)((uint32)(n) << 4)) 60 | #define EMAC_CTRL_CnRXTHRESHEN(n) ((uint32)0x20u + (uint32)((uint32)(n) << 4)) 61 | #define EMAC_CTRL_C0RXTHRESHSTAT (0x40U) 62 | #define EMAC_CTRL_C0RXSTAT (0x44U) 63 | #define EMAC_CTRL_C0TXSTAT (0x48U) 64 | #define EMAC_CTRL_C0MISCSTAT (0x4CU) 65 | #define EMAC_CTRL_C1RXTHRESHSTAT (0x50U) 66 | #define EMAC_CTRL_C1RXSTAT (0x54U) 67 | #define EMAC_CTRL_C1TXSTAT (0x58U) 68 | #define EMAC_CTRL_C1MISCSTAT (0x5CU) 69 | #define EMAC_CTRL_C2RXTHRESHSTAT (0x60U) 70 | #define EMAC_CTRL_C2RXSTAT (0x64U) 71 | #define EMAC_CTRL_C2TXSTAT (0x68U) 72 | #define EMAC_CTRL_C2MISCSTAT (0x6CU) 73 | #define EMAC_CTRL_C0RXIMAX (0x70U) 74 | #define EMAC_CTRL_C0TXIMAX (0x74U) 75 | #define EMAC_CTRL_C1RXIMAX (0x78U) 76 | #define EMAC_CTRL_C1TXIMAX (0x7CU) 77 | #define EMAC_CTRL_C2RXIMAX (0x80U) 78 | #define EMAC_CTRL_C2TXIMAX (0x84U) 79 | 80 | /**************************************************************************\ 81 | * Field Definition Macros 82 | \**************************************************************************/ 83 | 84 | #ifdef __cplusplus 85 | } 86 | #endif 87 | 88 | /* USER CODE BEGIN (2) */ 89 | /* USER CODE END */ 90 | 91 | #endif 92 | -------------------------------------------------------------------------------- /BSP/IAR-HCG/include/hw_reg_access.h: -------------------------------------------------------------------------------- 1 | /* 2 | * hw_reg_access.h 3 | */ 4 | 5 | /* 6 | * Copyright (C) 2009-2015 Texas Instruments Incorporated - www.ti.com 7 | * 8 | * 9 | * Redistribution and use in source and binary forms, with or without 10 | * modification, are permitted provided that the following conditions 11 | * are met: 12 | * 13 | * Redistributions of source code must retain the above copyright 14 | * notice, this list of conditions and the following disclaimer. 15 | * 16 | * Redistributions in binary form must reproduce the above copyright 17 | * notice, this list of conditions and the following disclaimer in the 18 | * documentation and/or other materials provided with the 19 | * distribution. 20 | * 21 | * Neither the name of Texas Instruments Incorporated nor the names of 22 | * its contributors may be used to endorse or promote products derived 23 | * from this software without specific prior written permission. 24 | * 25 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 26 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 27 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 28 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 29 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 30 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 31 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 32 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 33 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 34 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 35 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 36 | * 37 | */ 38 | 39 | 40 | #ifndef _HW_REG_ACCESS_H_ 41 | #define _HW_REG_ACCESS_H_ 42 | 43 | /* USER CODE BEGIN (0) */ 44 | /* USER CODE END */ 45 | 46 | #ifdef __cplusplus 47 | extern "C" { 48 | #endif 49 | 50 | /* USER CODE BEGIN (1) */ 51 | /* USER CODE END */ 52 | 53 | /******************************************************************************* 54 | * 55 | * Macros for hardware access, both direct and via the bit-band region. 56 | * 57 | *****************************************************************************/ 58 | #define HWREG(x) \ 59 | (*((volatile uint32 *)(x))) 60 | #define HWREGH(x) \ 61 | (*((volatile uint16 *)(x))) 62 | #define HWREGB(x) \ 63 | (*((volatile uint8 *)(x))) 64 | #define HWREGBITW(x, b) \ 65 | (HWREG(((uint32)(x) & 0xF0000000U) | (uint32)0x02000000U | \ 66 | (((uint32)(x) & 0x000FFFFFU) << 5U) | (uint32)((uint32)(b) << 2U))) 67 | #define HWREGBITH(x, b) \ 68 | (HWREGH(((uint32)(x) & 0xF0000000U) | (uint32)0x02000000U | \ 69 | (((uint32)(x) & 0x000FFFFFU) << 5U) | (uint32)((uint32)(b) << 2U))) 70 | #define HWREGBITB(x, b) \ 71 | (HWREGB(((uint32)(x) & 0xF0000000U) | (uint32)0x02000000U | \ 72 | (((uint32)(x) & 0x000FFFFFU) << 5U) | (uint32)((uint32)(b) << 2U))) 73 | 74 | /* USER CODE BEGIN (2) */ 75 | /* USER CODE END */ 76 | 77 | #ifdef __cplusplus 78 | } 79 | #endif 80 | 81 | #endif /* __HW_TYPES_H__ */ 82 | -------------------------------------------------------------------------------- /BSP/IAR-HCG/include/mdio.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file mdio.h 3 | * 4 | * \brief MDIO APIs and macros. 5 | * 6 | * This file contains the driver API prototypes and macro definitions. 7 | */ 8 | 9 | /* 10 | * Copyright (C) 2009-2015 Texas Instruments Incorporated - www.ti.com 11 | * 12 | * 13 | * Redistribution and use in source and binary forms, with or without 14 | * modification, are permitted provided that the following conditions 15 | * are met: 16 | * 17 | * Redistributions of source code must retain the above copyright 18 | * notice, this list of conditions and the following disclaimer. 19 | * 20 | * Redistributions in binary form must reproduce the above copyright 21 | * notice, this list of conditions and the following disclaimer in the 22 | * documentation and/or other materials provided with the 23 | * distribution. 24 | * 25 | * Neither the name of Texas Instruments Incorporated nor the names of 26 | * its contributors may be used to endorse or promote products derived 27 | * from this software without specific prior written permission. 28 | * 29 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 30 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 31 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 32 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 33 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 34 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 35 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 36 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 37 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 38 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 39 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 40 | * 41 | */ 42 | 43 | 44 | #ifndef __MDIO_H__ 45 | #define __MDIO_H__ 46 | 47 | /* USER CODE BEGIN (0) */ 48 | /* USER CODE END */ 49 | 50 | #include "sys_common.h" 51 | #include "hw_mdio.h" 52 | 53 | #ifdef __cplusplus 54 | extern "C" { 55 | #endif 56 | 57 | /* USER CODE BEGIN (1) */ 58 | /* USER CODE END */ 59 | 60 | /* MDIO input and output frequencies in Hz */ 61 | #define MDIO_FREQ_INPUT 32000000U 62 | #define MDIO_FREQ_OUTPUT 1000000U 63 | /*****************************************************************************/ 64 | 65 | /** 66 | * @addtogroup EMACMDIO 67 | * @{ 68 | */ 69 | /* 70 | ** Prototypes for the APIs 71 | */ 72 | extern uint32 MDIOPhyAliveStatusGet(uint32 baseAddr); 73 | extern uint32 MDIOPhyLinkStatusGet(uint32 baseAddr); 74 | extern void MDIOInit(uint32 baseAddr, uint32 mdioInputFreq, 75 | uint32 mdioOutputFreq); 76 | extern boolean MDIOPhyRegRead(uint32 baseAddr, uint32 phyAddr, 77 | uint32 regNum, volatile uint16 * dataPtr); 78 | extern void MDIOPhyRegWrite(uint32 baseAddr, uint32 phyAddr, 79 | uint32 regNum, uint16 RegVal); 80 | extern void MDIOEnable(uint32 baseAddr); 81 | extern void MDIODisable(uint32 baseAddr); 82 | 83 | /* USER CODE BEGIN (2) */ 84 | /* USER CODE END */ 85 | 86 | #ifdef __cplusplus 87 | } 88 | #endif 89 | 90 | /**@}*/ 91 | #endif /* __MDIO_H__ */ 92 | -------------------------------------------------------------------------------- /BSP/IAR-HCG/include/phy_dp83640.h: -------------------------------------------------------------------------------- 1 | /* 2 | * DP83640.h 3 | */ 4 | 5 | /* 6 | * Copyright (C) 2009-2015 Texas Instruments Incorporated - www.ti.com 7 | * 8 | * 9 | * Redistribution and use in source and binary forms, with or without 10 | * modification, are permitted provided that the following conditions 11 | * are met: 12 | * 13 | * Redistributions of source code must retain the above copyright 14 | * notice, this list of conditions and the following disclaimer. 15 | * 16 | * Redistributions in binary form must reproduce the above copyright 17 | * notice, this list of conditions and the following disclaimer in the 18 | * documentation and/or other materials provided with the 19 | * distribution. 20 | * 21 | * Neither the name of Texas Instruments Incorporated nor the names of 22 | * its contributors may be used to endorse or promote products derived 23 | * from this software without specific prior written permission. 24 | * 25 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 26 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 27 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 28 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 29 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 30 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 31 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 32 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 33 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 34 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 35 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 36 | * 37 | */ 38 | 39 | 40 | #ifndef _PHY_DP83640_H_ 41 | #define _PHY_DP83640_H_ 42 | 43 | /* USER CODE BEGIN (0) */ 44 | /* USER CODE END */ 45 | 46 | #ifdef __cplusplus 47 | extern "C" { 48 | #endif 49 | 50 | /* USER CODE BEGIN (1) */ 51 | /* USER CODE END */ 52 | 53 | /** @enum PHY_timestamp 54 | * @brief Alias names for transmit and receive timestamps 55 | * This enumeration is used to provide alias names for getting the transmit and receive timestamps from the Dp83640GetTimeStamp API. 56 | */ 57 | typedef enum phyTimeStamp 58 | { 59 | Txtimestamp = 1, /*Transmit Timestamp*/ 60 | Rxtimestamp = 2 /*Receive Timestamp */ 61 | }phyTimeStamp_t; 62 | /* PHY register offset definitions */ 63 | #define PHY_BCR (0u) 64 | #define PHY_BSR (1u) 65 | #define PHY_ID1 (2u) 66 | #define PHY_ID2 (3u) 67 | #define PHY_AUTONEG_ADV (4u) 68 | #define PHY_LINK_PARTNER_ABLTY (5u) 69 | #define PHY_TXTS (28u) 70 | #define PHY_RXTS (29u) 71 | 72 | /* PHY status definitions */ 73 | #define PHY_ID_SHIFT (16u) 74 | #define PHY_SOFTRESET (0x8000U) 75 | #define PHY_AUTONEG_ENABLE (0x1000u) 76 | #define PHY_AUTONEG_RESTART (0x0200u) 77 | #define PHY_AUTONEG_COMPLETE (0x0020u) 78 | #define PHY_AUTONEG_INCOMPLETE (0x0000u) 79 | #define PHY_AUTONEG_STATUS (0x0020u) 80 | #define PHY_AUTONEG_ABLE (0x0008u) 81 | #define PHY_LPBK_ENABLE (0x4000u) 82 | #define PHY_LINK_STATUS (0x0004u) 83 | #define PHY_INVALID_TYPE (0x0u) 84 | 85 | 86 | /* PHY ID. The LSB nibble will vary between different phy revisions */ 87 | #define DP83640_PHY_ID (0x0007C0F0u) 88 | #define DP83640_PHY_ID_REV_MASK (0x0000000Fu) 89 | 90 | /* Pause operations */ 91 | #define DP83640_PAUSE_NIL (0x0000u) 92 | #define DP83640_PAUSE_SYM (0x0400u) 93 | #define DP83640_PAUSE_ASYM (0x0800u) 94 | #define DP83640_PAUSE_BOTH_SYM_ASYM (0x0C00u) 95 | 96 | /* 100 Base TX Full Duplex capablity */ 97 | #define DP83640_100BTX_HD (0x0000u) 98 | #define DP83640_100BTX_FD (0x0100u) 99 | 100 | /* 100 Base TX capability */ 101 | #define DP83640_NO_100BTX (0x0000u) 102 | #define DP83640_100BTX (0x0080u) 103 | 104 | /* 10 BaseT duplex capabilities */ 105 | #define DP83640_10BT_HD (0x0000u) 106 | #define DP83640_10BT_FD (0x0040u) 107 | 108 | /* 10 BaseT ability*/ 109 | #define DP83640_NO_10BT (0x0000u) 110 | #define DP83640_10BT (0x0020u) 111 | 112 | /************************************************************************** 113 | API function Prototypes 114 | ***************************************************************************/ 115 | extern uint32 Dp83640IDGet(uint32 mdioBaseAddr, uint32 phyAddr); 116 | extern void Dp83640Reset(uint32 mdioBaseAddr, uint32 phyAddr); 117 | extern boolean Dp83640AutoNegotiate(uint32 mdioBaseAddr, uint32 phyAddr, uint16 advVal); 118 | extern boolean Dp83640PartnerAbilityGet(uint32 mdioBaseAddr, uint32 phyAddr,uint16 *ptnerAblty); 119 | extern boolean Dp83640LinkStatusGet(uint32 mdioBaseAddr, uint32 phyAddr,volatile uint32 retries); 120 | extern uint64 Dp83640GetTimeStamp(uint32 mdioBaseAddr, uint32 phyAddr, phyTimeStamp_t type); 121 | extern void Dp83640EnableLoopback(uint32 mdioBaseAddr, uint32 phyAddr); 122 | extern void Dp83640DisableLoopback(uint32 mdioBaseAddr, uint32 phyAddr); 123 | 124 | /* USER CODE BEGIN (2) */ 125 | /* USER CODE END */ 126 | 127 | #ifdef __cplusplus 128 | } 129 | #endif 130 | #endif 131 | -------------------------------------------------------------------------------- /BSP/IAR-HCG/include/reg_dcc.h: -------------------------------------------------------------------------------- 1 | /** @file reg_dcc.h 2 | * @brief DCC Register Layer Header File 3 | * @date 03.Apr.2015 4 | * @version 04.04.00 5 | * 6 | * This file contains: 7 | * - Definitions 8 | * - Types 9 | * - Interface Prototypes 10 | * . 11 | * which are relevant for the DCC driver. 12 | */ 13 | 14 | /* 15 | * Copyright (C) 2009-2015 Texas Instruments Incorporated - www.ti.com 16 | * 17 | * 18 | * Redistribution and use in source and binary forms, with or without 19 | * modification, are permitted provided that the following conditions 20 | * are met: 21 | * 22 | * Redistributions of source code must retain the above copyright 23 | * notice, this list of conditions and the following disclaimer. 24 | * 25 | * Redistributions in binary form must reproduce the above copyright 26 | * notice, this list of conditions and the following disclaimer in the 27 | * documentation and/or other materials provided with the 28 | * distribution. 29 | * 30 | * Neither the name of Texas Instruments Incorporated nor the names of 31 | * its contributors may be used to endorse or promote products derived 32 | * from this software without specific prior written permission. 33 | * 34 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 35 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 36 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 37 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 38 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 39 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 40 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 41 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 42 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 43 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 44 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 45 | * 46 | */ 47 | 48 | 49 | #ifndef __REG_DCC_H__ 50 | #define __REG_DCC_H__ 51 | 52 | #include "sys_common.h" 53 | 54 | /* USER CODE BEGIN (0) */ 55 | /* USER CODE END */ 56 | 57 | /* Dcc Register Frame Definition */ 58 | /** @struct dccBase 59 | * @brief DCC Base Register Definition 60 | * 61 | * This structure is used to access the DCC module registers. 62 | */ 63 | /** @typedef dccBASE_t 64 | * @brief DCC Register Frame Type Definition 65 | * 66 | * This type is used to access the DCC Registers. 67 | */ 68 | typedef volatile struct dccBase 69 | { 70 | uint32 GCTRL; /**< 0x0000: DCC Control Register */ 71 | uint32 REV; /**< 0x0004: DCC Revision Id Register */ 72 | uint32 CNT0SEED; /**< 0x0008: DCC Counter0 Seed Register */ 73 | uint32 VALID0SEED; /**< 0x000C: DCC Valid0 Seed Register */ 74 | uint32 CNT1SEED; /**< 0x0010: DCC Counter1 Seed Register */ 75 | uint32 STAT; /**< 0x0014: DCC Status Register */ 76 | uint32 CNT0; /**< 0x0018: DCC Counter0 Value Register */ 77 | uint32 VALID0; /**< 0x001C: DCC Valid0 Value Register */ 78 | uint32 CNT1; /**< 0x0020: DCC Counter1 Value Register */ 79 | uint32 CNT1CLKSRC; /**< 0x0024: DCC Counter1 Clock Source Selection Register */ 80 | uint32 CNT0CLKSRC; /**< 0x0028: DCC Counter0 Clock Source Selection Register */ 81 | } dccBASE_t; 82 | 83 | 84 | /** @def dccREG1 85 | * @brief DCC1 Register Frame Pointer 86 | * 87 | * This pointer is used by the DCC driver to access the dcc2 module registers. 88 | */ 89 | #define dccREG1 ((dccBASE_t *)0xFFFFEC00U) 90 | 91 | 92 | /** @def dccREG2 93 | * @brief DCC2 Register Frame Pointer 94 | * 95 | * This pointer is used by the DCC driver to access the dcc2 module registers. 96 | */ 97 | #define dccREG2 ((dccBASE_t *)0xFFFFF400U) 98 | 99 | /* USER CODE BEGIN (1) */ 100 | /* USER CODE END */ 101 | 102 | 103 | #endif 104 | -------------------------------------------------------------------------------- /BSP/IAR-HCG/include/reg_efc.h: -------------------------------------------------------------------------------- 1 | /** @file reg_efc.h 2 | * @brief EFC Register Layer Header File 3 | * @date 03.Apr.2015 4 | * @version 04.04.00 5 | * 6 | * This file contains: 7 | * - Definitions 8 | * - Types 9 | * . 10 | * which are relevant for the System driver. 11 | */ 12 | 13 | /* 14 | * Copyright (C) 2009-2015 Texas Instruments Incorporated - www.ti.com 15 | * 16 | * 17 | * Redistribution and use in source and binary forms, with or without 18 | * modification, are permitted provided that the following conditions 19 | * are met: 20 | * 21 | * Redistributions of source code must retain the above copyright 22 | * notice, this list of conditions and the following disclaimer. 23 | * 24 | * Redistributions in binary form must reproduce the above copyright 25 | * notice, this list of conditions and the following disclaimer in the 26 | * documentation and/or other materials provided with the 27 | * distribution. 28 | * 29 | * Neither the name of Texas Instruments Incorporated nor the names of 30 | * its contributors may be used to endorse or promote products derived 31 | * from this software without specific prior written permission. 32 | * 33 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 34 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 35 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 36 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 37 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 38 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 39 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 40 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 41 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 42 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 43 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 44 | * 45 | */ 46 | 47 | 48 | #ifndef __REG_EFC_H__ 49 | #define __REG_EFC_H__ 50 | 51 | #include "sys_common.h" 52 | 53 | /* USER CODE BEGIN (0) */ 54 | /* USER CODE END */ 55 | 56 | /* Efc Register Frame Definition */ 57 | /** @struct efcBase 58 | * @brief Efc Register Frame Definition 59 | * 60 | * This type is used to access the Efc Registers. 61 | */ 62 | /** @typedef efcBASE_t 63 | * @brief Efc Register Frame Type Definition 64 | * 65 | * This type is used to access the Efc Registers. 66 | */ 67 | typedef volatile struct efcBase 68 | { 69 | uint32 INSTRUCTION; /* 0x0 INSTRUCTION AN DUMPWORD REGISTER */ 70 | uint32 ADDRESS; /* 0x4 ADDRESS REGISTER */ 71 | uint32 DATA_UPPER; /* 0x8 DATA UPPER REGISTER */ 72 | uint32 DATA_LOWER; /* 0xc DATA LOWER REGISTER */ 73 | uint32 SYSTEM_CONFIG; /* 0x10 SYSTEM CONFIG REGISTER */ 74 | uint32 SYSTEM_STATUS; /* 0x14 SYSTEM STATUS REGISTER */ 75 | uint32 ACCUMULATOR; /* 0x18 ACCUMULATOR REGISTER */ 76 | uint32 BOUNDARY; /* 0x1C BOUNDARY REGISTER */ 77 | uint32 KEY_FLAG; /* 0x20 KEY FLAG REGISTER */ 78 | uint32 KEY; /* 0x24 KEY REGISTER */ 79 | uint32 rsvd1; /* 0x28 RESERVED */ 80 | uint32 PINS; /* 0x2C PINS REGISTER */ 81 | uint32 CRA; /* 0x30 CRA */ 82 | uint32 READ; /* 0x34 READ REGISTER */ 83 | uint32 PROGRAMME; /* 0x38 PROGRAMME REGISTER */ 84 | uint32 ERROR; /* 0x3C ERROR STATUS REGISTER */ 85 | uint32 SINGLE_BIT; /* 0x40 SINGLE BIT ERROR */ 86 | uint32 TWO_BIT_ERROR; /* 0x44 DOUBLE BIT ERROR */ 87 | uint32 SELF_TEST_CYCLES; /* 0x48 SELF TEST CYCLEX */ 88 | uint32 SELF_TEST_SIGN; /* 0x4C SELF TEST SIGNATURE */ 89 | } efcBASE_t; 90 | 91 | #define efcREG ((efcBASE_t *)0xFFF8C000U) 92 | /* USER CODE BEGIN (1) */ 93 | /* USER CODE END */ 94 | 95 | 96 | #endif 97 | -------------------------------------------------------------------------------- /BSP/IAR-HCG/include/reg_emif.h: -------------------------------------------------------------------------------- 1 | /** @file reg_emif.h 2 | * @brief EMIF Register Layer Header File 3 | * @date 03.Apr.2015 4 | * @version 04.04.00 5 | * 6 | * This file contains: 7 | * - Definitions 8 | * - Types 9 | * - Interface Prototypes 10 | * . 11 | * which are relevant for the EMIF driver. 12 | */ 13 | 14 | /* 15 | * Copyright (C) 2009-2015 Texas Instruments Incorporated - www.ti.com 16 | * 17 | * 18 | * Redistribution and use in source and binary forms, with or without 19 | * modification, are permitted provided that the following conditions 20 | * are met: 21 | * 22 | * Redistributions of source code must retain the above copyright 23 | * notice, this list of conditions and the following disclaimer. 24 | * 25 | * Redistributions in binary form must reproduce the above copyright 26 | * notice, this list of conditions and the following disclaimer in the 27 | * documentation and/or other materials provided with the 28 | * distribution. 29 | * 30 | * Neither the name of Texas Instruments Incorporated nor the names of 31 | * its contributors may be used to endorse or promote products derived 32 | * from this software without specific prior written permission. 33 | * 34 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 35 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 36 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 37 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 38 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 39 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 40 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 41 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 42 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 43 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 44 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 45 | * 46 | */ 47 | 48 | 49 | #ifndef __REG_EMIF_H__ 50 | #define __REG_EMIF_H__ 51 | 52 | #include "sys_common.h" 53 | 54 | #ifdef __cplusplus 55 | extern "C" { 56 | #endif 57 | 58 | /* USER CODE BEGIN (0) */ 59 | /* USER CODE END */ 60 | 61 | /* Emif Register Frame Definition */ 62 | /** @struct emifBASE_t 63 | * @brief emifBASE Register Definition 64 | * 65 | * This structure is used to access the EMIF module registers. 66 | */ 67 | typedef volatile struct emifBase 68 | { 69 | uint32 MIDR; /**< 0x0000 Module ID Register */ 70 | uint32 AWCC; /**< 0x0004 Asynchronous wait cycle register*/ 71 | uint32 SDCR; /**< 0x0008 SDRAM configuration register */ 72 | uint32 SDRCR ; /**< 0x000C Set Interrupt Enable Register */ 73 | uint32 CE2CFG; /**< 0x0010 Asynchronous 1 Configuration Register */ 74 | uint32 CE3CFG; /**< 0x0014 Asynchronous 2 Configuration Register */ 75 | uint32 CE4CFG; /**< 0x0018 Asynchronous 3 Configuration Register */ 76 | uint32 CE5CFG; /**< 0x001C Asynchronous 4 Configuration Register */ 77 | uint32 SDTIMR; /**< 0x0020 SDRAM Timing Register */ 78 | uint32 dummy1[6]; /** reserved **/ 79 | uint32 SDSRETR; /**< 0x003c SDRAM Self Refresh Exit Timing Register */ 80 | uint32 INTRAW; /**< 0x0040 0x0020 Interrupt Vector Offset*/ 81 | uint32 INTMSK; /**< 0x0044 EMIF Interrupt Mask Register */ 82 | uint32 INTMSKSET; /**< 48 EMIF Interrupt Mask Set Register */ 83 | uint32 INTMSKCLR; /**< 0x004c EMIF Interrupt Mask Register */ 84 | uint32 dummy2[6]; /** reserved **/ 85 | uint32 PMCR; /**< 0x0068 Page Mode Control Register*/ 86 | 87 | } emifBASE_t; 88 | 89 | #define emifREG ((emifBASE_t *)0xFCFFE800U) 90 | 91 | /* USER CODE BEGIN (1) */ 92 | /* USER CODE END */ 93 | 94 | #ifdef __cplusplus 95 | } 96 | #endif 97 | 98 | #endif 99 | -------------------------------------------------------------------------------- /BSP/IAR-HCG/include/reg_esm.h: -------------------------------------------------------------------------------- 1 | /** @file reg_esm.h 2 | * @brief ESM Register Layer Header File 3 | * @date 03.Apr.2015 4 | * @version 04.04.00 5 | * 6 | * This file contains: 7 | * - Definitions 8 | * - Types 9 | * - Interface Prototypes 10 | * . 11 | * which are relevant for the ESM driver. 12 | */ 13 | 14 | /* 15 | * Copyright (C) 2009-2015 Texas Instruments Incorporated - www.ti.com 16 | * 17 | * 18 | * Redistribution and use in source and binary forms, with or without 19 | * modification, are permitted provided that the following conditions 20 | * are met: 21 | * 22 | * Redistributions of source code must retain the above copyright 23 | * notice, this list of conditions and the following disclaimer. 24 | * 25 | * Redistributions in binary form must reproduce the above copyright 26 | * notice, this list of conditions and the following disclaimer in the 27 | * documentation and/or other materials provided with the 28 | * distribution. 29 | * 30 | * Neither the name of Texas Instruments Incorporated nor the names of 31 | * its contributors may be used to endorse or promote products derived 32 | * from this software without specific prior written permission. 33 | * 34 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 35 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 36 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 37 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 38 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 39 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 40 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 41 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 42 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 43 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 44 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 45 | * 46 | */ 47 | 48 | 49 | #ifndef __REG_ESM_H__ 50 | #define __REG_ESM_H__ 51 | 52 | #include "sys_common.h" 53 | 54 | 55 | 56 | /* USER CODE BEGIN (0) */ 57 | /* USER CODE END */ 58 | 59 | /* Esm Register Frame Definition */ 60 | /** @struct esmBase 61 | * @brief Esm Register Frame Definition 62 | * 63 | * This type is used to access the Esm Registers. 64 | */ 65 | /** @typedef esmBASE_t 66 | * @brief Esm Register Frame Type Definition 67 | * 68 | * This type is used to access the Esm Registers. 69 | */ 70 | typedef volatile struct esmBase 71 | { 72 | uint32 EEPAPR1; /* 0x0000 */ 73 | uint32 DEPAPR1; /* 0x0004 */ 74 | uint32 IESR1; /* 0x0008 */ 75 | uint32 IECR1; /* 0x000C */ 76 | uint32 ILSR1; /* 0x0010 */ 77 | uint32 ILCR1; /* 0x0014 */ 78 | uint32 SR1[3U]; /* 0x0018, 0x001C, 0x0020 */ 79 | uint32 EPSR; /* 0x0024 */ 80 | uint32 IOFFHR; /* 0x0028 */ 81 | uint32 IOFFLR; /* 0x002C */ 82 | uint32 LTCR; /* 0x0030 */ 83 | uint32 LTCPR; /* 0x0034 */ 84 | uint32 EKR; /* 0x0038 */ 85 | uint32 SSR2; /* 0x003C */ 86 | uint32 IEPSR4; /* 0x0040 */ 87 | uint32 IEPCR4; /* 0x0044 */ 88 | uint32 IESR4; /* 0x0048 */ 89 | uint32 IECR4; /* 0x004C */ 90 | uint32 ILSR4; /* 0x0050 */ 91 | uint32 ILCR4; /* 0x0054 */ 92 | uint32 SR4[3U]; /* 0x0058, 0x005C, 0x0060 */ 93 | uint32 ESTATUS5EMU; /* 0x0064 */ 94 | } esmBASE_t; 95 | 96 | /** @def esmREG 97 | * @brief Esm Register Frame Pointer 98 | * 99 | * This pointer is used by the Esm driver to access the Esm registers. 100 | */ 101 | #define esmREG ((esmBASE_t *)0xFFFFF500U) 102 | 103 | /* USER CODE BEGIN (1) */ 104 | /* USER CODE END */ 105 | 106 | 107 | #endif 108 | -------------------------------------------------------------------------------- /BSP/IAR-HCG/include/reg_flash.h: -------------------------------------------------------------------------------- 1 | /** @file reg_flash.h 2 | * @brief Flash Register Layer Header File 3 | * @date 03.Apr.2015 4 | * @version 04.04.00 5 | * 6 | * This file contains: 7 | * - Definitions 8 | * - Types 9 | * . 10 | * which are relevant for the System driver. 11 | */ 12 | 13 | /* 14 | * Copyright (C) 2009-2015 Texas Instruments Incorporated - www.ti.com 15 | * 16 | * 17 | * Redistribution and use in source and binary forms, with or without 18 | * modification, are permitted provided that the following conditions 19 | * are met: 20 | * 21 | * Redistributions of source code must retain the above copyright 22 | * notice, this list of conditions and the following disclaimer. 23 | * 24 | * Redistributions in binary form must reproduce the above copyright 25 | * notice, this list of conditions and the following disclaimer in the 26 | * documentation and/or other materials provided with the 27 | * distribution. 28 | * 29 | * Neither the name of Texas Instruments Incorporated nor the names of 30 | * its contributors may be used to endorse or promote products derived 31 | * from this software without specific prior written permission. 32 | * 33 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 34 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 35 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 36 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 37 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 38 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 39 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 40 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 41 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 42 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 43 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 44 | * 45 | */ 46 | 47 | 48 | #ifndef __REG_FLASH_H__ 49 | #define __REG_FLASH_H__ 50 | 51 | /* USER CODE BEGIN (0) */ 52 | /* USER CODE END */ 53 | 54 | #include "sys_common.h" 55 | 56 | /* USER CODE BEGIN (1) */ 57 | /* USER CODE END */ 58 | 59 | /* Flash Register Frame Definition */ 60 | /** @struct flashWBase 61 | * @brief Flash Wrapper Register Frame Definition 62 | * 63 | * This type is used to access the Flash Wrapper Registers. 64 | */ 65 | /** @typedef flashWBASE_t 66 | * @brief Flash Wrapper Register Frame Type Definition 67 | * 68 | * This type is used to access the Flash Wrapper Registers. 69 | */ 70 | typedef volatile struct flashWBase 71 | { 72 | uint32 FRDCNTL; /* 0x0000 */ 73 | uint32 rsvd1; /* 0x0004 */ 74 | uint32 FEDACCTRL1; /* 0x0008 */ 75 | uint32 FEDACCTRL2; /* 0x000C */ 76 | uint32 FCORERRCNT; /* 0x0010 */ 77 | uint32 FCORERRADD; /* 0x0014 */ 78 | uint32 FCORERRPOS; /* 0x0018 */ 79 | uint32 FEDACSTATUS; /* 0x001C */ 80 | uint32 FUNCERRADD; /* 0x0020 */ 81 | uint32 FEDACSDIS; /* 0x0024 */ 82 | uint32 FPRIMADDTAG; /* 0x0028 */ 83 | uint32 FREDUADDTAG; /* 0x002C */ 84 | uint32 FBPROT; /* 0x0030 */ 85 | uint32 FBSE; /* 0x0034 */ 86 | uint32 FBBUSY; /* 0x0038 */ 87 | uint32 FBAC; /* 0x003C */ 88 | uint32 FBFALLBACK; /* 0x0040 */ 89 | uint32 FBPRDY; /* 0x0044 */ 90 | uint32 FPAC1; /* 0x0048 */ 91 | uint32 FPAC2; /* 0x004C */ 92 | uint32 FMAC; /* 0x0050 */ 93 | uint32 FMSTAT; /* 0x0054 */ 94 | uint32 FEMUDMSW; /* 0x0058 */ 95 | uint32 FEMUDLSW; /* 0x005C */ 96 | uint32 FEMUECC; /* 0x0060 */ 97 | uint32 FLOCK; /* 0x0064 */ 98 | uint32 FEMUADDR; /* 0x0068 */ 99 | uint32 FDIAGCTRL; /* 0x006C */ 100 | uint32 FRAWDATAH; /* 0x0070 */ 101 | uint32 FRAWDATAL; /* 0x0074 */ 102 | uint32 FRAWECC; /* 0x0078 */ 103 | uint32 FPAROVR; /* 0x007C */ 104 | uint32 rsvd2[16U]; /* 0x009C */ 105 | uint32 FEDACSDIS2; /* 0x00C0 */ 106 | uint32 rsvd3[15U]; /* 0x00C4 */ 107 | uint32 rsvd4[13U]; /* 0x0100 */ 108 | uint32 rsvd5[85U]; /* 0x0134 */ 109 | uint32 FSMWRENA; /* 0x0288 */ 110 | uint32 rsvd6[6U]; /* 0x028C */ 111 | uint32 FSMSECTOR; /* 0x02A4 */ 112 | uint32 rsvd7[4U]; /* 0x02A8 */ 113 | uint32 EEPROMCONFIG; /* 0x02B8 */ 114 | uint32 rsvd8[19U]; /* 0x02BC */ 115 | uint32 EECTRL1; /* 0x0308 */ 116 | uint32 EECTRL2; /* 0x030C */ 117 | uint32 EECORRERRCNT; /* 0x0310 */ 118 | uint32 EECORRERRADD; /* 0x0314 */ 119 | uint32 EECORRERRPOS; /* 0x0318 */ 120 | uint32 EESTATUS; /* 0x031C */ 121 | uint32 EEUNCERRADD; /* 0x0320 */ 122 | } flashWBASE_t; 123 | 124 | /** @def flashWREG 125 | * @brief Flash Wrapper Register Frame Pointer 126 | * 127 | * This pointer is used by the system driver to access the flash wrapper registers. 128 | */ 129 | #define flashWREG ((flashWBASE_t *)(0xFFF87000U)) 130 | 131 | /* USER CODE BEGIN (2) */ 132 | /* USER CODE END */ 133 | 134 | #endif 135 | -------------------------------------------------------------------------------- /BSP/IAR-HCG/include/reg_gio.h: -------------------------------------------------------------------------------- 1 | /** @file reg_gio.h 2 | * @brief GIO Register Layer Header File 3 | * @date 03.Apr.2015 4 | * @version 04.04.00 5 | * 6 | * This file contains: 7 | * - Definitions 8 | * - Types 9 | * - Interface Prototypes 10 | * . 11 | * which are relevant for the GIO driver. 12 | */ 13 | 14 | /* 15 | * Copyright (C) 2009-2015 Texas Instruments Incorporated - www.ti.com 16 | * 17 | * 18 | * Redistribution and use in source and binary forms, with or without 19 | * modification, are permitted provided that the following conditions 20 | * are met: 21 | * 22 | * Redistributions of source code must retain the above copyright 23 | * notice, this list of conditions and the following disclaimer. 24 | * 25 | * Redistributions in binary form must reproduce the above copyright 26 | * notice, this list of conditions and the following disclaimer in the 27 | * documentation and/or other materials provided with the 28 | * distribution. 29 | * 30 | * Neither the name of Texas Instruments Incorporated nor the names of 31 | * its contributors may be used to endorse or promote products derived 32 | * from this software without specific prior written permission. 33 | * 34 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 35 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 36 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 37 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 38 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 39 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 40 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 41 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 42 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 43 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 44 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 45 | * 46 | */ 47 | 48 | 49 | #ifndef __REG_GIO_H__ 50 | #define __REG_GIO_H__ 51 | 52 | #include "sys_common.h" 53 | 54 | 55 | 56 | /* USER CODE BEGIN (0) */ 57 | /* USER CODE END */ 58 | 59 | /* Gio Register Frame Definition */ 60 | /** @struct gioBase 61 | * @brief GIO Base Register Definition 62 | * 63 | * This structure is used to access the GIO module registers. 64 | */ 65 | /** @typedef gioBASE_t 66 | * @brief GIO Register Frame Type Definition 67 | * 68 | * This type is used to access the GIO Registers. 69 | */ 70 | typedef volatile struct gioBase 71 | { 72 | uint32 GCR0; /**< 0x0000: Global Control Register */ 73 | uint32 rsvd; /**< 0x0004: Reserved*/ 74 | uint32 INTDET; /**< 0x0008: Interrupt Detect Register*/ 75 | uint32 POL; /**< 0x000C: Interrupt Polarity Register */ 76 | uint32 ENASET; /**< 0x0010: Interrupt Enable Set Register */ 77 | uint32 ENACLR; /**< 0x0014: Interrupt Enable Clear Register */ 78 | uint32 LVLSET; /**< 0x0018: Interrupt Priority Set Register */ 79 | uint32 LVLCLR; /**< 0x001C: Interrupt Priority Clear Register */ 80 | uint32 FLG; /**< 0x0020: Interrupt Flag Register */ 81 | uint32 OFF1; /**< 0x0024: Interrupt Offset A Register */ 82 | uint32 OFF2; /**< 0x0028: Interrupt Offset B Register */ 83 | uint32 EMU1; /**< 0x002C: Emulation 1 Register */ 84 | uint32 EMU2; /**< 0x0030: Emulation 2 Register */ 85 | } gioBASE_t; 86 | 87 | 88 | /** @struct gioPort 89 | * @brief GIO Port Register Definition 90 | */ 91 | /** @typedef gioPORT_t 92 | * @brief GIO Port Register Type Definition 93 | * 94 | * This type is used to access the GIO Port Registers. 95 | */ 96 | typedef volatile struct gioPort 97 | { 98 | uint32 DIR; /**< 0x0000: Data Direction Register */ 99 | uint32 DIN; /**< 0x0004: Data Input Register */ 100 | uint32 DOUT; /**< 0x0008: Data Output Register */ 101 | uint32 DSET; /**< 0x000C: Data Output Set Register */ 102 | uint32 DCLR; /**< 0x0010: Data Output Clear Register */ 103 | uint32 PDR; /**< 0x0014: Open Drain Register */ 104 | uint32 PULDIS; /**< 0x0018: Pullup Disable Register */ 105 | uint32 PSL; /**< 0x001C: Pull Up/Down Selection Register */ 106 | } gioPORT_t; 107 | 108 | 109 | /** @def gioREG 110 | * @brief GIO Register Frame Pointer 111 | * 112 | * This pointer is used by the GIO driver to access the gio module registers. 113 | */ 114 | #define gioREG ((gioBASE_t *)0xFFF7BC00U) 115 | 116 | /** @def gioPORTA 117 | * @brief GIO Port (A) Register Pointer 118 | * 119 | * Pointer used by the GIO driver to access PORTA 120 | */ 121 | #define gioPORTA ((gioPORT_t *)0xFFF7BC34U) 122 | 123 | /** @def gioPORTB 124 | * @brief GIO Port (B) Register Pointer 125 | * 126 | * Pointer used by the GIO driver to access PORTB 127 | */ 128 | #define gioPORTB ((gioPORT_t *)0xFFF7BC54U) 129 | 130 | /* USER CODE BEGIN (1) */ 131 | /* USER CODE END */ 132 | 133 | 134 | #endif 135 | -------------------------------------------------------------------------------- /BSP/IAR-HCG/include/reg_htu.h: -------------------------------------------------------------------------------- 1 | /** @file reg_htu.h 2 | * @brief HTU Register Layer Header File 3 | * @date 03.Apr.2015 4 | * @version 04.04.00 5 | * 6 | * This file contains: 7 | * - Definitions 8 | * - Types 9 | * - Interface Prototypes 10 | * . 11 | * which are relevant for the HTU driver. 12 | */ 13 | 14 | /* 15 | * Copyright (C) 2009-2015 Texas Instruments Incorporated - www.ti.com 16 | * 17 | * 18 | * Redistribution and use in source and binary forms, with or without 19 | * modification, are permitted provided that the following conditions 20 | * are met: 21 | * 22 | * Redistributions of source code must retain the above copyright 23 | * notice, this list of conditions and the following disclaimer. 24 | * 25 | * Redistributions in binary form must reproduce the above copyright 26 | * notice, this list of conditions and the following disclaimer in the 27 | * documentation and/or other materials provided with the 28 | * distribution. 29 | * 30 | * Neither the name of Texas Instruments Incorporated nor the names of 31 | * its contributors may be used to endorse or promote products derived 32 | * from this software without specific prior written permission. 33 | * 34 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 35 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 36 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 37 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 38 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 39 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 40 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 41 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 42 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 43 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 44 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 45 | * 46 | */ 47 | 48 | 49 | #ifndef __REG_HTU_H__ 50 | #define __REG_HTU_H__ 51 | 52 | #include "sys_common.h" 53 | 54 | 55 | 56 | /* USER CODE BEGIN (0) */ 57 | /* USER CODE END */ 58 | 59 | /* htu Register Frame Definition */ 60 | /** @struct htuBase 61 | * @brief HTU Base Register Definition 62 | * 63 | * This structure is used to access the HTU module registers. 64 | */ 65 | /** @typedef htuBASE_t 66 | * @brief HTU Register Frame Type Definition 67 | * 68 | * This type is used to access the HTU Registers. 69 | */ 70 | typedef volatile struct htuBase 71 | { 72 | uint32 GC; /** 0x00 */ 73 | uint32 CPENA; /** 0x04 */ 74 | uint32 BUSY0; /** 0x08 */ 75 | uint32 BUSY1; /** 0x0C */ 76 | uint32 BUSY2; /** 0x10 */ 77 | uint32 BUSY3; /** 0x14 */ 78 | uint32 ACPE; /** 0x18 */ 79 | uint32 rsvd1; /** 0x1C */ 80 | uint32 RLBECTRL; /** 0x20 */ 81 | uint32 BFINTS; /** 0x24 */ 82 | uint32 BFINTC; /** 0x28 */ 83 | uint32 INTMAP; /** 0x2C */ 84 | uint32 rsvd2; /** 0x30 */ 85 | uint32 INTOFF0; /** 0x34 */ 86 | uint32 INTOFF1; /** 0x38 */ 87 | uint32 BIM; /** 0x3C */ 88 | uint32 RLOSTFL; /** 0x40 */ 89 | uint32 BFINTFL; /** 0x44 */ 90 | uint32 BERINTFL; /** 0x48 */ 91 | uint32 MP1S; /** 0x4C */ 92 | uint32 MP1E; /** 0x50 */ 93 | uint32 DCTRL; /** 0x54 */ 94 | uint32 WPR; /** 0x58 */ 95 | uint32 WMR; /** 0x5C */ 96 | uint32 ID; /** 0x60 */ 97 | uint32 PCR; /** 0x64 */ 98 | uint32 PAR; /** 0x68 */ 99 | uint32 rsvd3; /** 0x6C */ 100 | uint32 MPCS; /** 0x70 */ 101 | uint32 MP0S; /** 0x74 */ 102 | uint32 MP0E; /** 0x78 */ 103 | } htuBASE_t; 104 | 105 | typedef volatile struct 106 | { 107 | struct /* 0x00-0x7C */ 108 | { 109 | uint32 IFADDRA; 110 | uint32 IFADDRB; 111 | uint32 IHADDRCT; 112 | uint32 ITCOUNT; 113 | }DCP[8U]; 114 | 115 | struct /* 0x80-0xFC */ 116 | { 117 | uint32 res[32U]; 118 | } RESERVED; 119 | 120 | struct /* 0x100-0x17C */ 121 | { 122 | uint32 CFADDRA; 123 | uint32 CFADDRB; 124 | uint32 CFCOUNT; 125 | uint32 rsvd4; 126 | }CDCP[8U]; 127 | 128 | } htuRAMBASE_t; 129 | 130 | #define htuREG1 ((htuBASE_t *)0xFFF7A400U) 131 | #define htuREG2 ((htuBASE_t *)0xFFF7A500U) 132 | 133 | #define htuRAM1 ((htuRAMBASE_t *)0xFF4E0000U) 134 | #define htuRAM2 ((htuRAMBASE_t *)0xFF4C0000U) 135 | 136 | 137 | /* USER CODE BEGIN (1) */ 138 | /* USER CODE END */ 139 | 140 | 141 | #endif 142 | -------------------------------------------------------------------------------- /BSP/IAR-HCG/include/reg_pbist.h: -------------------------------------------------------------------------------- 1 | /** @file reg_pbist.h 2 | * @brief PBIST Register Layer Header File 3 | * @date 03.Apr.2015 4 | * @version 04.04.00 5 | * 6 | * This file contains: 7 | * - Definitions 8 | * - Types 9 | * . 10 | * which are relevant for the System driver. 11 | */ 12 | 13 | /* 14 | * Copyright (C) 2009-2015 Texas Instruments Incorporated - www.ti.com 15 | * 16 | * 17 | * Redistribution and use in source and binary forms, with or without 18 | * modification, are permitted provided that the following conditions 19 | * are met: 20 | * 21 | * Redistributions of source code must retain the above copyright 22 | * notice, this list of conditions and the following disclaimer. 23 | * 24 | * Redistributions in binary form must reproduce the above copyright 25 | * notice, this list of conditions and the following disclaimer in the 26 | * documentation and/or other materials provided with the 27 | * distribution. 28 | * 29 | * Neither the name of Texas Instruments Incorporated nor the names of 30 | * its contributors may be used to endorse or promote products derived 31 | * from this software without specific prior written permission. 32 | * 33 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 34 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 35 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 36 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 37 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 38 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 39 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 40 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 41 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 42 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 43 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 44 | * 45 | */ 46 | 47 | 48 | #ifndef __REG_PBIST_H__ 49 | #define __REG_PBIST_H__ 50 | 51 | #include "sys_common.h" 52 | 53 | /* USER CODE BEGIN (0) */ 54 | /* USER CODE END */ 55 | 56 | /* PBIST Register Frame Definition */ 57 | /** @struct pbistBase 58 | * @brief PBIST Base Register Definition 59 | * 60 | * This structure is used to access the PBIST module registers. 61 | */ 62 | /** @typedef pbistBASE_t 63 | * @brief PBIST Register Frame Type Definition 64 | * 65 | * This type is used to access the PBIST Registers. 66 | */ 67 | typedef volatile struct pbistBase 68 | { 69 | uint32 RAMT; /* 0x0160: RAM Configuration Register */ 70 | uint32 DLR; /* 0x0164: Datalogger Register */ 71 | uint32 rsvd1[6U]; /* 0x0168 */ 72 | uint32 PACT; /* 0x0180: PBIST Activate Register */ 73 | uint32 PBISTID; /* 0x0184: PBIST ID Register */ 74 | uint32 OVER; /* 0x0188: Override Register */ 75 | uint32 rsvd2; /* 0x018C */ 76 | uint32 FSRF0; /* 0x0190: Fail Status Fail Register 0 */ 77 | uint32 rsvd5; /* 0x0194 */ 78 | uint32 FSRC0; /* 0x0198: Fail Status Count Register 0 */ 79 | uint32 FSRC1; /* 0x019C: Fail Status Count Register 1 */ 80 | uint32 FSRA0; /* 0x01A0: Fail Status Address 0 Register */ 81 | uint32 FSRA1; /* 0x01A4: Fail Status Address 1 Register */ 82 | uint32 FSRDL0; /* 0x01A8: Fail Status Data Register 0 */ 83 | uint32 rsvd3; /* 0x01AC */ 84 | uint32 FSRDL1; /* 0x01B0: Fail Status Data Register 1 */ 85 | uint32 rsvd4[3U]; /* 0x01B4 */ 86 | uint32 ROM; /* 0x01C0: ROM Mask Register */ 87 | uint32 ALGO; /* 0x01C4: Algorithm Mask Register */ 88 | uint32 RINFOL; /* 0x01C8: RAM Info Mask Lower Register */ 89 | uint32 RINFOU; /* 0x01CC: RAM Info Mask Upper Register */ 90 | } pbistBASE_t; 91 | 92 | #define pbistREG ((pbistBASE_t *)0xFFFFE560U) 93 | 94 | /* USER CODE BEGIN (1) */ 95 | /* USER CODE END */ 96 | 97 | 98 | #endif 99 | -------------------------------------------------------------------------------- /BSP/IAR-HCG/include/reg_pcr.h: -------------------------------------------------------------------------------- 1 | /** @file reg_pcr.h 2 | * @brief PCR Register Layer Header File 3 | * @date 03.Apr.2015 4 | * @version 04.04.00 5 | * 6 | * This file contains: 7 | * - Definitions 8 | * - Types 9 | * . 10 | * which are relevant for the System driver. 11 | */ 12 | 13 | /* 14 | * Copyright (C) 2009-2015 Texas Instruments Incorporated - www.ti.com 15 | * 16 | * 17 | * Redistribution and use in source and binary forms, with or without 18 | * modification, are permitted provided that the following conditions 19 | * are met: 20 | * 21 | * Redistributions of source code must retain the above copyright 22 | * notice, this list of conditions and the following disclaimer. 23 | * 24 | * Redistributions in binary form must reproduce the above copyright 25 | * notice, this list of conditions and the following disclaimer in the 26 | * documentation and/or other materials provided with the 27 | * distribution. 28 | * 29 | * Neither the name of Texas Instruments Incorporated nor the names of 30 | * its contributors may be used to endorse or promote products derived 31 | * from this software without specific prior written permission. 32 | * 33 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 34 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 35 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 36 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 37 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 38 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 39 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 40 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 41 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 42 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 43 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 44 | * 45 | */ 46 | 47 | 48 | #ifndef __REG_PCR_H__ 49 | #define __REG_PCR_H__ 50 | 51 | #include "sys_common.h" 52 | 53 | /* USER CODE BEGIN (0) */ 54 | /* USER CODE END */ 55 | 56 | /* Pcr Register Frame Definition */ 57 | /** @struct pcrBase 58 | * @brief Pcr Register Frame Definition 59 | * 60 | * This type is used to access the Pcr Registers. 61 | */ 62 | /** @typedef pcrBASE_t 63 | * @brief PCR Register Frame Type Definition 64 | * 65 | * This type is used to access the PCR Registers. 66 | */ 67 | typedef volatile struct pcrBase 68 | { 69 | uint32 PMPROTSET0; /* 0x0000 */ 70 | uint32 PMPROTSET1; /* 0x0004 */ 71 | uint32 rsvd1[2U]; /* 0x0008 */ 72 | uint32 PMPROTCLR0; /* 0x0010 */ 73 | uint32 PMPROTCLR1; /* 0x0014 */ 74 | uint32 rsvd2[2U]; /* 0x0018 */ 75 | uint32 PPROTSET0; /* 0x0020 */ 76 | uint32 PPROTSET1; /* 0x0024 */ 77 | uint32 PPROTSET2; /* 0x0028 */ 78 | uint32 PPROTSET3; /* 0x002C */ 79 | uint32 rsvd3[4U]; /* 0x0030 */ 80 | uint32 PPROTCLR0; /* 0x0040 */ 81 | uint32 PPROTCLR1; /* 0x0044 */ 82 | uint32 PPROTCLR2; /* 0x0048 */ 83 | uint32 PPROTCLR3; /* 0x004C */ 84 | uint32 rsvd4[4U]; /* 0x0050 */ 85 | uint32 PCSPWRDWNSET0; /* 0x0060 */ 86 | uint32 PCSPWRDWNSET1; /* 0x0064 */ 87 | uint32 rsvd5[2U]; /* 0x0068 */ 88 | uint32 PCSPWRDWNCLR0; /* 0x0070 */ 89 | uint32 PCSPWRDWNCLR1; /* 0x0074 */ 90 | uint32 rsvd6[2U]; /* 0x0078 */ 91 | uint32 PSPWRDWNSET0; /* 0x0080 */ 92 | uint32 PSPWRDWNSET1; /* 0x0084 */ 93 | uint32 PSPWRDWNSET2; /* 0x0088 */ 94 | uint32 PSPWRDWNSET3; /* 0x008C */ 95 | uint32 rsvd7[4U]; /* 0x0090 */ 96 | uint32 PSPWRDWNCLR0; /* 0x00A0 */ 97 | uint32 PSPWRDWNCLR1; /* 0x00A4 */ 98 | uint32 PSPWRDWNCLR2; /* 0x00A8 */ 99 | uint32 PSPWRDWNCLR3; /* 0x00AC */ 100 | } pcrBASE_t; 101 | 102 | /** @def pcrREG 103 | * @brief Pcr Register Frame Pointer 104 | * 105 | * This pointer is used by the system driver to access the Pcr registers. 106 | */ 107 | #define pcrREG ((pcrBASE_t *)0xFFFFE000U) 108 | 109 | /* USER CODE BEGIN (1) */ 110 | /* USER CODE END */ 111 | 112 | 113 | #endif 114 | -------------------------------------------------------------------------------- /BSP/IAR-HCG/include/reg_pmm.h: -------------------------------------------------------------------------------- 1 | /** @file reg_pmm.h 2 | * @brief PMM Register Layer Header File 3 | * @date 03.Apr.2015 4 | * @version 04.04.00 5 | * 6 | * This file contains: 7 | * - Definitions 8 | * - Types 9 | * . 10 | * which are relevant for the PMM driver. 11 | */ 12 | 13 | /* 14 | * Copyright (C) 2009-2015 Texas Instruments Incorporated - www.ti.com 15 | * 16 | * 17 | * Redistribution and use in source and binary forms, with or without 18 | * modification, are permitted provided that the following conditions 19 | * are met: 20 | * 21 | * Redistributions of source code must retain the above copyright 22 | * notice, this list of conditions and the following disclaimer. 23 | * 24 | * Redistributions in binary form must reproduce the above copyright 25 | * notice, this list of conditions and the following disclaimer in the 26 | * documentation and/or other materials provided with the 27 | * distribution. 28 | * 29 | * Neither the name of Texas Instruments Incorporated nor the names of 30 | * its contributors may be used to endorse or promote products derived 31 | * from this software without specific prior written permission. 32 | * 33 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 34 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 35 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 36 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 37 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 38 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 39 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 40 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 41 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 42 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 43 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 44 | * 45 | */ 46 | 47 | 48 | #ifndef __REG_PMM_H__ 49 | #define __REG_PMM_H__ 50 | 51 | #include "sys_common.h" 52 | 53 | /* USER CODE BEGIN (0) */ 54 | /* USER CODE END */ 55 | 56 | /* Pmm Register Frame Definition */ 57 | /** @struct pmmBase 58 | * @brief Pmm Register Frame Definition 59 | * 60 | * This type is used to access the Pmm Registers. 61 | */ 62 | /** @typedef pmmBase_t 63 | * @brief Pmm Register Frame Type Definition 64 | * 65 | * This type is used to access the Pmm Registers. 66 | */ 67 | typedef volatile struct pmmBase 68 | { 69 | uint32 LOGICPDPWRCTRL0; /**< 0x0000: Logic Power Domain Control Register 0 */ 70 | uint32 rsvd1[3U]; /**< 0x0004: Reserved*/ 71 | uint32 MEMPDPWRCTRL0; /**< 0x0010: Memory Power Domain Control Register 0 */ 72 | uint32 rsvd2[3U]; /**< 0x0014: Reserved*/ 73 | uint32 PDCLKDISREG; /**< 0x0020: Power Domain Clock Disable Register */ 74 | uint32 PDCLKDISSETREG; /**< 0x0024: Power Domain Clock Disable Set Register */ 75 | uint32 PDCLKDISCLRREG; /**< 0x0028: Power Domain Clock Disable Clear Register */ 76 | uint32 rsvd3[5U]; /**< 0x002C: Reserved */ 77 | uint32 LOGICPDPWRSTAT[4U]; /**< 0x0040, 0x0044, 0x0048, 0x004C: Logic Power Domain Power Status Register 78 | - 0: PD2 79 | - 1: PD3 80 | - 2: PD4 81 | - 3: PD5 */ 82 | uint32 rsvd4[12U]; /**< 0x0050: Reserved*/ 83 | uint32 MEMPDPWRSTAT[3U]; /**< 0x0080, 0x0084, 0x0088: Memory Power Domain Power Status Register 84 | - 0: RAM_PD1 85 | - 1: RAM_PD2 86 | - 2: RAM_PD3 */ 87 | uint32 rsvd5[5U]; /**< 0x008C: Reserved */ 88 | uint32 GLOBALCTRL1; /**< 0x00A0: Global Control Register 1 */ 89 | uint32 rsvd6; /**< 0x00A4: Reserved */ 90 | uint32 GLOBALSTAT; /**< 0x00A8: Global Status Register */ 91 | uint32 PRCKEYREG; /**< 0x00AC: PSCON Diagnostic Compare Key Register */ 92 | uint32 LPDDCSTAT1; /**< 0x00B0: LogicPD PSCON Diagnostic Compare Status Register 1 */ 93 | uint32 LPDDCSTAT2; /**< 0x00B4: LogicPD PSCON Diagnostic Compare Status Register 2 */ 94 | uint32 MPDDCSTAT1; /**< 0x00B8: Memory PD PSCON Diagnostic Compare Status Register 1 */ 95 | uint32 MPDDCSTAT2; /**< 0x00BC: Memory PD PSCON Diagnostic Compare Status Register 2 */ 96 | uint32 ISODIAGSTAT; /**< 0x00C0: Isolation Diagnostic Status Register */ 97 | }pmmBase_t; 98 | 99 | 100 | /** @def pmmREG 101 | * @brief Pmm Register Frame Pointer 102 | * 103 | * This pointer is used by the Pmm driver to access the Pmm registers. 104 | */ 105 | #define pmmREG ((pmmBase_t *)0xFFFF0000U) 106 | 107 | /* USER CODE BEGIN (1) */ 108 | /* USER CODE END */ 109 | 110 | 111 | #endif 112 | -------------------------------------------------------------------------------- /BSP/IAR-HCG/include/reg_pom.h: -------------------------------------------------------------------------------- 1 | /** @file reg_pom.h 2 | * @brief POM Register Layer Header File 3 | * @date 03.Apr.2015 4 | * @version 04.04.00 5 | * 6 | * This file contains: 7 | * - Definitions 8 | * - Types 9 | * - Interface Prototypes 10 | * . 11 | * which are relevant for the POM driver. 12 | */ 13 | 14 | /* 15 | * Copyright (C) 2009-2015 Texas Instruments Incorporated - www.ti.com 16 | * 17 | * 18 | * Redistribution and use in source and binary forms, with or without 19 | * modification, are permitted provided that the following conditions 20 | * are met: 21 | * 22 | * Redistributions of source code must retain the above copyright 23 | * notice, this list of conditions and the following disclaimer. 24 | * 25 | * Redistributions in binary form must reproduce the above copyright 26 | * notice, this list of conditions and the following disclaimer in the 27 | * documentation and/or other materials provided with the 28 | * distribution. 29 | * 30 | * Neither the name of Texas Instruments Incorporated nor the names of 31 | * its contributors may be used to endorse or promote products derived 32 | * from this software without specific prior written permission. 33 | * 34 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 35 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 36 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 37 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 38 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 39 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 40 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 41 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 42 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 43 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 44 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 45 | * 46 | */ 47 | 48 | 49 | #ifndef __REG_POM_H__ 50 | #define __REG_POM_H__ 51 | 52 | #include "sys_common.h" 53 | 54 | 55 | 56 | /* USER CODE BEGIN (0) */ 57 | /* USER CODE END */ 58 | 59 | /* Pom Register Frame Definition */ 60 | /** @struct POMBase 61 | * @brief POM Register Frame Definition 62 | * 63 | * This structure is used to access the POM module registers(POM Register Map). 64 | */ 65 | typedef struct 66 | { 67 | uint32 POMGLBCTRL; /* 0x00 */ 68 | uint32 POMREV; /* 0x04 */ 69 | uint32 POMCLKCTRL; /* 0x08 */ 70 | uint32 POMFLG; /* 0x0C */ 71 | struct 72 | { 73 | uint32 rsdv1; 74 | }RESERVED_REG[124U]; 75 | struct /* 0x200 ... */ 76 | { 77 | uint32 POMPROGSTART; 78 | uint32 POMOVLSTART; 79 | uint32 POMREGSIZE; 80 | uint32 rsdv2; 81 | }POMRGNCONF_ST[32U]; 82 | }pomBASE_t; 83 | 84 | 85 | /** @struct POM_CORESIGHT_ST 86 | * @brief POM_CORESIGHT_ST Register Definition 87 | * 88 | * This structure is used to access the POM module registers(POM CoreSight Registers ). 89 | */ 90 | typedef struct 91 | { 92 | uint32 POMITCTRL; /* 0xF00 */ 93 | struct /* 0xF04 to 0xF9C */ 94 | { 95 | uint32 Reserved_Reg; 96 | }Reserved1_ST[39U]; 97 | uint32 POMCLAIMSET; /* 0xFA0 */ 98 | uint32 POMCLAIMCLR; /* 0xFA4 */ 99 | uint32 rsvd1[2U]; /* 0xFA8 */ 100 | uint32 POMLOCKACCESS; /* 0xFB0 */ 101 | uint32 POMLOCKSTATUS; /* 0xFB4 */ 102 | uint32 POMAUTHSTATUS; /* 0xFB8 */ 103 | uint32 rsvd2[3U]; /* 0xFBC */ 104 | uint32 POMDEVID; /* 0xFC8 */ 105 | uint32 POMDEVTYPE; /* 0xFCC */ 106 | uint32 POMPERIPHERALID4; /* 0xFD0 */ 107 | uint32 POMPERIPHERALID5; /* 0xFD4 */ 108 | uint32 POMPERIPHERALID6; /* 0xFD8 */ 109 | uint32 POMPERIPHERALID7; /* 0xFDC */ 110 | uint32 POMPERIPHERALID0; /* 0xFE0 */ 111 | uint32 POMPERIPHERALID1; /* 0xFE4 */ 112 | uint32 POMPERIPHERALID2; /* 0xFE8 */ 113 | uint32 POMPERIPHERALID3; /* 0xFEC */ 114 | uint32 POMCOMPONENTID0; /* 0xFF0 */ 115 | uint32 POMCOMPONENTID1; /* 0xFF4 */ 116 | uint32 POMCOMPONENTID2; /* 0xFF8 */ 117 | uint32 POMCOMPONENTID3; /* 0xFFC */ 118 | }POM_CORESIGHT_ST; 119 | 120 | 121 | #define pomREG ((pomBASE_t *)0xFFA04000U) 122 | 123 | /* USER CODE BEGIN (1) */ 124 | /* USER CODE END */ 125 | 126 | 127 | #endif 128 | -------------------------------------------------------------------------------- /BSP/IAR-HCG/include/reg_rtp.h: -------------------------------------------------------------------------------- 1 | /** @file reg_rtp.h 2 | * @brief RTP Register Layer Header File 3 | * @date 03.Apr.2015 4 | * @version 04.04.00 5 | * 6 | * This file contains: 7 | * - Definitions 8 | * - Types 9 | * - Interface Prototypes 10 | * . 11 | * which are relevant for the RTP driver. 12 | */ 13 | 14 | /* 15 | * Copyright (C) 2009-2015 Texas Instruments Incorporated - www.ti.com 16 | * 17 | * 18 | * Redistribution and use in source and binary forms, with or without 19 | * modification, are permitted provided that the following conditions 20 | * are met: 21 | * 22 | * Redistributions of source code must retain the above copyright 23 | * notice, this list of conditions and the following disclaimer. 24 | * 25 | * Redistributions in binary form must reproduce the above copyright 26 | * notice, this list of conditions and the following disclaimer in the 27 | * documentation and/or other materials provided with the 28 | * distribution. 29 | * 30 | * Neither the name of Texas Instruments Incorporated nor the names of 31 | * its contributors may be used to endorse or promote products derived 32 | * from this software without specific prior written permission. 33 | * 34 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 35 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 36 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 37 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 38 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 39 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 40 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 41 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 42 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 43 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 44 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 45 | * 46 | */ 47 | 48 | 49 | #ifndef __REG_RTP_H__ 50 | #define __REG_RTP_H__ 51 | 52 | #include "sys_common.h" 53 | #include "reg_gio.h" 54 | 55 | 56 | 57 | /* USER CODE BEGIN (0) */ 58 | /* USER CODE END */ 59 | 60 | /* Rtp Register Frame Definition */ 61 | /** @struct rtpBase 62 | * @brief RTP Base Register Definition 63 | * 64 | * This structure is used to access the RTP module registers. 65 | */ 66 | /** @typedef rtpBASE_t 67 | * @brief RTP Register Frame Type Definition 68 | * 69 | * This type is used to access the RTP Registers. 70 | */ 71 | typedef volatile struct rtpBase 72 | { 73 | uint32 GLBCTRL; /**< 0x0000: RTP Global Control Register */ 74 | uint32 TRENA; /**< 0x0004: RTP Trace Enable Register */ 75 | uint32 GSR; /**< 0x0008: RTP Global Status Register */ 76 | uint32 RAM1REG1; /**< 0x000C: RTP RAM 1 Trace Region 1 Register */ 77 | uint32 RAM1REG2; /**< 0x0010: RTP RAM 1 Trace Region 2 Register */ 78 | uint32 RAM2REG1; /**< 0x0014: RTP RAM 2 Trace Region 1 Register */ 79 | uint32 RAM2REG2; /**< 0x0018: RTP RAM 2 Trace Region 2 Register */ 80 | uint32 rsvd1[2U]; /**< 0x001C: Reserved */ 81 | uint32 ERREG1; /**< 0x0024: RTP Peripheral Trace Region 1 Register */ 82 | uint32 ERREG2; /**< 0x0028: RTP Peripheral Trace Region 2 Register */ 83 | uint32 DDMW; /**< 0x002C: RTP Direct Data Mode Write Register */ 84 | uint32 rsvd2; /**< 0x0030: Reserved */ 85 | uint32 PC0; /**< 0x0034: RTP Pin Control 0 Register */ 86 | uint32 PC1; /**< 0x0038: RTP Pin Control 1 Register */ 87 | uint32 PC2; /**< 0x003C: RTP Pin Control 2 Register */ 88 | uint32 PC3; /**< 0x0040: RTP Pin Control 3 Register */ 89 | uint32 PC4; /**< 0x0044: RTP Pin Control 4 Register */ 90 | uint32 PC5; /**< 0x0048: RTP Pin Control 5 Register */ 91 | uint32 PC6; /**< 0x004C: RTP Pin Control 6 Register */ 92 | uint32 PC7; /**< 0x0050: RTP Pin Control 7 Register */ 93 | uint32 PC8; /**< 0x0054: RTP Pin Control 8 Register */ 94 | } rtpBASE_t; 95 | 96 | 97 | /** @def rtpREG 98 | * @brief RTP Register Frame Pointer 99 | * 100 | * This pointer is used by the RTP driver to access the RTP module registers. 101 | */ 102 | #define rtpREG ((rtpBASE_t *)0xFFFFFA00U) 103 | 104 | /** @def rtpPORT 105 | * @brief RTP Port Register Pointer 106 | * 107 | * Pointer used by the GIO driver to access I/O PORT of RTP 108 | * (use the GIO drivers to access the port pins). 109 | */ 110 | #define rtpPORT ((gioPORT_t *)0xFFFFFA38U) 111 | 112 | /* USER CODE BEGIN (1) */ 113 | /* USER CODE END */ 114 | 115 | 116 | #endif 117 | -------------------------------------------------------------------------------- /BSP/IAR-HCG/include/reg_sci.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Truck-OBD-Development/J1939_Decode/951a5ea86404e1da6e77c490b1ee778b8a7a3ea3/BSP/IAR-HCG/include/reg_sci.h -------------------------------------------------------------------------------- /BSP/IAR-HCG/include/reg_stc.h: -------------------------------------------------------------------------------- 1 | /** @file reg_stc.h 2 | * @brief STC Register Layer Header File 3 | * @date 03.Apr.2015 4 | * @version 04.04.00 5 | * 6 | * This file contains: 7 | * - Definitions 8 | * - Types 9 | * . 10 | * which are relevant for the System driver. 11 | */ 12 | 13 | /* 14 | * Copyright (C) 2009-2015 Texas Instruments Incorporated - www.ti.com 15 | * 16 | * 17 | * Redistribution and use in source and binary forms, with or without 18 | * modification, are permitted provided that the following conditions 19 | * are met: 20 | * 21 | * Redistributions of source code must retain the above copyright 22 | * notice, this list of conditions and the following disclaimer. 23 | * 24 | * Redistributions in binary form must reproduce the above copyright 25 | * notice, this list of conditions and the following disclaimer in the 26 | * documentation and/or other materials provided with the 27 | * distribution. 28 | * 29 | * Neither the name of Texas Instruments Incorporated nor the names of 30 | * its contributors may be used to endorse or promote products derived 31 | * from this software without specific prior written permission. 32 | * 33 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 34 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 35 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 36 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 37 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 38 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 39 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 40 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 41 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 42 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 43 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 44 | * 45 | */ 46 | 47 | 48 | #ifndef __REG_STC_H__ 49 | #define __REG_STC_H__ 50 | 51 | #include "sys_common.h" 52 | 53 | /* USER CODE BEGIN (0) */ 54 | /* USER CODE END */ 55 | 56 | /* Stc Register Frame Definition */ 57 | /** @struct stcBase 58 | * @brief STC Base Register Definition 59 | * 60 | * This structure is used to access the STC module registers. 61 | */ 62 | /** @typedef stcBASE_t 63 | * @brief STC Register Frame Type Definition 64 | * 65 | * This type is used to access the STC Registers. 66 | */ 67 | typedef volatile struct stcBase 68 | { 69 | uint32 STCGCR0; /**< 0x0000: STC Control Register 0 */ 70 | uint32 STCGCR1; /**< 0x0004: STC Control Register 1 */ 71 | uint32 STCTPR; /**< 0x0008: STC Self-Test Run Timeout Counter Preload Register */ 72 | uint32 STCCADDR; /**< 0x000C: STC Self-Test Current ROM Address Register */ 73 | uint32 STCCICR; /**< 0x0010: STC Self-Test Current Interval Count Register */ 74 | uint32 STCGSTAT; /**< 0x0014: STC Self-Test Global Status Register */ 75 | uint32 STCFSTAT; /**< 0x0018: STC Self-Test Fail Status Register */ 76 | uint32 CPU1_CURMISR3; /**< 0x001C: STC CPU1 Current MISR Register */ 77 | uint32 CPU1_CURMISR2; /**< 0x0020: STC CPU1 Current MISR Register */ 78 | uint32 CPU1_CURMISR1; /**< 0x0024: STC CPU1 Current MISR Register */ 79 | uint32 CPU1_CURMISR0; /**< 0x0028: STC CPU1 Current MISR Register */ 80 | uint32 CPU2_CURMISR3; /**< 0x002C: STC CPU1 Current MISR Register */ 81 | uint32 CPU2_CURMISR2; /**< 0x0030: STC CPU1 Current MISR Register */ 82 | uint32 CPU2_CURMISR1; /**< 0x0034: STC CPU1 Current MISR Register */ 83 | uint32 CPU2_CURMISR0; /**< 0x0038: STC CPU1 Current MISR Register */ 84 | uint32 STCSCSCR; /**< 0x003C: STC Signature Compare Self-Check Register */ 85 | } stcBASE_t; 86 | 87 | #define stcREG ((stcBASE_t *)0xFFFFE600U) 88 | 89 | /* USER CODE BEGIN (1) */ 90 | /* USER CODE END */ 91 | 92 | 93 | #endif 94 | -------------------------------------------------------------------------------- /BSP/IAR-HCG/include/reg_tcram.h: -------------------------------------------------------------------------------- 1 | /** @file reg_tcram.h 2 | * @brief TCRAM Register Layer Header File 3 | * @date 03.Apr.2015 4 | * @version 04.04.00 5 | * 6 | * This file contains: 7 | * - Definitions 8 | * - Types 9 | * . 10 | * which are relevant for the System driver. 11 | */ 12 | 13 | /* 14 | * Copyright (C) 2009-2015 Texas Instruments Incorporated - www.ti.com 15 | * 16 | * 17 | * Redistribution and use in source and binary forms, with or without 18 | * modification, are permitted provided that the following conditions 19 | * are met: 20 | * 21 | * Redistributions of source code must retain the above copyright 22 | * notice, this list of conditions and the following disclaimer. 23 | * 24 | * Redistributions in binary form must reproduce the above copyright 25 | * notice, this list of conditions and the following disclaimer in the 26 | * documentation and/or other materials provided with the 27 | * distribution. 28 | * 29 | * Neither the name of Texas Instruments Incorporated nor the names of 30 | * its contributors may be used to endorse or promote products derived 31 | * from this software without specific prior written permission. 32 | * 33 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 34 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 35 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 36 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 37 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 38 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 39 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 40 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 41 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 42 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 43 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 44 | * 45 | */ 46 | 47 | 48 | #ifndef __REG_TCRAM_H__ 49 | #define __REG_TCRAM_H__ 50 | 51 | /* USER CODE BEGIN (0) */ 52 | /* USER CODE END */ 53 | 54 | #include "sys_common.h" 55 | 56 | /* USER CODE BEGIN (1) */ 57 | /* USER CODE END */ 58 | 59 | /* Tcram Register Frame Definition */ 60 | /** @struct tcramBase 61 | * @brief TCRAM Wrapper Register Frame Definition 62 | * 63 | * This type is used to access the TCRAM Wrapper Registers. 64 | */ 65 | /** @typedef tcramBASE_t 66 | * @brief TCRAM Wrapper Register Frame Type Definition 67 | * 68 | * This type is used to access the TCRAM Wrapper Registers. 69 | */ 70 | 71 | typedef volatile struct tcramBase 72 | { 73 | uint32 RAMCTRL; /* 0x0000 */ 74 | uint32 RAMTHRESHOLD; /* 0x0004 */ 75 | uint32 RAMOCCUR; /* 0x0008 */ 76 | uint32 RAMINTCTRL; /* 0x000C */ 77 | uint32 RAMERRSTATUS; /* 0x0010 */ 78 | uint32 RAMSERRADDR; /* 0x0014 */ 79 | uint32 rsvd1; /* 0x0018 */ 80 | uint32 RAMUERRADDR; /* 0x001C */ 81 | uint32 rsvd2[4U]; /* 0x0020 */ 82 | uint32 RAMTEST; /* 0x0030 */ 83 | uint32 rsvd3; /* 0x0034 */ 84 | uint32 RAMADDRDECVECT; /* 0x0038 */ 85 | uint32 RAMPERADDR; /* 0x003C */ 86 | } tcramBASE_t; 87 | 88 | #define tcram1REG ((tcramBASE_t *)(0xFFFFF800U)) 89 | #define tcram2REG ((tcramBASE_t *)(0xFFFFF900U)) 90 | 91 | /* USER CODE BEGIN (2) */ 92 | /* USER CODE END */ 93 | 94 | #endif 95 | -------------------------------------------------------------------------------- /BSP/IAR-HCG/include/reg_vim.h: -------------------------------------------------------------------------------- 1 | /** @file reg_vim.h 2 | * @brief VIM Register Layer Header File 3 | * @date 03.Apr.2015 4 | * @version 04.04.00 5 | * 6 | * This file contains: 7 | * - Definitions 8 | * - Types 9 | * . 10 | * which are relevant for the System driver. 11 | */ 12 | 13 | /* 14 | * Copyright (C) 2009-2015 Texas Instruments Incorporated - www.ti.com 15 | * 16 | * 17 | * Redistribution and use in source and binary forms, with or without 18 | * modification, are permitted provided that the following conditions 19 | * are met: 20 | * 21 | * Redistributions of source code must retain the above copyright 22 | * notice, this list of conditions and the following disclaimer. 23 | * 24 | * Redistributions in binary form must reproduce the above copyright 25 | * notice, this list of conditions and the following disclaimer in the 26 | * documentation and/or other materials provided with the 27 | * distribution. 28 | * 29 | * Neither the name of Texas Instruments Incorporated nor the names of 30 | * its contributors may be used to endorse or promote products derived 31 | * from this software without specific prior written permission. 32 | * 33 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 34 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 35 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 36 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 37 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 38 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 39 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 40 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 41 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 42 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 43 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 44 | * 45 | */ 46 | 47 | 48 | #ifndef __REG_VIM_H__ 49 | #define __REG_VIM_H__ 50 | 51 | #include "sys_common.h" 52 | 53 | /* USER CODE BEGIN (0) */ 54 | /* USER CODE END */ 55 | 56 | /* Vim Register Frame Definition */ 57 | /** @struct vimBase 58 | * @brief Vim Register Frame Definition 59 | * 60 | * This type is used to access the Vim Registers. 61 | */ 62 | /** @typedef vimBASE_t 63 | * @brief VIM Register Frame Type Definition 64 | * 65 | * This type is used to access the VIM Registers. 66 | */ 67 | typedef volatile struct vimBase 68 | { 69 | uint32 IRQINDEX; /* 0x0000 */ 70 | uint32 FIQINDEX; /* 0x0004 */ 71 | uint32 rsvd1; /* 0x0008 */ 72 | uint32 rsvd2; /* 0x000C */ 73 | uint32 FIRQPR0; /* 0x0010 */ 74 | uint32 FIRQPR1; /* 0x0014 */ 75 | uint32 FIRQPR2; /* 0x0018 */ 76 | uint32 FIRQPR3; /* 0x001C */ 77 | uint32 INTREQ0; /* 0x0020 */ 78 | uint32 INTREQ1; /* 0x0024 */ 79 | uint32 INTREQ2; /* 0x0028 */ 80 | uint32 INTREQ3; /* 0x002C */ 81 | uint32 REQMASKSET0; /* 0x0030 */ 82 | uint32 REQMASKSET1; /* 0x0034 */ 83 | uint32 REQMASKSET2; /* 0x0038 */ 84 | uint32 REQMASKSET3; /* 0x003C */ 85 | uint32 REQMASKCLR0; /* 0x0040 */ 86 | uint32 REQMASKCLR1; /* 0x0044 */ 87 | uint32 REQMASKCLR2; /* 0x0048 */ 88 | uint32 REQMASKCLR3; /* 0x004C */ 89 | uint32 WAKEMASKSET0; /* 0x0050 */ 90 | uint32 WAKEMASKSET1; /* 0x0054 */ 91 | uint32 WAKEMASKSET2; /* 0x0058 */ 92 | uint32 WAKEMASKSET3; /* 0x005C */ 93 | uint32 WAKEMASKCLR0; /* 0x0060 */ 94 | uint32 WAKEMASKCLR1; /* 0x0064 */ 95 | uint32 WAKEMASKCLR2; /* 0x0068 */ 96 | uint32 WAKEMASKCLR3; /* 0x006C */ 97 | uint32 IRQVECREG; /* 0x0070 */ 98 | uint32 FIQVECREG; /* 0x0074 */ 99 | uint32 CAPEVT; /* 0x0078 */ 100 | uint32 rsvd3; /* 0x007C */ 101 | uint32 CHANCTRL[24U]; /* 0x0080-0x0DC */ 102 | } vimBASE_t; 103 | 104 | #define vimREG ((vimBASE_t *)0xFFFFFE00U) 105 | 106 | /* USER CODE BEGIN (1) */ 107 | /* USER CODE END */ 108 | 109 | 110 | #endif 111 | -------------------------------------------------------------------------------- /BSP/IAR-HCG/include/sci.h: -------------------------------------------------------------------------------- 1 | /** @file sci.h 2 | * @brief SCI Driver Definition File 3 | * @date 03.Apr.2015 4 | * @version 04.04.00 5 | * 6 | */ 7 | 8 | /* 9 | * Copyright (C) 2009-2015 Texas Instruments Incorporated - www.ti.com 10 | * 11 | * 12 | * Redistribution and use in source and binary forms, with or without 13 | * modification, are permitted provided that the following conditions 14 | * are met: 15 | * 16 | * Redistributions of source code must retain the above copyright 17 | * notice, this list of conditions and the following disclaimer. 18 | * 19 | * Redistributions in binary form must reproduce the above copyright 20 | * notice, this list of conditions and the following disclaimer in the 21 | * documentation and/or other materials provided with the 22 | * distribution. 23 | * 24 | * Neither the name of Texas Instruments Incorporated nor the names of 25 | * its contributors may be used to endorse or promote products derived 26 | * from this software without specific prior written permission. 27 | * 28 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 29 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 30 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 31 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 32 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 33 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 34 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 35 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 36 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 37 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 38 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 39 | * 40 | */ 41 | 42 | 43 | 44 | #ifndef __SCI_H__ 45 | #define __SCI_H__ 46 | 47 | #include "reg_sci.h" 48 | 49 | #ifdef __cplusplus 50 | extern "C" { 51 | #endif 52 | 53 | /* USER CODE BEGIN (0) */ 54 | /* USER CODE END */ 55 | 56 | /** @enum sciIntFlags 57 | * @brief Interrupt Flag Definitions 58 | * 59 | * Used with sciEnableNotification, sciDisableNotification 60 | */ 61 | enum sciIntFlags 62 | { 63 | SCI_FE_INT = 0x04000000U, /* framing error */ 64 | SCI_OE_INT = 0x02000000U, /* overrun error */ 65 | SCI_PE_INT = 0x01000000U, /* parity error */ 66 | SCI_RX_INT = 0x00000200U, /* receive buffer ready */ 67 | SCI_TX_INT = 0x00000100U, /* transmit buffer ready */ 68 | SCI_WAKE_INT = 0x00000002U, /* wakeup */ 69 | SCI_BREAK_INT = 0x00000001U /* break detect */ 70 | }; 71 | 72 | /** @def SCI_IDLE 73 | * @brief Alias name for the SCI IDLE Flag 74 | * 75 | * This is an alias name for the SCI IDLE Flag. 76 | * 77 | */ 78 | #define SCI_IDLE 0x00000004U 79 | 80 | /** @struct sciBase 81 | * @brief SCI Register Definition 82 | * 83 | * This structure is used to access the SCI module registers. 84 | */ 85 | /** @typedef sciBASE_t 86 | * @brief SCI Register Frame Type Definition 87 | * 88 | * This type is used to access the SCI Registers. 89 | */ 90 | 91 | enum sciPinSelect 92 | { 93 | PIN_SCI_TX = 4U, 94 | PIN_SCI_RX = 2U 95 | }; 96 | 97 | 98 | /* Configuration registers */ 99 | typedef struct sci_config_reg 100 | { 101 | uint32 CONFIG_GCR0; 102 | uint32 CONFIG_GCR1; 103 | uint32 CONFIG_SETINT; 104 | uint32 CONFIG_SETINTLVL; 105 | uint32 CONFIG_FORMAT; 106 | uint32 CONFIG_BRS; 107 | uint32 CONFIG_PIO0; 108 | uint32 CONFIG_PIO1; 109 | uint32 CONFIG_PIO6; 110 | uint32 CONFIG_PIO7; 111 | uint32 CONFIG_PIO8; 112 | } sci_config_reg_t; 113 | 114 | 115 | 116 | 117 | /** 118 | * @defgroup SCI SCI 119 | * @brief Serial Communication Interface Module. 120 | * 121 | * The SCI module is a universal asynchronous receiver-transmitter that implements the standard nonreturn 122 | * to zero format. The SCI can be used to communicate, for example, through an RS-232 port or over a K-line. 123 | * 124 | * Related Files 125 | * - reg_sci.h 126 | * - sci.h 127 | * - sci.c 128 | * @addtogroup SCI 129 | * @{ 130 | */ 131 | 132 | /* SCI Interface Functions */ 133 | void sciInit(void); 134 | void sciSetFunctional(sciBASE_t *sci, uint32 port); 135 | void sciSetBaudrate(sciBASE_t *sci, uint32 baud); 136 | uint32 sciIsTxReady(sciBASE_t *sci); 137 | void sciSendByte(sciBASE_t *sci, uint8 byte); 138 | void sciSend(sciBASE_t *sci, uint32 length, uint8 * data); 139 | uint32 sciIsRxReady(sciBASE_t *sci); 140 | uint32 sciIsIdleDetected(sciBASE_t *sci); 141 | uint32 sciRxError(sciBASE_t *sci); 142 | uint32 sciReceiveByte(sciBASE_t *sci); 143 | void sciReceive(sciBASE_t *sci, uint32 length, uint8 * data); 144 | void sciEnableNotification(sciBASE_t *sci, uint32 flags); 145 | void sciDisableNotification(sciBASE_t *sci, uint32 flags); 146 | void sciEnableLoopback(sciBASE_t *sci, loopBackType_t Loopbacktype); 147 | void sciDisableLoopback(sciBASE_t *sci); 148 | /** @fn void sciNotification(sciBASE_t *sci, uint32 flags) 149 | * @brief Interrupt callback 150 | * @param[in] sci - sci module base address 151 | * @param[in] flags - copy of error interrupt flags 152 | * 153 | * This is a callback that is provided by the application and is called upon 154 | * an interrupt. The parameter passed to the callback is a copy of the 155 | * interrupt flag register. 156 | */ 157 | void sciNotification(sciBASE_t *sci, uint32 flags); 158 | 159 | /* USER CODE BEGIN (1) */ 160 | /* USER CODE END */ 161 | /**@}*/ 162 | #ifdef __cplusplus 163 | } 164 | #endif 165 | 166 | #endif 167 | -------------------------------------------------------------------------------- /BSP/IAR-HCG/include/sys_common.h: -------------------------------------------------------------------------------- 1 | /** @file sys_common.h 2 | * @brief Common Header File 3 | * @date 03.Apr.2015 4 | * @version 04.04.00 5 | * 6 | * This file contains: 7 | * - General Definitions 8 | * . 9 | * which are relevant for all drivers. 10 | */ 11 | 12 | /* 13 | * Copyright (C) 2009-2015 Texas Instruments Incorporated - www.ti.com 14 | * 15 | * 16 | * Redistribution and use in source and binary forms, with or without 17 | * modification, are permitted provided that the following conditions 18 | * are met: 19 | * 20 | * Redistributions of source code must retain the above copyright 21 | * notice, this list of conditions and the following disclaimer. 22 | * 23 | * Redistributions in binary form must reproduce the above copyright 24 | * notice, this list of conditions and the following disclaimer in the 25 | * documentation and/or other materials provided with the 26 | * distribution. 27 | * 28 | * Neither the name of Texas Instruments Incorporated nor the names of 29 | * its contributors may be used to endorse or promote products derived 30 | * from this software without specific prior written permission. 31 | * 32 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 33 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 34 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 35 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 36 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 37 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 38 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 39 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 40 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 41 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 42 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 43 | * 44 | */ 45 | 46 | 47 | #ifndef __SYS_COMMON_H__ 48 | #define __SYS_COMMON_H__ 49 | 50 | #include "hal_stdtypes.h" 51 | 52 | #ifdef __cplusplus 53 | extern "C" { 54 | #endif 55 | /* USER CODE BEGIN (0) */ 56 | /* USER CODE END */ 57 | 58 | /************************************************************/ 59 | /* Type Definitions */ 60 | /************************************************************/ 61 | 62 | #ifndef _TBOOLEAN_DECLARED 63 | typedef boolean tBoolean; 64 | #define _TBOOLEAN_DECLARED 65 | #endif 66 | 67 | /** @enum loopBackType 68 | * @brief Loopback type definition 69 | */ 70 | /** @typedef loopBackType_t 71 | * @brief Loopback type Type Definition 72 | * 73 | * This type is used to select the module Loopback type Digital or Analog loopback. 74 | */ 75 | typedef enum loopBackType 76 | { 77 | Digital_Lbk = 0U, 78 | Analog_Lbk = 1U 79 | }loopBackType_t; 80 | 81 | /** @enum config_value_type 82 | * @brief config type definition 83 | */ 84 | /** @typedef config_value_type_t 85 | * @brief config type Type Definition 86 | * 87 | * This type is used to specify the Initial and Current value. 88 | */ 89 | typedef enum config_value_type 90 | { 91 | InitialValue, 92 | CurrentValue 93 | }config_value_type_t; 94 | 95 | /* USER CODE BEGIN (1) */ 96 | /* USER CODE END */ 97 | 98 | /********************************************************************************/ 99 | /* The ASSERT macro, which does the actual assertion checking. Typically, this */ 100 | /* will be for procedure arguments. */ 101 | /********************************************************************************/ 102 | #ifdef DEBUG 103 | #define ASSERT(expr) { \ 104 | if(!(expr)) \ 105 | { \ 106 | __error__(__FILE__, __LINE__); \ 107 | } \ 108 | } 109 | #else 110 | #define ASSERT(expr) 111 | #endif 112 | 113 | /* USER CODE BEGIN (2) */ 114 | /* USER CODE END */ 115 | 116 | #define IRQ __irq 117 | #define FIQ __fiq 118 | /* USER CODE BEGIN (3) */ 119 | /* USER CODE END */ 120 | #ifdef __cplusplus 121 | } 122 | #endif 123 | 124 | 125 | #endif 126 | -------------------------------------------------------------------------------- /BSP/IAR-HCG/include/sys_pcr.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Truck-OBD-Development/J1939_Decode/951a5ea86404e1da6e77c490b1ee778b8a7a3ea3/BSP/IAR-HCG/include/sys_pcr.h -------------------------------------------------------------------------------- /BSP/IAR-HCG/include/ti_fee_cfg.h: -------------------------------------------------------------------------------- 1 | /********************************************************************************************************************** 2 | * FILE DESCRIPTION 3 | * ------------------------------------------------------------------------------------------------------------------- 4 | * File: ti_fee_cfg.h 5 | * Project: Tms570_TIFEEDriver 6 | * Module: TIFEEDriver 7 | * Generator: HALcogen 8 | * 9 | * Description: This file implements the TI FEE Api. 10 | *--------------------------------------------------------------------------------------------------------------------- 11 | * Author: Vishwanath Reddy 12 | *--------------------------------------------------------------------------------------------------------------------- 13 | * Revision History 14 | *--------------------------------------------------------------------------------------------------------------------- 15 | * Version Date Author Change ID Description 16 | *--------------------------------------------------------------------------------------------------------------------- 17 | * 03.00.00 31Aug2012 Vishwanath Reddy 0000000000000 Initial Version 18 | * 19 | *********************************************************************************************************************/ 20 | 21 | /* 22 | * Copyright (C) 2009-2015 Texas Instruments Incorporated - www.ti.com 23 | * 24 | * 25 | * Redistribution and use in source and binary forms, with or without 26 | * modification, are permitted provided that the following conditions 27 | * are met: 28 | * 29 | * Redistributions of source code must retain the above copyright 30 | * notice, this list of conditions and the following disclaimer. 31 | * 32 | * Redistributions in binary form must reproduce the above copyright 33 | * notice, this list of conditions and the following disclaimer in the 34 | * documentation and/or other materials provided with the 35 | * distribution. 36 | * 37 | * Neither the name of Texas Instruments Incorporated nor the names of 38 | * its contributors may be used to endorse or promote products derived 39 | * from this software without specific prior written permission. 40 | * 41 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 42 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 43 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 44 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 45 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 46 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 47 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 48 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 49 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 50 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 51 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 52 | * 53 | */ 54 | 55 | -------------------------------------------------------------------------------- /BSP/IAR-HCG/include/usb-ids.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2009-2015 Texas Instruments Incorporated - www.ti.com 3 | * 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 9 | * Redistributions of source code must retain the above copyright 10 | * notice, this list of conditions and the following disclaimer. 11 | * 12 | * Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in the 14 | * documentation and/or other materials provided with the 15 | * distribution. 16 | * 17 | * Neither the name of Texas Instruments Incorporated nor the names of 18 | * its contributors may be used to endorse or promote products derived 19 | * from this software without specific prior written permission. 20 | * 21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 22 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 23 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 24 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 25 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 26 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 27 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 28 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 29 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 30 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 31 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 32 | * 33 | */ 34 | 35 | 36 | /** 37 | * @file usb-ids.h 38 | * 39 | * @brief Definitions of VIDs and PIDs used by Stellaris USB examples. 40 | * 41 | */ 42 | 43 | #ifndef __USBIDS_H__ 44 | #define __USBIDS_H__ 45 | 46 | /** *************************************************************************** 47 | * 48 | * TI Vendor ID. 49 | * 50 | *****************************************************************************/ 51 | #define USB_VID_TI 0x0000 52 | 53 | /** *************************************************************************** 54 | * 55 | * Product IDs. 56 | * 57 | *****************************************************************************/ 58 | #define USB_PID_MOUSE 0x0000 59 | #define USB_PID_KEYBOARD 0x0001 60 | #define USB_PID_SERIAL 0x0000 61 | #define USB_PID_BULK 0x0003 62 | #define USB_PID_SCOPE 0x0004 63 | #define USB_PID_MSC 0x0005 64 | #define USB_PID_AUDIO 0x0006 65 | #define USB_PID_COMP_SERIAL 0x0007 66 | #define USB_PID_COMP_AUDIO_HID 0x0008 67 | #define USB_PID_COMP_HID_SER 0x0009 68 | #define USB_PID_DFU 0x00FF 69 | 70 | 71 | #endif /* __USBIDS_H__ */ 72 | -------------------------------------------------------------------------------- /BSP/IAR-HCG/include/usb_serial_structs.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2009-2015 Texas Instruments Incorporated - www.ti.com 3 | * 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 9 | * Redistributions of source code must retain the above copyright 10 | * notice, this list of conditions and the following disclaimer. 11 | * 12 | * Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in the 14 | * documentation and/or other materials provided with the 15 | * distribution. 16 | * 17 | * Neither the name of Texas Instruments Incorporated nor the names of 18 | * its contributors may be used to endorse or promote products derived 19 | * from this software without specific prior written permission. 20 | * 21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 22 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 23 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 24 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 25 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 26 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 27 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 28 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 29 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 30 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 31 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 32 | * 33 | */ 34 | 35 | 36 | /** 37 | * @file usb_serial_structs.h 38 | * 39 | * @brief Data structures defining this USB CDC device. 40 | * 41 | */ 42 | 43 | #ifndef _USB_SERIAL_STRUCTS_H_ 44 | #define _USB_SERIAL_STRUCTS_H_ 45 | 46 | /****************************************************************************** 47 | * 48 | * The size of the transmit and receive buffers used for the redirected UART. 49 | * This number should be a power of 2 for best performance. 256 is chosen 50 | * pretty much at random though the buffer should be at least twice the size of 51 | * a maxmum-sized USB packet. 52 | * 53 | *****************************************************************************/ 54 | #define UART_BUFFER_SIZE 0x0001 55 | 56 | /** *************************************************************************** 57 | * 58 | * CDC device callback function prototypes. 59 | * 60 | *****************************************************************************/ 61 | uint32 RxHandler(void *pvCBData, uint32 ulEvent, 62 | uint32 ulMsgValue, void *pvMsgData); 63 | uint32 TxHandler(void *pvCBData, uint32 ulEvent, 64 | uint32 ulMsgValue, void *pvMsgData); 65 | uint32 ControlHandler(void *pvCBData, uint32 ulEvent, 66 | uint32 ulMsgValue, void *pvMsgData); 67 | 68 | extern const tUSBBuffer g_sTxBuffer; 69 | extern const tUSBBuffer g_sRxBuffer; 70 | extern const tUSBDCDCDevice g_sCDCDevice; 71 | extern uint8 g_pucUSBTxBuffer[]; 72 | extern uint8 g_pucUSBRxBuffer[]; 73 | 74 | #endif 75 | -------------------------------------------------------------------------------- /BSP/IAR-HCG/include/usbdevicepriv.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * FILE DESCRIPTION 3 | * --------------------------------------------------------------------------- 4 | * File: usbdevicepriv.h 5 | * Component: 6 | * Module: usb 7 | * Generator: - 8 | * 9 | * Description: Private header file used to share internal variables and 10 | * function prototypes between the various device-related 11 | * modules in the USB library. This header MUST NOT be 12 | * used by application code. 13 | * 14 | *****************************************************************************/ 15 | 16 | /* 17 | * Copyright (C) 2009-2015 Texas Instruments Incorporated - www.ti.com 18 | * 19 | * 20 | * Redistribution and use in source and binary forms, with or without 21 | * modification, are permitted provided that the following conditions 22 | * are met: 23 | * 24 | * Redistributions of source code must retain the above copyright 25 | * notice, this list of conditions and the following disclaimer. 26 | * 27 | * Redistributions in binary form must reproduce the above copyright 28 | * notice, this list of conditions and the following disclaimer in the 29 | * documentation and/or other materials provided with the 30 | * distribution. 31 | * 32 | * Neither the name of Texas Instruments Incorporated nor the names of 33 | * its contributors may be used to endorse or promote products derived 34 | * from this software without specific prior written permission. 35 | * 36 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 37 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 38 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 39 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 40 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 41 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 42 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 43 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 44 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 45 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 46 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 47 | * 48 | */ 49 | 50 | 51 | #ifndef __USBDEVICEPRIV_H__ 52 | #define __USBDEVICEPRIV_H__ 53 | 54 | /****************************************************************************** 55 | * 56 | * If building with a C++ compiler, make all of the definitions in this header 57 | * have a C binding. 58 | * 59 | *****************************************************************************/ 60 | 61 | #ifdef __cplusplus 62 | extern "C" 63 | { 64 | #endif 65 | 66 | /****************************************************************************** 67 | * 68 | * Device enumeration functions provided by device/usbenum.c and called from 69 | * the interrupt handler in device/usbhandler.c 70 | * 71 | *****************************************************************************/ 72 | extern tBoolean USBDeviceConfig(uint32 ulIndex, 73 | const tConfigHeader *psConfig, 74 | const tFIFOConfig *psFIFOConfig); 75 | extern tBoolean USBDeviceConfigAlternate(uint32 ulIndex, 76 | const tConfigHeader *psConfig, 77 | uint8 ucInterfaceNum, 78 | uint8 ucAlternateSetting); 79 | extern void USBDeviceResumeTickHandler(uint32 ulIndex); 80 | 81 | /****************************************************************************** 82 | * 83 | * Mark the end of the C bindings section for C++ compilers. 84 | * 85 | *****************************************************************************/ 86 | #ifdef __cplusplus 87 | } 88 | #endif 89 | 90 | #endif /* __USBDEVICEPRIV_H__ */ 91 | -------------------------------------------------------------------------------- /BSP/IAR-HCG/source/notification.c: -------------------------------------------------------------------------------- 1 | /** @file notification.c 2 | * @brief User Notification Definition File 3 | * @date 03.Apr.2015 4 | * @version 04.04.00 5 | * 6 | * This file defines empty notification routines to avoid 7 | * linker errors, Driver expects user to define the notification. 8 | * The user needs to either remove this file and use their custom 9 | * notification function or place their code sequence in this file 10 | * between the provided USER CODE BEGIN and USER CODE END. 11 | * 12 | */ 13 | 14 | /* 15 | * Copyright (C) 2009-2015 Texas Instruments Incorporated - www.ti.com 16 | * 17 | * 18 | * Redistribution and use in source and binary forms, with or without 19 | * modification, are permitted provided that the following conditions 20 | * are met: 21 | * 22 | * Redistributions of source code must retain the above copyright 23 | * notice, this list of conditions and the following disclaimer. 24 | * 25 | * Redistributions in binary form must reproduce the above copyright 26 | * notice, this list of conditions and the following disclaimer in the 27 | * documentation and/or other materials provided with the 28 | * distribution. 29 | * 30 | * Neither the name of Texas Instruments Incorporated nor the names of 31 | * its contributors may be used to endorse or promote products derived 32 | * from this software without specific prior written permission. 33 | * 34 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 35 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 36 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 37 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 38 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 39 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 40 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 41 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 42 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 43 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 44 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 45 | * 46 | */ 47 | 48 | 49 | /* Include Files */ 50 | 51 | #include "esm.h" 52 | #include "sys_selftest.h" 53 | #include "sys_dma.h" 54 | 55 | /* USER CODE BEGIN (0) */ 56 | /* USER CODE END */ 57 | void esmGroup1Notification(uint32 channel) 58 | { 59 | /* enter user code between the USER CODE BEGIN and USER CODE END. */ 60 | /* USER CODE BEGIN (1) */ 61 | /* USER CODE END */ 62 | } 63 | 64 | /* USER CODE BEGIN (2) */ 65 | /* USER CODE END */ 66 | void esmGroup2Notification(uint32 channel) 67 | { 68 | /* enter user code between the USER CODE BEGIN and USER CODE END. */ 69 | /* USER CODE BEGIN (3) */ 70 | /* USER CODE END */ 71 | } 72 | 73 | /* USER CODE BEGIN (4) */ 74 | /* USER CODE END */ 75 | void memoryPort0TestFailNotification(uint32 groupSelect, uint32 dataSelect, uint32 address, uint32 data) 76 | { 77 | /* enter user code between the USER CODE BEGIN and USER CODE END. */ 78 | /* USER CODE BEGIN (5) */ 79 | /* USER CODE END */ 80 | } 81 | 82 | /* USER CODE BEGIN (6) */ 83 | /* USER CODE END */ 84 | void memoryPort1TestFailNotification(uint32 groupSelect, uint32 dataSelect, uint32 address, uint32 data) 85 | { 86 | /* enter user code between the USER CODE BEGIN and USER CODE END. */ 87 | /* USER CODE BEGIN (7) */ 88 | /* USER CODE END */ 89 | } 90 | 91 | /* USER CODE BEGIN (8) */ 92 | /* USER CODE END */ 93 | 94 | 95 | 96 | 97 | /* USER CODE BEGIN (43) */ 98 | /* USER CODE END */ 99 | 100 | 101 | /* USER CODE BEGIN (47) */ 102 | /* USER CODE END */ 103 | 104 | 105 | /* USER CODE BEGIN (50) */ 106 | /* USER CODE END */ 107 | 108 | 109 | /* USER CODE BEGIN (53) */ 110 | /* USER CODE END */ 111 | 112 | void dmaGroupANotification(dmaInterrupt_t inttype, uint32 channel) 113 | { 114 | /* enter user code between the USER CODE BEGIN and USER CODE END. */ 115 | /* USER CODE BEGIN (54) */ 116 | /* USER CODE END */ 117 | } 118 | /* USER CODE BEGIN (55) */ 119 | /* USER CODE END */ 120 | 121 | /* USER CODE BEGIN (56) */ 122 | /* USER CODE END */ 123 | 124 | /* USER CODE BEGIN (58) */ 125 | /* USER CODE END */ 126 | 127 | /* USER CODE BEGIN (60) */ 128 | /* USER CODE END */ 129 | -------------------------------------------------------------------------------- /BSP/IAR-HCG/source/sys_intvecs.asm: -------------------------------------------------------------------------------- 1 | ;------------------------------------------------------------------------------- 2 | ; sys_intvecs.asm 3 | ; 4 | ; Copyright (C) 2009-2015 Texas Instruments Incorporated - www.ti.com 5 | ; 6 | ; 7 | ; Redistribution and use in source and binary forms, with or without 8 | ; modification, are permitted provided that the following conditions 9 | ; are met: 10 | ; 11 | ; Redistributions of source code must retain the above copyright 12 | ; notice, this list of conditions and the following disclaimer. 13 | ; 14 | ; Redistributions in binary form must reproduce the above copyright 15 | ; notice, this list of conditions and the following disclaimer in the 16 | ; documentation and/or other materials provided with the 17 | ; distribution. 18 | ; 19 | ; Neither the name of Texas Instruments Incorporated nor the names of 20 | ; its contributors may be used to endorse or promote products derived 21 | ; from this software without specific prior written permission. 22 | ; 23 | ; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 24 | ; "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 25 | ; LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 26 | ; A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 27 | ; OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 28 | ; SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 29 | ; LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 30 | ; DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 31 | ; THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 32 | ; (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 33 | ; OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 34 | ; 35 | ; 36 | ; 37 | 38 | section .intvecs:CODE 39 | arm 40 | 41 | ;------------------------------------------------------------------------------- 42 | ; import reference for interrupt routines 43 | 44 | import _c_int00 45 | import OS_CPU_ARM_ExceptUndefInstrHndlr 46 | import OS_CPU_ARM_ExceptSwiHndlr 47 | import OS_CPU_ARM_ExceptPrefetchAbortHndlr 48 | import OS_CPU_ARM_ExceptDataAbortHndlr 49 | import OS_CPU_ARM_ExceptIrqHndlr 50 | import phantomInterrupt 51 | public resetEntry 52 | 53 | ;------------------------------------------------------------------------------- 54 | ; interrupt vectors 55 | 56 | resetEntry 57 | b _c_int00 58 | b OS_CPU_ARM_ExceptUndefInstrHndlr 59 | b OS_CPU_ARM_ExceptSwiHndlr 60 | b OS_CPU_ARM_ExceptPrefetchAbortHndlr 61 | b OS_CPU_ARM_ExceptDataAbortHndlr 62 | b phantomInterrupt 63 | b OS_CPU_ARM_ExceptIrqHndlr 64 | ldr pc,[pc,#-0x1b0] 65 | 66 | end 67 | ;------------------------------------------------------------------------------- 68 | -------------------------------------------------------------------------------- /BSP/IAR-HCG/source/sys_link.cmd: -------------------------------------------------------------------------------- 1 | /*----------------------------------------------------------------------------*/ 2 | /* sys_link.cmd */ 3 | /* */ 4 | /* 5 | * Copyright (C) 2009-2015 Texas Instruments Incorporated - www.ti.com 6 | * 7 | * 8 | * Redistribution and use in source and binary forms, with or without 9 | * modification, are permitted provided that the following conditions 10 | * are met: 11 | * 12 | * Redistributions of source code must retain the above copyright 13 | * notice, this list of conditions and the following disclaimer. 14 | * 15 | * Redistributions in binary form must reproduce the above copyright 16 | * notice, this list of conditions and the following disclaimer in the 17 | * documentation and/or other materials provided with the 18 | * distribution. 19 | * 20 | * Neither the name of Texas Instruments Incorporated nor the names of 21 | * its contributors may be used to endorse or promote products derived 22 | * from this software without specific prior written permission. 23 | * 24 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 25 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 26 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 27 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 28 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 29 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 30 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 31 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 32 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 33 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 34 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 35 | * 36 | */ 37 | 38 | /* */ 39 | /*----------------------------------------------------------------------------*/ 40 | define memory mem with size = 4G; 41 | 42 | define region VECTORS = mem:[from 0x00000000 size 0x00000020]; 43 | define region FLASH = mem:[from 0x00000020 size 0x0017FFE0] 44 | | mem:[from 0x00180000 size 0x00180000]; 45 | define region STACK = mem:[from 0x08000000 size 0x00000700]; 46 | define region RAM = mem:[from 0x08000700 size 0x0003f900]; 47 | define block HEAP with size = 0x800, alignment = 8{ }; 48 | 49 | initialize by copy {readwrite}; 50 | do not initialize {section .noinit}; 51 | 52 | place in VECTORS {readonly section .intvecs}; 53 | place in FLASH {readonly}; 54 | place in RAM {readwrite}; 55 | place in RAM {block HEAP}; 56 | /*----------------------------------------------------------------------------*/ 57 | -------------------------------------------------------------------------------- /BSP/IAR-HCG/source/sys_main.c: -------------------------------------------------------------------------------- 1 | /** @file sys_main.c 2 | * @brief Application main file 3 | * @date 03.Apr.2015 4 | * @version 04.04.00 5 | * 6 | * This file contains an empty main function, 7 | * which can be used for the application. 8 | */ 9 | 10 | /* 11 | * Copyright (C) 2009-2015 Texas Instruments Incorporated - www.ti.com 12 | * 13 | * 14 | * Redistribution and use in source and binary forms, with or without 15 | * modification, are permitted provided that the following conditions 16 | * are met: 17 | * 18 | * Redistributions of source code must retain the above copyright 19 | * notice, this list of conditions and the following disclaimer. 20 | * 21 | * Redistributions in binary form must reproduce the above copyright 22 | * notice, this list of conditions and the following disclaimer in the 23 | * documentation and/or other materials provided with the 24 | * distribution. 25 | * 26 | * Neither the name of Texas Instruments Incorporated nor the names of 27 | * its contributors may be used to endorse or promote products derived 28 | * from this software without specific prior written permission. 29 | * 30 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 31 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 32 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 33 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 34 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 35 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 36 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 37 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 38 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 39 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 40 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 41 | * 42 | */ 43 | 44 | 45 | /* USER CODE BEGIN (0) */ 46 | /* USER CODE END */ 47 | 48 | /* Include Files */ 49 | 50 | #include "sys_common.h" 51 | 52 | /* USER CODE BEGIN (1) */ 53 | /* USER CODE END */ 54 | 55 | /** @fn void main(void) 56 | * @brief Application main function 57 | * @note This function is empty by default. 58 | * 59 | * This function is called after startup. 60 | * The user can use this function to implement the application. 61 | */ 62 | 63 | /* USER CODE BEGIN (2) */ 64 | /* USER CODE END */ 65 | 66 | void main(void) 67 | { 68 | /* USER CODE BEGIN (3) */ 69 | /* USER CODE END */ 70 | } 71 | 72 | /* USER CODE BEGIN (4) */ 73 | /* USER CODE END */ 74 | -------------------------------------------------------------------------------- /BSP/IAR-HCG/source/sys_phantom.c: -------------------------------------------------------------------------------- 1 | /** @file sys_phantom.c 2 | * @brief Phantom Interrupt Source File 3 | * @date 03.Apr.2015 4 | * @version 04.04.00 5 | * 6 | * This file contains: 7 | * - Phantom Interrupt Handler 8 | */ 9 | 10 | /* 11 | * Copyright (C) 2009-2015 Texas Instruments Incorporated - www.ti.com 12 | * 13 | * 14 | * Redistribution and use in source and binary forms, with or without 15 | * modification, are permitted provided that the following conditions 16 | * are met: 17 | * 18 | * Redistributions of source code must retain the above copyright 19 | * notice, this list of conditions and the following disclaimer. 20 | * 21 | * Redistributions in binary form must reproduce the above copyright 22 | * notice, this list of conditions and the following disclaimer in the 23 | * documentation and/or other materials provided with the 24 | * distribution. 25 | * 26 | * Neither the name of Texas Instruments Incorporated nor the names of 27 | * its contributors may be used to endorse or promote products derived 28 | * from this software without specific prior written permission. 29 | * 30 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 31 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 32 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 33 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 34 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 35 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 36 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 37 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 38 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 39 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 40 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 41 | * 42 | */ 43 | 44 | 45 | #include "sys_common.h" 46 | 47 | /* USER CODE BEGIN (0) */ 48 | /* USER CODE END */ 49 | 50 | /* Phantom Interrupt Handler */ 51 | 52 | /* USER CODE BEGIN (1) */ 53 | /* USER CODE END */ 54 | 55 | IRQ 56 | 57 | void phantomInterrupt(void) 58 | { 59 | /* USER CODE BEGIN (2) */ 60 | /* USER CODE END */ 61 | } 62 | 63 | /* USER CODE BEGIN (3) */ 64 | /* USER CODE END */ 65 | -------------------------------------------------------------------------------- /BSP/os_bsp.h: -------------------------------------------------------------------------------- 1 | /* 2 | ********************************************************************************************************* 3 | * EXAMPLE CODE 4 | * 5 | * This file is provided as an example on how to use Micrium products. 6 | * 7 | * Please feel free to use any application code labeled as 'EXAMPLE CODE' in 8 | * your application products. Example code may be used as is, in whole or in 9 | * part, or may be used as a reference only. This file can be modified as 10 | * required to meet the end-product requirements. 11 | * 12 | * Please help us continue to provide the Embedded community with the finest 13 | * software available. Your honesty is greatly appreciated. 14 | * 15 | * You can find our product's user manual, API reference, release notes and 16 | * more information at https://doc.micrium.com. 17 | * You can contact us at www.micrium.com. 18 | ********************************************************************************************************* 19 | */ 20 | 21 | /* 22 | ********************************************************************************************************* 23 | * 24 | * MICRIUM BOARD SUPPORT PACKAGE 25 | * Texas Instruments 26 | * RM48x Hercules Development Kit(HDK) 27 | * 28 | * Filename : os_bsp.h 29 | * Version : V1.00 30 | * Programmer(s) : FF 31 | ********************************************************************************************************* 32 | */ 33 | 34 | /* 35 | ********************************************************************************************************* 36 | * MODULE 37 | * 38 | * Note(s) : (1) This BSP serial header file is protected from multiple pre-processor inclusion through 39 | * use of the BSP serial present pre-processor macro definition. 40 | ********************************************************************************************************* 41 | */ 42 | 43 | #ifndef OS_BSP_PRESENT 44 | #define OS_BSP_PRESENT 45 | 46 | 47 | /* 48 | ********************************************************************************************************* 49 | * PROTOTYPES 50 | * 51 | * Note(s): (1) 'OS_BSP_TickInit()' Initialize the tick interrupt. 52 | ********************************************************************************************************* 53 | */ 54 | 55 | void OS_BSP_TickInit (CPU_INT32U tick_rate); 56 | 57 | 58 | /* 59 | ********************************************************************************************************* 60 | * MODULE END 61 | ********************************************************************************************************* 62 | */ 63 | 64 | #endif /* End of module include. */ 65 | -------------------------------------------------------------------------------- /BSP/serial_bsp_rm48.h: -------------------------------------------------------------------------------- 1 | /* 2 | ********************************************************************************************************* 3 | * SERIAL (BYTE) COMMUNICATION 4 | * 5 | * (c) Copyright 2007-2014; Micrium, Inc.; Weston, FL 6 | * 7 | * All rights reserved. Protected by international copyright laws. 8 | * Knowledge of the source code may NOT be used to develop a similar product. 9 | * Please help us continue to provide the Embedded community with the finest 10 | * software available. Your honesty is greatly appreciated. 11 | ********************************************************************************************************* 12 | */ 13 | 14 | /* 15 | ********************************************************************************************************* 16 | * 17 | * SERIAL (BYTE) COMMUNICATION 18 | * DEVICE DRIVER BSP 19 | * 20 | * Texas Instruments 21 | * RM48x Hercules Development Kit(HDK) 22 | * 23 | * Filename : serial_bsp_rm48.h 24 | * Version : V2.00.01 25 | * Programmer(s) : NB 26 | ********************************************************************************************************* 27 | */ 28 | 29 | /* 30 | ********************************************************************************************************* 31 | * MODULE 32 | * 33 | * Note(s) : (1) This header file is protected from multiple pre-processor inclusion through use of the 34 | * SERIAL_BSP_TEMPLATE present pre-processor macro definition. 35 | ********************************************************************************************************* 36 | */ 37 | 38 | #ifndef SERIAL_BSP_RM48_PRESENT 39 | #define SERIAL_BSP_RM48_PRESENT 40 | 41 | 42 | /* 43 | ********************************************************************************************************* 44 | * INCLUDE FILES 45 | ********************************************************************************************************* 46 | */ 47 | 48 | #include 49 | #include 50 | 51 | #include 52 | #include 53 | 54 | 55 | /* 56 | ********************************************************************************************************* 57 | * SERIAL DEVICES 58 | ********************************************************************************************************* 59 | */ 60 | 61 | extern SERIAL_DEV_CFG SerialDevCfg_RM48_SCI1; 62 | 63 | 64 | /*$PAGE*/ 65 | /* 66 | ********************************************************************************************************* 67 | * MODULE END 68 | ********************************************************************************************************* 69 | */ 70 | 71 | 72 | #endif /* End of SERIAL_BSP_TEMPLATE module include. */ 73 | -------------------------------------------------------------------------------- /Docs/ISO11898-1.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Truck-OBD-Development/J1939_Decode/951a5ea86404e1da6e77c490b1ee778b8a7a3ea3/Docs/ISO11898-1.pdf -------------------------------------------------------------------------------- /Docs/ISO15765-2-2004.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Truck-OBD-Development/J1939_Decode/951a5ea86404e1da6e77c490b1ee778b8a7a3ea3/Docs/ISO15765-2-2004.pdf -------------------------------------------------------------------------------- /Docs/ISO15765-4-2005.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Truck-OBD-Development/J1939_Decode/951a5ea86404e1da6e77c490b1ee778b8a7a3ea3/Docs/ISO15765-4-2005.pdf -------------------------------------------------------------------------------- /Docs/ISO_15765-3-2004.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Truck-OBD-Development/J1939_Decode/951a5ea86404e1da6e77c490b1ee778b8a7a3ea3/Docs/ISO_15765-3-2004.pdf -------------------------------------------------------------------------------- /Docs/OBD-II PIDs.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Truck-OBD-Development/J1939_Decode/951a5ea86404e1da6e77c490b1ee778b8a7a3ea3/Docs/OBD-II PIDs.pdf -------------------------------------------------------------------------------- /Docs/SAE-J1939-21-2006.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Truck-OBD-Development/J1939_Decode/951a5ea86404e1da6e77c490b1ee778b8a7a3ea3/Docs/SAE-J1939-21-2006.pdf -------------------------------------------------------------------------------- /Docs/SAEJ1939-73-2006.PDF: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Truck-OBD-Development/J1939_Decode/951a5ea86404e1da6e77c490b1ee778b8a7a3ea3/Docs/SAEJ1939-73-2006.PDF -------------------------------------------------------------------------------- /Docs/SAEJ1939协议在重型车OBD中的应用.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Truck-OBD-Development/J1939_Decode/951a5ea86404e1da6e77c490b1ee778b8a7a3ea3/Docs/SAEJ1939协议在重型车OBD中的应用.pdf -------------------------------------------------------------------------------- /OS/uC-CAN/OS/uCOS-III/can_os.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Truck-OBD-Development/J1939_Decode/951a5ea86404e1da6e77c490b1ee778b8a7a3ea3/OS/uC-CAN/OS/uCOS-III/can_os.h -------------------------------------------------------------------------------- /OS/uC-CAN/Source/can_drv.h: -------------------------------------------------------------------------------- 1 | /* 2 | **************************************************************************************************** 3 | * uC/CAN 4 | * The Embedded CAN suite 5 | * 6 | * (c) Copyright 2003-2015; Micrium, Inc.; Weston, FL 7 | * 8 | * All rights reserved. Protected by international copyright laws. 9 | * 10 | * uC/CAN is provided in source form to registered licensees ONLY. It is 11 | * illegal to distribute this source code to any third party unless you receive 12 | * written permission by an authorized Micrium representative. Knowledge of 13 | * the source code may NOT be used to develop a similar product. 14 | * 15 | * Please help us continue to provide the Embedded community with the finest 16 | * software available. Your honesty is greatly appreciated. 17 | * 18 | * You can contact us at www.micrium.com. 19 | **************************************************************************************************** 20 | */ 21 | 22 | /* 23 | **************************************************************************************************** 24 | * Filename : can_drv.h 25 | * Version : V2.42.00 26 | * Programmer(s) : E0 27 | * Purpose : This include file defines the CAN low-level device driver interface. 28 | **************************************************************************************************** 29 | */ 30 | 31 | #ifndef _CAN_DRV_H_ 32 | #define _CAN_DRV_H_ 33 | 34 | #ifdef __cplusplus 35 | extern "C" { 36 | #endif 37 | 38 | /*------------------------------------------------------------------------------------------------*/ 39 | /*! \brief I/O CONTROL FUNCTIONCODES 40 | * 41 | * This enumeration defines the required functioncode values for the lowlevel 42 | * device driver function IoCtl(). 43 | */ 44 | /*------------------------------------------------------------------------------------------------*/ 45 | enum CANDRV_IOCTL_FUNC { 46 | /*! \brief Set Baudrate 47 | * 48 | * This enum value is the functioncode to set the baudrate of the CAN controller interface. 49 | * 50 | * The parameter pointer shall point to an CPU_INT32U variable, which holds the baudrate 51 | * in bit/s. 52 | */ 53 | CAN_SET_BAUDRATE = 0, 54 | /*! \brief Enable Bus 55 | * 56 | * This enum value is the functioncode to start the CAN controller interface. Most common 57 | * is to set the CAN controller in active mode. 58 | * 59 | * The parameter pointer is not used for this function. 60 | */ 61 | CAN_START, 62 | /*! \brief Disable Bus 63 | * 64 | * This enum value is the functioncode to stop the CAN controller interface. Most common 65 | * is to set the CAN controller in passive mode. 66 | * 67 | * The parameter pointer is not used for this function. 68 | */ 69 | CAN_STOP, 70 | /*! \brief Set Receiver to Standard Identifier 71 | * 72 | * This enum value is the functioncode to configure the CAN receiver to receive only 73 | * CAN standard identifiers. 74 | * 75 | * The parameter pointer is not used for this function. 76 | */ 77 | CAN_RX_STANDARD, 78 | /*! \brief Set Receiver to Extended Identifier 79 | * 80 | * This enum value is the functioncode to configure the CAN receiver to receive only 81 | * CAN extended identifiers. 82 | * 83 | * The parameter pointer is not used for this function. 84 | */ 85 | CAN_RX_EXTENDED, 86 | /*! \brief Get TX Buffer Status 87 | * 88 | * This enum value is the functioncode to get the status of the current transmit 89 | * buffer. 90 | * 91 | * The parameter pointer shall point to a CPU_INT08U variable, where the status 92 | * shall be written to. 93 | */ 94 | CAN_TX_READY, 95 | /*! \brief Get Node Status 96 | * 97 | * This enum value is the functioncode to get the node status from the 98 | * CAN controller. 99 | * 100 | * The parameter pointer shall point to a CPU_INT08U variable, where the status 101 | * shall be written to. 102 | */ 103 | CAN_GET_NODE_STATUS, 104 | 105 | /*! \brief Number of Needed IO Function Codes 106 | * 107 | * This enum value holds the number of function codes, which are used within the 108 | * can bus layer. 109 | */ 110 | CAN_IO_FUNC_N 111 | }; 112 | 113 | #ifdef __cplusplus 114 | } 115 | #endif 116 | 117 | #endif /* #ifndef _CAN_DRV_H_ */ 118 | 119 | -------------------------------------------------------------------------------- /OS/uC-CAN/Source/can_err.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Truck-OBD-Development/J1939_Decode/951a5ea86404e1da6e77c490b1ee778b8a7a3ea3/OS/uC-CAN/Source/can_err.h -------------------------------------------------------------------------------- /OS/uC-CPU/cpu_cache.h: -------------------------------------------------------------------------------- 1 | /* 2 | ********************************************************************************************************* 3 | * uC/CPU 4 | * CPU CONFIGURATION & PORT LAYER 5 | * 6 | * (c) Copyright 2004-2015; Micrium, Inc.; Weston, FL 7 | * 8 | * All rights reserved. Protected by international copyright laws. 9 | * 10 | * uC/CPU is provided in source form to registered licensees ONLY. It is 11 | * illegal to distribute this source code to any third party unless you receive 12 | * written permission by an authorized Micrium representative. Knowledge of 13 | * the source code may NOT be used to develop a similar product. 14 | * 15 | * Please help us continue to provide the Embedded community with the finest 16 | * software available. Your honesty is greatly appreciated. 17 | * 18 | * You can find our product's user manual, API reference, release notes and 19 | * more information at https://doc.micrium.com. 20 | * You can contact us at www.micrium.com. 21 | ********************************************************************************************************* 22 | */ 23 | 24 | /* 25 | ********************************************************************************************************* 26 | * 27 | * CACHE CPU MODULE 28 | * 29 | * Filename : cpu_cache.h 30 | * Version : V1.30.02 31 | * Programmer(s) : JBL 32 | ********************************************************************************************************* 33 | */ 34 | 35 | 36 | /* 37 | ********************************************************************************************************* 38 | * MODULE 39 | * 40 | * Note(s) : (1) This cache CPU header file is protected from multiple pre-processor inclusion through use of 41 | * the cache CPU module present pre-processor macro definition. 42 | ********************************************************************************************************* 43 | */ 44 | 45 | #ifndef CPU_CACHE_MODULE_PRESENT /* See Note #1. */ 46 | #define CPU_CACHE_MODULE_PRESENT 47 | 48 | 49 | /* 50 | ********************************************************************************************************* 51 | * EXTERNS 52 | ********************************************************************************************************* 53 | */ 54 | 55 | #ifdef CPU_CACHE_MODULE 56 | #define CPU_CACHE_EXT 57 | #else 58 | #define CPU_CACHE_EXT extern 59 | #endif 60 | 61 | 62 | /* 63 | ********************************************************************************************************* 64 | * INCLUDE FILES 65 | ********************************************************************************************************* 66 | */ 67 | 68 | #include 69 | #include 70 | #include 71 | 72 | 73 | /* 74 | ********************************************************************************************************* 75 | * CACHE CONFIGURATION 76 | ********************************************************************************************************* 77 | */ 78 | 79 | #ifndef CPU_CFG_CACHE_MGMT_EN 80 | #define CPU_CFG_CACHE_MGMT_EN DEF_DISABLED 81 | #endif 82 | 83 | 84 | /* 85 | ********************************************************************************************************* 86 | * CACHE OPERATIONS DEFINES 87 | ********************************************************************************************************* 88 | */ 89 | 90 | #if (CPU_CFG_CACHE_MGMT_EN == DEF_ENABLED) 91 | #ifndef CPU_DCACHE_RANGE_FLUSH 92 | #define CPU_DCACHE_RANGE_FLUSH(addr_start, len) CPU_DCache_RangeFlush(addr_start, len) 93 | #endif /* CPU_DCACHE_RANGE_FLUSH */ 94 | #else 95 | #define CPU_DCACHE_RANGE_FLUSH(addr_start, len) 96 | #endif /* CPU_CFG_CACHE_MGMT_EN) */ 97 | 98 | 99 | #if (CPU_CFG_CACHE_MGMT_EN == DEF_ENABLED) 100 | #ifndef CPU_DCACHE_RANGE_INV 101 | #define CPU_DCACHE_RANGE_INV(addr_start, len) CPU_DCache_RangeInv(addr_start, len) 102 | #endif /* CPU_DCACHE_RANGE_INV */ 103 | #else 104 | #define CPU_DCACHE_RANGE_INV(addr_start, len) 105 | #endif /* CPU_CFG_CACHE_MGMT_EN) */ 106 | 107 | 108 | /* 109 | ********************************************************************************************************* 110 | * FUNCTION PROTOTYPES 111 | ********************************************************************************************************* 112 | */ 113 | 114 | #if (CPU_CFG_CACHE_MGMT_EN == DEF_ENABLED) 115 | 116 | #ifdef __cplusplus 117 | extern "C" { 118 | #endif 119 | 120 | void CPU_Cache_Init (void); 121 | 122 | void CPU_DCache_RangeFlush(void *addr_start, 123 | CPU_ADDR len); 124 | 125 | void CPU_DCache_RangeInv (void *addr_start, 126 | CPU_ADDR len); 127 | 128 | #ifdef __cplusplus 129 | } 130 | #endif 131 | 132 | #endif /* CPU_CFG_CACHE_MGMT_EN */ 133 | 134 | 135 | /* 136 | ********************************************************************************************************* 137 | * MODULE END 138 | * 139 | * Note(s) : (1) See 'cpu_core.h MODULE'. 140 | ********************************************************************************************************* 141 | */ 142 | 143 | #endif /* End of CPU core module include. */ 144 | -------------------------------------------------------------------------------- /OS/uC-Serial/Driver/TI/serial_drv_rm48.h: -------------------------------------------------------------------------------- 1 | /* 2 | ********************************************************************************************************* 3 | * SERIAL (BYTE) COMMUNICATION 4 | * 5 | * (c) Copyright 2007-2009; Micrium, Inc.; Weston, FL 6 | * 7 | * All rights reserved. Protected by international copyright laws. 8 | * Knowledge of the source code may NOT be used to develop a similar product. 9 | * Please help us continue to provide the Embedded community with the finest 10 | * software available. Your honesty is greatly appreciated. 11 | ********************************************************************************************************* 12 | */ 13 | 14 | /* 15 | ********************************************************************************************************* 16 | * 17 | * SERIAL (BYTE) COMMUNICATION 18 | * DEVICE DRIVER 19 | * 20 | * Texas Instruments RM48 21 | * 22 | * Filename : serial_drv_rm48.h 23 | * Version : V2.00.01 24 | * Programmer(s) : NB 25 | ********************************************************************************************************* 26 | */ 27 | 28 | /* 29 | ********************************************************************************************************* 30 | * MODULE 31 | * 32 | * Note(s) : (1) This header file is protected from multiple pre-processor inclusion through use of the 33 | * SERIAL_DRV_TEMPLATE present pre-processor macro definition. 34 | ********************************************************************************************************* 35 | */ 36 | 37 | #ifndef SERIAL_DRV_RM48_PRESENT 38 | #define SERIAL_DRV_RM48_PRESENT 39 | 40 | 41 | /* 42 | ********************************************************************************************************* 43 | * SERIAL DEVICE DRIVER API 44 | ********************************************************************************************************* 45 | */ 46 | 47 | extern SERIAL_DRV_API SerialDrv_RM48_API; 48 | 49 | 50 | /*$PAGE*/ 51 | /* 52 | ********************************************************************************************************* 53 | * MODULE END 54 | ********************************************************************************************************* 55 | */ 56 | 57 | #endif /* End of SERIAL_DRV_TEMPLATE module include. */ 58 | -------------------------------------------------------------------------------- /OS/uC-Serial/Line/serial_line_dflt.h: -------------------------------------------------------------------------------- 1 | /* 2 | ********************************************************************************************************* 3 | * SERIAL (BYTE) COMMUNICATION 4 | * 5 | * (c) Copyright 2007-2009; Micrium, Inc.; Weston, FL 6 | * 7 | * All rights reserved. Protected by international copyright laws. 8 | * Knowledge of the source code may NOT be used to develop a similar product. 9 | * Please help us continue to provide the Embedded community with the finest 10 | * software available. Your honesty is greatly appreciated. 11 | ********************************************************************************************************* 12 | */ 13 | 14 | /* 15 | ********************************************************************************************************* 16 | * 17 | * SERIAL (BYTE) COMMUNICATION 18 | * 19 | * SERIAL LINE DRIVER 20 | * DEFAULT 21 | * 22 | * Filename : serial_line_dflt.h 23 | * Version : V2.00.01 24 | * Programmer(s) : FGK 25 | ********************************************************************************************************* 26 | */ 27 | 28 | /* 29 | ********************************************************************************************************* 30 | * MODULE 31 | * 32 | * Note(s) : (1) This header file is protected from multiple pre-processor inclusion through use of the 33 | * SERIAL_LINE_DFLT present pre-processor macro definition. 34 | ********************************************************************************************************* 35 | */ 36 | 37 | #ifndef SERIAL_LINE_DFLT_PRESENT 38 | #define SERIAL_LINE_DFLT_PRESENT 39 | 40 | 41 | /* 42 | ********************************************************************************************************* 43 | * EXTERNS 44 | ********************************************************************************************************* 45 | */ 46 | 47 | #ifdef SERIAL_LINE_DFLT_MODULE 48 | #define SERIAL_LINE_DFLT_EXT 49 | #else 50 | #define SERIAL_LINE_DFLT_EXT extern 51 | #endif 52 | 53 | 54 | /* 55 | ********************************************************************************************************* 56 | * GLOBAL VARIABLES 57 | ********************************************************************************************************* 58 | */ 59 | 60 | extern SERIAL_LINE_DRV_API SerialLine_Dflt; /* Default serial line driver. */ 61 | 62 | 63 | /* 64 | ********************************************************************************************************* 65 | * MODULE END 66 | ********************************************************************************************************* 67 | */ 68 | 69 | #endif /* End of SERIAL_LINE_DFLT module include. */ 70 | -------------------------------------------------------------------------------- /OS/uC-Serial/Line/serial_line_probe.h: -------------------------------------------------------------------------------- 1 | /* 2 | ********************************************************************************************************* 3 | * SERIAL (BYTE) COMMUNICATION 4 | * 5 | * (c) Copyright 2007-2009; Micrium, Inc.; Weston, FL 6 | * 7 | * All rights reserved. Protected by international copyright laws. 8 | * Knowledge of the source code may NOT be used to develop a similar product. 9 | * Please help us continue to provide the Embedded community with the finest 10 | * software available. Your honesty is greatly appreciated. 11 | ********************************************************************************************************* 12 | */ 13 | 14 | /* 15 | ********************************************************************************************************* 16 | * 17 | * SERIAL (BYTE) COMMUNICATION 18 | * 19 | * SERIAL LINE DRIVER 20 | * PROBE 21 | * 22 | * Filename : serial_line_probe.h 23 | * Version : V2.00.01 24 | * Programmer(s) : FGK 25 | ********************************************************************************************************* 26 | */ 27 | 28 | /* 29 | ********************************************************************************************************* 30 | * MODULE 31 | * 32 | * Note(s) : (1) This header file is protected from multiple pre-processor inclusion through use of the 33 | * SERIAL_LINE_PROBE present pre-processor macro definition. 34 | ********************************************************************************************************* 35 | */ 36 | 37 | #ifndef SERIAL_LINE_PROBE_PRESENT 38 | #define SERIAL_LINE_PROBE_PRESENT 39 | 40 | 41 | /* 42 | ********************************************************************************************************* 43 | * EXTERNS 44 | ********************************************************************************************************* 45 | */ 46 | 47 | #ifdef SERIAL_LINE_PROBE_MODULE 48 | #define SERIAL_LINE_PROBE_EXT 49 | #else 50 | #define SERIAL_LINE_PROBE_EXT extern 51 | #endif 52 | 53 | 54 | /* 55 | ********************************************************************************************************* 56 | * GLOBAL VARIABLES 57 | ********************************************************************************************************* 58 | */ 59 | 60 | extern SERIAL_LINE_DRV_API SerialLine_Probe; /* Probe serial line driver. */ 61 | 62 | 63 | /* 64 | ********************************************************************************************************* 65 | * MODULE END 66 | ********************************************************************************************************* 67 | */ 68 | 69 | #endif /* End of SERIAL_LINE_PROBE module include. */ 70 | -------------------------------------------------------------------------------- /OS/uC-Serial/Line/serial_line_tty.h: -------------------------------------------------------------------------------- 1 | /* 2 | ********************************************************************************************************* 3 | * SERIAL (BYTE) COMMUNICATION 4 | * 5 | * (c) Copyright 2007-2009; Micrium, Inc.; Weston, FL 6 | * 7 | * All rights reserved. Protected by international copyright laws. 8 | * Knowledge of the source code may NOT be used to develop a similar product. 9 | * Please help us continue to provide the Embedded community with the finest 10 | * software available. Your honesty is greatly appreciated. 11 | ********************************************************************************************************* 12 | */ 13 | 14 | /* 15 | ********************************************************************************************************* 16 | * 17 | * SERIAL (BYTE) COMMUNICATION 18 | * 19 | * SERIAL LINE DRIVER 20 | * TELETYPE TERMINAL (TTY) 21 | * 22 | * Filename : serial_line_tty.h 23 | * Version : V2.00.01 24 | * Programmer(s) : FGK 25 | ********************************************************************************************************* 26 | */ 27 | 28 | /* 29 | ********************************************************************************************************* 30 | * MODULE 31 | * 32 | * Note(s) : (1) This header file is protected from multiple pre-processor inclusion through use of the 33 | * SERIAL_LINE_TTY present pre-processor macro definition. 34 | ********************************************************************************************************* 35 | */ 36 | 37 | #ifndef SERIAL_LINE_TTY_PRESENT 38 | #define SERIAL_LINE_TTY_PRESENT 39 | 40 | 41 | /* 42 | ********************************************************************************************************* 43 | * EXTERNS 44 | ********************************************************************************************************* 45 | */ 46 | 47 | #ifdef SERIAL_LINE_TTY_MODULE 48 | #define SERIAL_LINE_TTY_EXT 49 | #else 50 | #define SERIAL_LINE_TTY_EXT extern 51 | #endif 52 | 53 | 54 | /* 55 | ********************************************************************************************************* 56 | * GLOBAL VARIABLES 57 | ********************************************************************************************************* 58 | */ 59 | 60 | extern SERIAL_LINE_DRV_API SerialLine_TTY; /* TTY serial line driver. */ 61 | 62 | 63 | /* 64 | ********************************************************************************************************* 65 | * FUNCTION PROTOTYPES 66 | ********************************************************************************************************* 67 | */ 68 | 69 | /* ------------------- ECHO CONTROL ------------------- */ 70 | void SerialLine_TTY_EchoRx(SERIAL_IF_NBR if_nbr, /* Set rx echo. */ 71 | CPU_BOOLEAN echo); 72 | 73 | void SerialLine_TTY_EchoTx(SERIAL_IF_NBR if_nbr, /* Set tx echo. */ 74 | CPU_BOOLEAN echo); 75 | 76 | 77 | /* 78 | ********************************************************************************************************* 79 | * MODULE END 80 | ********************************************************************************************************* 81 | */ 82 | 83 | #endif /* End of SERIAL_LINE_TTY module include. */ 84 | -------------------------------------------------------------------------------- /OS/uC-Serial/OS/serial_os.h: -------------------------------------------------------------------------------- 1 | /* 2 | ********************************************************************************************************* 3 | * SERIAL (BYTE) COMMUNICATION 4 | * 5 | * (c) Copyright 2007-2009; Micrium, Inc.; Weston, FL 6 | * 7 | * All rights reserved. Protected by international copyright laws. 8 | * Knowledge of the source code may NOT be used to develop a similar product. 9 | * Please help us continue to provide the Embedded community with the finest 10 | * software available. Your honesty is greatly appreciated. 11 | ********************************************************************************************************* 12 | */ 13 | 14 | /* 15 | ********************************************************************************************************* 16 | * 17 | * SERIAL (BYTE) COMMUNICATION 18 | * 19 | * OPERATING SYSTEM LAYER 20 | * 21 | * Filename : serial_os.h 22 | * Version : V2.00.01 23 | * Programmer(s) : FGK 24 | ********************************************************************************************************* 25 | */ 26 | 27 | /* 28 | ********************************************************************************************************* 29 | * FUNCTION PROTOTYPES 30 | ********************************************************************************************************* 31 | */ 32 | 33 | void SerialOS_Init (SERIAL_ERR *perr); /* Initialize OS layer. */ 34 | 35 | void *SerialOS_SemCreate (CPU_INT16U cnt); /* Create semaphore. */ 36 | 37 | void SerialOS_SemDel (void *psem); /* Delete semaphore. */ 38 | 39 | CPU_BOOLEAN SerialOS_SemTryLock(void *psem); /* Try to acquire semaphore if available. */ 40 | 41 | void SerialOS_SemWait (void *psem, /* Wait for semaphore to become available. */ 42 | CPU_INT32U timeout_ms, 43 | SERIAL_ERR *perr); 44 | 45 | CPU_BOOLEAN SerialOS_SemSignal (void *psem); /* Signal semaphore. */ 46 | -------------------------------------------------------------------------------- /OS/uC-Serial/Source/serial_buf.h: -------------------------------------------------------------------------------- 1 | /* 2 | ********************************************************************************************************* 3 | * SERIAL (BYTE) COMMUNICATION 4 | * 5 | * (c) Copyright 2007-2009; Micrium, Inc.; Weston, FL 6 | * 7 | * All rights reserved. Protected by international copyright laws. 8 | * Knowledge of the source code may NOT be used to develop a similar product. 9 | * Please help us continue to provide the Embedded community with the finest 10 | * software available. Your honesty is greatly appreciated. 11 | ********************************************************************************************************* 12 | */ 13 | 14 | /* 15 | ********************************************************************************************************* 16 | * 17 | * SERIAL (BYTE) COMMUNICATION 18 | * 19 | * Filename : serial_buf.h 20 | * Version : V2.00.01 21 | * Programmer(s) : FGK 22 | ********************************************************************************************************* 23 | */ 24 | 25 | /* 26 | ********************************************************************************************************* 27 | * MODULE 28 | * 29 | * Note(s) : (1) This header file is protected from multiple pre-processor inclusion through use of the 30 | * SERIAL_BUF present pre-processor macro definition. 31 | ********************************************************************************************************* 32 | */ 33 | 34 | #ifndef SERIAL_BUF_PRESENT 35 | #define SERIAL_BUF_PRESENT 36 | 37 | 38 | /* 39 | ********************************************************************************************************* 40 | * EXTERNS 41 | ********************************************************************************************************* 42 | */ 43 | 44 | #ifdef SERIAL_BUF_MODULE 45 | #define SERIAL_BUF_EXT 46 | #else 47 | #define SERIAL_BUF_EXT extern 48 | #endif 49 | 50 | 51 | /* 52 | ********************************************************************************************************* 53 | * SERIAL BUFFER DATA TYPE 54 | ********************************************************************************************************* 55 | */ 56 | 57 | typedef struct serial_buf { 58 | CPU_SIZE_T Len; /* Buf len. */ 59 | CPU_SIZE_T EmptyCnt; /* Empty entries cnt. */ 60 | CPU_SIZE_T IxRd; /* Next rd ix. */ 61 | CPU_SIZE_T IxWr; /* Next wr ix. */ 62 | CPU_INT08U *DataPtr; /* Ptr to buf data area. */ 63 | } SERIAL_BUF; 64 | 65 | 66 | /* 67 | ********************************************************************************************************* 68 | * FUNCTION PROTOTYPES 69 | ********************************************************************************************************* 70 | */ 71 | 72 | void SerialBuf_Init (SERIAL_BUF *pbuf, /* Init buf. */ 73 | CPU_INT08U *pdata, 74 | CPU_SIZE_T len, 75 | CPU_BOOLEAN full); 76 | 77 | void SerialBuf_Clr (SERIAL_BUF *pbuf); /* Clr buf. */ 78 | 79 | CPU_SIZE_T SerialBuf_Rd (SERIAL_BUF *pbuf, /* Rd from buf. */ 80 | CPU_INT08U *psrc, 81 | CPU_SIZE_T len); 82 | 83 | CPU_BOOLEAN SerialBuf_RdOctet(SERIAL_BUF *pbuf, /* Rd octet from buf. */ 84 | CPU_INT08U *pdatum); 85 | 86 | CPU_BOOLEAN SerialBuf_WrOctet(SERIAL_BUF *pbuf, /* Wr octet to buf. */ 87 | CPU_INT08U datum); 88 | 89 | CPU_BOOLEAN SerialBuf_Cmp (SERIAL_BUF *pbuf, /* Cmp incoming octets to buf. */ 90 | CPU_INT08U datum); 91 | 92 | CPU_BOOLEAN SerialBuf_IsEmpty(SERIAL_BUF *pbuf); /* Determine whether buf is empty. */ 93 | 94 | CPU_BOOLEAN SerialBuf_IsFull (SERIAL_BUF *pbuf); /* Determine whether buf is full. */ 95 | 96 | CPU_SIZE_T SerialBuf_Size (SERIAL_BUF *pbuf); /* Retrieve buf size. */ 97 | 98 | CPU_SIZE_T SerialBuf_DataLen(SERIAL_BUF *pbuf); /* Determine buf data area len. */ 99 | 100 | 101 | /* 102 | ********************************************************************************************************* 103 | * MODULE END 104 | ********************************************************************************************************* 105 | */ 106 | 107 | #endif /* End of SERIAL_BUF module include. */ 108 | -------------------------------------------------------------------------------- /OS/uC-Serial/Source/serial_type.h: -------------------------------------------------------------------------------- 1 | /* 2 | ********************************************************************************************************* 3 | * SERIAL (BYTE) COMMUNICATION 4 | * 5 | * (c) Copyright 2007-2009; Micrium, Inc.; Weston, FL 6 | * 7 | * All rights reserved. Protected by international copyright laws. 8 | * Knowledge of the source code may NOT be used to develop a similar product. 9 | * Please help us continue to provide the Embedded community with the finest 10 | * software available. Your honesty is greatly appreciated. 11 | ********************************************************************************************************* 12 | */ 13 | 14 | /* 15 | ********************************************************************************************************* 16 | * 17 | * SERIAL (BYTE) COMMUNICATION 18 | * 19 | * Filename : serial_type.h 20 | * Version : V2.00.01 21 | * Programmer(s) : FGK 22 | ********************************************************************************************************* 23 | */ 24 | 25 | /* 26 | ********************************************************************************************************* 27 | * MODULE 28 | * 29 | * Note(s) : (1) This header file is protected from multiple pre-processor inclusion through use of the 30 | * SERIAL_TYPE present pre-processor macro definition. 31 | ********************************************************************************************************* 32 | */ 33 | 34 | #ifndef SERIAL_TYPE_PRESENT 35 | #define SERIAL_TYPE_PRESENT 36 | 37 | 38 | /* 39 | ********************************************************************************************************* 40 | * FORWARD DECLARATIONS 41 | ********************************************************************************************************* 42 | */ 43 | 44 | typedef struct serial_dev SERIAL_DEV; 45 | typedef struct serial_if_cfg SERIAL_IF_CFG; 46 | typedef const struct serial_line_drv_api SERIAL_LINE_DRV_API; 47 | 48 | 49 | /* 50 | ********************************************************************************************************* 51 | * DATA TYPES 52 | ********************************************************************************************************* 53 | */ 54 | 55 | typedef CPU_INT08U SERIAL_IF_NBR; 56 | 57 | 58 | /* 59 | ********************************************************************************************************* 60 | * MODULE END 61 | ********************************************************************************************************* 62 | */ 63 | 64 | #endif /* End of SERIAL_TYPE module include. */ 65 | -------------------------------------------------------------------------------- /OS/uCOS-III/Ports/ARM-Cortex-A/Generic/CCS/os_cpu.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Truck-OBD-Development/J1939_Decode/951a5ea86404e1da6e77c490b1ee778b8a7a3ea3/OS/uCOS-III/Ports/ARM-Cortex-A/Generic/CCS/os_cpu.h -------------------------------------------------------------------------------- /OS/uCOS-III/Ports/ARM-Cortex-A/Generic/IAR/os_cpu.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Truck-OBD-Development/J1939_Decode/951a5ea86404e1da6e77c490b1ee778b8a7a3ea3/OS/uCOS-III/Ports/ARM-Cortex-A/Generic/IAR/os_cpu.h -------------------------------------------------------------------------------- /OS/uCOS-III/Source/os_type.h: -------------------------------------------------------------------------------- 1 | /* 2 | ************************************************************************************************************************ 3 | * uC/OS-III 4 | * The Real-Time Kernel 5 | * 6 | * (c) Copyright 2009-2015; Micrium, Inc.; Weston, FL 7 | * All rights reserved. Protected by international copyright laws. 8 | * 9 | * File : OS_TYPE.H 10 | * By : JJL 11 | * Version : V3.04.05 12 | * 13 | * LICENSING TERMS: 14 | * --------------- 15 | * uC/OS-III is provided in source form for FREE short-term evaluation, for educational use or 16 | * for peaceful research. If you plan or intend to use uC/OS-III in a commercial application/ 17 | * product then, you need to contact Micrium to properly license uC/OS-III for its use in your 18 | * application/product. We provide ALL the source code for your convenience and to help you 19 | * experience uC/OS-III. The fact that the source is provided does NOT mean that you can use 20 | * it commercially without paying a licensing fee. 21 | * 22 | * Knowledge of the source code may NOT be used to develop a similar product. 23 | * 24 | * Please help us continue to provide the embedded community with the finest software available. 25 | * Your honesty is greatly appreciated. 26 | * 27 | * You can find our product's user manual, API reference, release notes and 28 | * more information at https://doc.micrium.com. 29 | * You can contact us at www.micrium.com. 30 | ************************************************************************************************************************ 31 | */ 32 | 33 | #ifndef OS_TYPE_H 34 | #define OS_TYPE_H 35 | 36 | #ifdef VSC_INCLUDE_H_FILE_NAMES 37 | const CPU_CHAR *os_type__h = "$Id: $"; 38 | #endif 39 | 40 | /* 41 | ************************************************************************************************************************ 42 | * INCLUDE HEADER FILES 43 | ************************************************************************************************************************ 44 | */ 45 | 46 | /* Description # Bits */ 47 | /* */ 48 | /* ----------------------------------------------------------- */ 49 | 50 | typedef CPU_INT16U OS_CPU_USAGE; /* CPU Usage 0..10000 <16>/32 */ 51 | 52 | typedef CPU_INT32U OS_CTR; /* Counter, 32 */ 53 | 54 | typedef CPU_INT32U OS_CTX_SW_CTR; /* Counter of context switches, 32 */ 55 | 56 | typedef CPU_INT32U OS_CYCLES; /* CPU clock cycles, <32>/64 */ 57 | 58 | typedef CPU_INT32U OS_FLAGS; /* Event flags, 8/16/<32> */ 59 | 60 | typedef CPU_INT32U OS_IDLE_CTR; /* Holds the number of times the idle task runs, <32>/64 */ 61 | 62 | typedef CPU_INT16U OS_MEM_QTY; /* Number of memory blocks, <16>/32 */ 63 | typedef CPU_INT16U OS_MEM_SIZE; /* Size in bytes of a memory block, <16>/32 */ 64 | 65 | typedef CPU_INT16U OS_MSG_QTY; /* Number of OS_MSGs in the msg pool, <16>/32 */ 66 | typedef CPU_INT16U OS_MSG_SIZE; /* Size of messages in number of bytes, <16>/32 */ 67 | 68 | typedef CPU_INT08U OS_NESTING_CTR; /* Interrupt and scheduler nesting, <8>/16/32 */ 69 | 70 | typedef CPU_INT16U OS_OBJ_QTY; /* Number of kernel objects counter, <16>/32 */ 71 | typedef CPU_INT32U OS_OBJ_TYPE; /* Special flag to determine object type, 32 */ 72 | 73 | typedef CPU_INT16U OS_OPT; /* Holds function options <16>/32 */ 74 | 75 | typedef CPU_INT08U OS_PRIO; /* Priority of a task, <8>/16/32 */ 76 | 77 | typedef CPU_INT16U OS_QTY; /* Quantity <16>/32 */ 78 | 79 | typedef CPU_INT32U OS_RATE_HZ; /* Rate in Hertz 32 */ 80 | 81 | typedef CPU_INT32U OS_REG; /* Task register 8/16/<32> */ 82 | typedef CPU_INT08U OS_REG_ID; /* Index to task register <8>/16/32 */ 83 | 84 | typedef CPU_INT32U OS_SEM_CTR; /* Semaphore value 16/<32> */ 85 | 86 | typedef CPU_INT08U OS_STATE; /* State variable <8>/16/32 */ 87 | 88 | typedef CPU_INT08U OS_STATUS; /* Status <8>/16/32 */ 89 | 90 | typedef CPU_INT32U OS_TICK; /* Clock tick counter <32>/64 */ 91 | 92 | #endif 93 | -------------------------------------------------------------------------------- /OS/uCOS-III/Source/os_var.c: -------------------------------------------------------------------------------- 1 | /* 2 | ************************************************************************************************************************ 3 | * uC/OS-III 4 | * The Real-Time Kernel 5 | * 6 | * (c) Copyright 2009-2015; Micrium, Inc.; Weston, FL 7 | * All rights reserved. Protected by international copyright laws. 8 | * 9 | * VARIABLES 10 | * 11 | * File : OS_VAR.C 12 | * By : JJL 13 | * Version : V3.04.05 14 | * 15 | * LICENSING TERMS: 16 | * --------------- 17 | * uC/OS-III is provided in source form for FREE short-term evaluation, for educational use or 18 | * for peaceful research. If you plan or intend to use uC/OS-III in a commercial application/ 19 | * product then, you need to contact Micrium to properly license uC/OS-III for its use in your 20 | * application/product. We provide ALL the source code for your convenience and to help you 21 | * experience uC/OS-III. The fact that the source is provided does NOT mean that you can use 22 | * it commercially without paying a licensing fee. 23 | * 24 | * Knowledge of the source code may NOT be used to develop a similar product. 25 | * 26 | * Please help us continue to provide the embedded community with the finest software available. 27 | * Your honesty is greatly appreciated. 28 | * 29 | * You can find our product's user manual, API reference, release notes and 30 | * more information at https://doc.micrium.com. 31 | * You can contact us at www.micrium.com. 32 | ************************************************************************************************************************ 33 | */ 34 | 35 | #define OS_GLOBALS 36 | 37 | #define MICRIUM_SOURCE 38 | #include "os.h" 39 | 40 | #ifdef VSC_INCLUDE_SOURCE_FILE_NAMES 41 | const CPU_CHAR *os_var__c = "$Id: $"; 42 | #endif 43 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # J1939_Decode --------------------------------------------------------------------------------