source: rtems/c/src/lib/libbsp/arm/tms570/include/tms570-pom.h @ 7fd5e89

4.115
Last change on this file since 7fd5e89 was 4407ee6, checked in by Premysl Houdek <kom541000@…>, on 08/20/14 at 15:24:23

BSP for TMS570LS31x Hercules Development Kit from TI (TMS570LS3137)

Included variants:

tms570ls3137_hdk_intram - place code and data into internal SRAM
tms570ls3137_hdk_sdram - place code into external SDRAM and data to SRAM
tms570ls3137_hdk - variant prepared for stand-alone RTEMS aplication

stored and running directly from flash. Not working yet.

Chip initialization code not included in BSP.
External startup generated by TI's HalCoGen? was used for
testing and debugging.

More information about TMS570 BSP can be found at

http://www.rtems.org/wiki/index.php/Tms570

Patch version 2

  • most of the formatting suggestion applied.
  • BSP converted to use clock shell
  • console driver "set attributes" tested. Baudrate change working

Patch version 3

  • more formatting changes.
  • removed leftover defines and test functions

Todo:

refactor header files (name register fields)

  • Property mode set to 100644
File size: 3.7 KB
Line 
1/**
2 * @file tms570-pom.h
3 * @ingroup tms570
4 * @brief Parameter Overlay Module (POM) header file
5 */
6
7/*
8 * Copyright (c) 2014 Pavel Pisa <pisa@cmp.felk.cvut.cz>
9 *
10 * Czech Technical University in Prague
11 * Zikova 1903/4
12 * 166 36 Praha 6
13 * Czech Republic
14 *
15 * The license and distribution terms for this file may be
16 * found in the file LICENSE in this distribution or at
17 * http://www.rtems.org/license/LICENSE.
18 */
19
20#ifndef LIBBSP_ARM_TMS570_POM_H
21#define LIBBSP_ARM_TMS570_POM_H
22
23#include <stdint.h>
24
25#ifdef __cplusplus
26extern "C" {
27#endif /* __cplusplus */
28
29#define TMS570_POM_REGIONS 32
30#define TMS570_POM_GLBCTRL_ENABLE 0x000000a0a
31
32/* Specification of memory size used for field REGSIZE of tms570_pom_region_t */
33#define TMS570_POM_REGSIZE_DISABLED 0x0
34#define TMS570_POM_REGSIZE_64B      0x1
35#define TMS570_POM_REGSIZE_128B     0x2
36#define TMS570_POM_REGSIZE_256B     0x3
37#define TMS570_POM_REGSIZE_512B     0x4
38#define TMS570_POM_REGSIZE_1KB      0x5
39#define TMS570_POM_REGSIZE_2KB      0x6
40#define TMS570_POM_REGSIZE_4KB      0x7
41#define TMS570_POM_REGSIZE_8KB      0x8
42#define TMS570_POM_REGSIZE_16KB     0x9
43#define TMS570_POM_REGSIZE_32KB     0xa
44#define TMS570_POM_REGSIZE_64KB     0xb
45#define TMS570_POM_REGSIZE_128KB    0xc
46#define TMS570_POM_REGSIZE_256KB    0xd
47
48#define TMS570_POM_REGADDRMASK    ((1<<23)-1)
49
50typedef struct tms570_pom_region_t {
51  uint32_t PROGSTART;
52  uint32_t OVLSTART;
53  uint32_t REGSIZE;
54  uint32_t res0;
55} tms570_pom_region_t;
56
57typedef struct tms570_pom_t {
58  uint32_t GLBCTRL;                    /* 000h Global Control Register */
59  uint32_t REV;                        /* 004h Revision ID */
60  uint32_t CLKCTRL;                    /* 008h Clock Gate Control Register */
61  uint32_t FLG;                        /* 00Ch Status Register */
62  uint32_t reserved1[0x1f0/4];
63  tms570_pom_region_t REG[TMS570_POM_REGIONS]; /* 200h Program Regions */
64  uint32_t reserved2[0xb00/4];
65  uint32_t ITCTRL;                     /* F00h Integration Control Register */
66  uint32_t reserved3[0x09c/4];
67  uint32_t CLAIMSET;                   /* FA0h Claim Set Register */
68  uint32_t CLAIMCLR;                   /* FA4h Claim Clear Register */
69  uint32_t reserved4[0x008/4];
70  uint32_t LOCKACCESS;                 /* FB0h Lock Access Register */
71  uint32_t LOCKSTATUS;                 /* FB4h Lock Status Register */
72  uint32_t AUTHSTATUS;                 /* FB8h Authentication Status Register */
73  uint32_t reserved5[0x00c/4];
74  uint32_t DEVID;                      /* FC8h Device ID Register */
75  uint32_t DEVTYPE;                    /* FCCh Device Type Register */
76  uint32_t PERIPHERALID4;              /* FD0h Peripheral ID 4 Register */
77  uint32_t PERIPHERALID5;              /* FD4h Peripheral ID 5 Register */
78  uint32_t PERIPHERALID6;              /* FD8h Peripheral ID 6 Register */
79  uint32_t PERIPHERALID7;              /* FDCh Peripheral ID 7 Register */
80  uint32_t PERIPHERALID0;              /* FE0h Peripheral ID 0 Register */
81  uint32_t PERIPHERALID1;              /* FE4h Peripheral ID 1 Register */
82  uint32_t PERIPHERALID2;              /* FE8h Peripheral ID 2 Register */
83  uint32_t PERIPHERALID3;              /* FECh Peripheral ID 3 Register */
84  uint32_t COMPONENTID0;               /* FF0h Component ID 0 Register */
85  uint32_t COMPONENTID1;               /* FF4h Component ID 1 Register */
86  uint32_t COMPONENTID2;               /* FF8h Component ID 2 Register */
87  uint32_t COMPONENTID3;               /* FFCh Component ID 3 Register */
88} tms570_pom_t;
89
90#define TMS570_POM (*(volatile tms570_pom_t*)0xffa04000)
91
92int mem_dump(void *buf, unsigned long start, unsigned long len, int blen);
93void tms570_pom_remap(void);
94
95/** @} */
96
97#ifdef __cplusplus
98}
99#endif /* __cplusplus */
100
101#endif /* LIBBSP_ARM_TMS570_POM_H */
Note: See TracBrowser for help on using the repository browser.