This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CSL Libraries and Bitwise C code

My name is Jeff Moran and I'm a sophmore at WPI here in freezing boston. I been successful in putting the LED demo in CCS 5.5 and currently I have been analying the code to see how it interfaces with the ezdsp5535 usb stick.  I have gotten pretty far in understand most of the c code but when it comes to the csl libraries I'm having a problem understanding the code.  I have provided and example and I be very appreciated if one of the engineers could tell me where to look to interpret the code if there is some manual it would be great.  HERE IS THE CODE:

/* the Field INSert (Token) macro */

#define CSL_FINST(reg, PER_REG_FIELD, TOKEN)             

\

    CSL_FINS((reg), PER_REG_FIELD, CSL_##PER_REG_FIELD##_##TOKEN)

/* the Field EXTract (Raw) macro */

#define CSL_FEXTR(reg, msb, lsb)  

\

    (((reg) >> (lsb)) & ((1 << ((msb) - (lsb) + 1)) - 1))

IF anyone can shed some light on this code I be appreciated.  Thanks in advance  BTW most of this code can be found in the clr.h header

 

JEFF

  • The ## operator is the C standard token-pasting operator.  When a call to macro CSL_FINST is preprocessed, it will result in something that looks like this (assuming no further macros).  This is usually because CSL_b_c is defined as a macro elsewhere.

       CSL_FINST(a,b,c) /* before */
       CSL_FINS((a), b, CSL_b_c) /* after */

    The macro CSL_FEXTR is doing just what it says; it's extracting a field (a run of bits) from an expression by first shifting away the unused LSB, and than masking with a mask of all-ones computed on the spot.

    Does that clear it up?

  • thanks Archaeologist,

    I think I understand the syntax that you provided including the difference between a raw macro and a token macro

    but in the code that i provided the resultant macro has another macro that it uses as i understand it I tried to find the resultant macro in the program code but I could not  here is an example of the code in the program

    Int16 EZDSP5535_GPIO_init()

    {

        CSL_Status           status;

        hGpio = GPIO_open(&GpioObj, &status);

      /* Set Bus for GPIOs */

        CSL_FINST(CSL_SYSCTRL_REGS->EBSR, SYS_EBSR_PPMODE, MODE6);

       return 0;

    }

    IN this macro csl_syscrtl_regs-> ebsr is an address of what i dont know, sys_ebsr_ppmode is a var as is mode6

    the resultant macro is  csl_fins((address), sys_ebsr_ppmode, csl_sys_ebsr_ppmode_mode6 )   IS the csl resultant macro a chip support library on the dsp 5535 or am i just wrong  if you could shed some light on the above code it will help me understand the bear bones of the led demo program.  thanks in advance.

    JEFF

  • There isn't really a difference between what you're calling "raw" macro and "token" macro.  The C preprocessor keeps re-evaluating tokens until none of them are macros.

    You should run the C preprocessor only (-ppo option) to generate a pre-processed file.  This will show the final C code after all C preprocessing has been done.  I suspect you will find that CSL_FINS is also a macro, and has expanded to some CSL function call.  It's also possible that it has expanded to a direct memory assignment to a memory-mapped control register of some sort.

    The CSL Reference Guide should explain all of these functions.  Did you get a copy with the eZdsp?

    I'm sorry, I don't know much about CSL, and I don't know much about C55x peripheral devices.  You might try http://processors.wiki.ti.com/index.php/C5000_Chip_Support_Library

  • Archaeologist,

    Thank you for the clarifiction about the macro and showing me the wiki article I will definetly dive into the article to learn more about csl libraries.    I look in the proproties of the CCS 5.5 code composer in the preprocessor section and there is no place for the -ppo option.   Do you know where I could put this option in CCs 5.5 and what will the output file be named .

     

    Best Regards,

     

    Jeff

  • The option is also known as "--preproc_only," so look for that.  I don't have a copy of CCS 5.5 handy.  In CCS 5.4, it's under "Advanced Options" > "Parser Preprocessing Options".  If your source file were named main.c, the output file would be main.pp

  • 
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
    
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
    
    
     
    
    
     
     
     
    
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
    
    
    
    typedef char *va_list;
    
    
    
    
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
    
    
    
    
    
     
     
     
    
    
    
     
     
     
    typedef unsigned size_t;
    
    typedef struct {
          int fd;                     
          unsigned char* buf;         
          unsigned char* pos;         
          unsigned char* bufend;      
          unsigned char* buff_stop;   
          unsigned int   flags;       
    } FILE;
    
    typedef long fpos_t;
    
     
     
     
     
     
     
    
    
    
     
     
     
    
    
    
    
    
    
    
    
     
    
    
     
     
     
    
    extern  FILE _ftable[10];
    extern  char _tmpnams[10][16];
    
     
     
     
     
     
     
    extern  int     remove(const char *_file);
    extern  int     rename(const char *_old, const char *_new);
    extern  FILE   *tmpfile(void);
    extern  char   *tmpnam(char *_s);
    
     
     
     
    extern  int     fclose(FILE *_fp); 
    extern  FILE   *fopen(const char *_fname, const char *_mode);
    extern  FILE   *freopen(const char *_fname, const char *_mode,
    			            register FILE *_fp);
    extern  void    setbuf(register FILE *_fp, char *_buf);
    extern  int     setvbuf(register FILE *_fp, register char *_buf, 
    			            register int _type, register size_t _size);
    extern  int     fflush(register FILE *_fp); 
    
     
     
     
    extern  int fprintf(FILE *_fp, const char *_format, ...)
                   ;
    extern  int fscanf(FILE *_fp, const char *_fmt, ...)
                   ;
    extern  int printf(const char *_format, ...)
                   ;
    extern  int scanf(const char *_fmt, ...)
                   ;
    extern  int sprintf(char *_string, const char *_format, ...)
                   ;
    extern  int snprintf(char *_string, size_t _n, 
    				 const char *_format, ...)
                   ;
    extern  int sscanf(const char *_str, const char *_fmt, ...)
                   ;
    extern  int vfprintf(FILE *_fp, const char *_format, va_list _ap)
                   ;
    extern  int vprintf(const char *_format, va_list _ap)
                   ;
    extern  int vsprintf(char *_string, const char *_format,
    				 va_list _ap)
                   ;
    extern  int vsnprintf(char *_string, size_t _n, 
    				  const char *_format, va_list _ap)
                   ;
    
     
     
     
    extern  int     fgetc(register FILE *_fp);
    extern  char   *fgets(char *_ptr, register int _size,
    				  register FILE *_fp);
    extern  int     fputc(int _c, register FILE *_fp);
    extern  int     fputs(const char *_ptr, register FILE *_fp);
    extern  int     getc(FILE *_p);
    extern  int     getchar(void);
    extern  char   *gets(char *_ptr); 
    extern  int     putc(int _x, FILE *_fp);
    extern  int     putchar(int _x);
    extern  int     puts(const char *_ptr); 
    extern  int     ungetc(int _c, register FILE *_fp);
    
     
     
     
    extern  size_t  fread(void *_ptr, size_t _size, size_t _count,
    				  FILE *_fp);
    extern  size_t  fwrite(const void *_ptr, size_t _size,
    				   size_t _count, register FILE *_fp); 
    
     
     
     
    extern  int     fgetpos(FILE *_fp, fpos_t *_pos);
    extern  int     fseek(register FILE *_fp, long _offset,
    				  int _ptrname);
    extern  int     fsetpos(FILE *_fp, const fpos_t *_pos);
    extern  long    ftell(FILE *_fp);
    extern  void    rewind(register FILE *_fp); 
    
     
     
     
    extern  void    clearerr(FILE *_fp);
    extern  int     feof(FILE *_fp);
    extern  int     ferror(FILE *_fp);
    extern  void    perror(const char *_s);
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
     
    
     
    
    
    
    
    
    
     
    
    
    
    typedef int		Bool;
    
    
    typedef int             Int;
    typedef unsigned int    Uns;     
    typedef char            Char;
    typedef char *          String;
    typedef void *          Ptr;
    
    typedef unsigned long	Uint32;
    typedef unsigned short	Uint16;
    typedef unsigned char	Uint8;
    
      
    typedef long		Int32;
    typedef short		Int16;
    typedef char		Int8;
    
    
    
    
    
    
    
    
    
    
     
    
    
    
    
    
    
     
    
    
    
    
    
    
    
    
    
    
     
    
    
    
    
    
    
     
    
     
    
     
    
    
     
    
     
    
     
    
     
    
    
     
    
     
    
     
    
    
     
    
     
    
     
    
     
    
     
    
    
    
    
    
    
    
    
    
    
     
    
    
    
    
    
    
    
    
     
    
    
    
    
    
    
    
    
    
    
    
     
    
    
    
    
    
    
    
    
     
    
    
    
    
    
    
    
    
     
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
     
    
     
    
    
    
    
    
     
    
    
    
     
    
    
    
    
    
     
    
    
     
    
    
     
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
     
    
    
     
    
    
    
    
     
    
    
    
     
    
    
    
    
     
    
    
    
     
    
    
    
    
    
    
    
     
    
    
    
    
     
    
    
     
    
    
    
    
    
    
    
     
    
    
     
    
    
    typedef struct  {
        volatile Uint16 EBSR;
        volatile Uint16 RSVD0;
        volatile Uint16 PCGCR1;
        volatile Uint16 PCGCR2;
        volatile Uint16 PSRCR;
        volatile Uint16 PRCR;
        volatile Uint16 RSVD1[14];
        volatile Uint16 TIAFR;
        volatile Uint16 RSVD2;
        volatile Uint16 ODSCR;
        volatile Uint16 PDINHIBR1;
        volatile Uint16 PDINHIBR2;
        volatile Uint16 PDINHIBR3;
        volatile Uint16 DMA0CESR1;
        volatile Uint16 DMA0CESR2;
        volatile Uint16 DMA1CESR1;
        volatile Uint16 DMA1CESR2;
        volatile Uint16 SDRAMCCR;
        volatile Uint16 CCR2;
        volatile Uint16 CGCR1;
        volatile Uint16 CGICR;
        volatile Uint16 CGCR2;
        volatile Uint16 CGOCR;
        volatile Uint16 CCSSR;
        volatile Uint16 RSVD3;
        volatile Uint16 ECDR;
        volatile Uint16 RSVD4;
        volatile Uint16 RAMSLPMDCNTLR1;
        volatile Uint16 RSVD5;
        volatile Uint16 RAMSLPMDCNTLR2;
        volatile Uint16 RAMSLPMDCNTLR3;
        volatile Uint16 RAMSLPMDCNTLR4;
        volatile Uint16 RAMSLPMDCNTLR5;
        volatile Uint16 RSVD6[2];
        volatile Uint16 DMAIFR;
        volatile Uint16 DMAIER;
        volatile Uint16 USBSCR;
        volatile Uint16 ESCR;
        volatile Uint16 RSVD7[2];
        volatile Uint16 DMA2CESR1;
        volatile Uint16 DMA2CESR2;
        volatile Uint16 DMA3CESR1;
        volatile Uint16 DMA3CESR2;
        volatile Uint16 CLKSTOP;
        volatile Uint16 RSVD8[5];
        volatile Uint16 DIEIDR0;
        volatile Uint16 DIEIDR1;
        volatile Uint16 DIEIDR2;
        volatile Uint16 DIEIDR3;
        volatile Uint16 DIEIDR4;
        volatile Uint16 DIEIDR5;
        volatile Uint16 DIEIDR6;
        volatile Uint16 DIEIDR7;
    } CSL_SysRegs;
    
    
    
     
    
     
    
    
     
    
     
    
     
    
    
     
    
     
    
     
    
     
    
     
    
     
    
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
    
     
    
     
    
     
    
     
    
     
    
    
     
    
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
    
     
    
    
    
     
    
    
     
    
    
     
    
     
    
     
    
    
     
    
    
     
    
     
    
    
     
    
    
     
    
     
    
     
    
    
     
    
    
     
    
    
     
    
    
     
    
    
     
    
     
    
     
    
     
    
     
    
     
    
    
     
    
     
    
     
    
     
    
     
    
     
    
    
    
    
    
     
    
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
    
     
    
     
    
     
    
     
    
     
    
     
    
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
    
    
     
    
    
    
    
    
    
     
    
    
    
    
    
    
     
    
    
    
    
    
    
     
    
    
    
    
    
    
    
     
    
    
     
    
    
    
     
    
    
     
    
     
    
     
    
    
     
    
    
     
    
     
    
    
     
    
     
    
    
    
    
    
    
    
     
    
    
     
    
    
    
    
    
     
    
    
    
    
    
    
     
    
    
     
    
    
    
    
    
    
    
     
    
    
     
    
    
     
    
    
     
    
    
    
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
    
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
    
     
    
     
    
     
    
     
    
     
    
    
     
    
    
     
    
     
    
     
    
    
     
    
    
     
    
    
     
    
    
    
    
    
    
     
    
    
    
    
    
    
     
    
    
    
    
    
    
     
    
    
    
    
    
    
     
    
    
     
    
     
    
     
    
     
    
     
    
     
    
    
     
    
    
    
     
    
    
    
    
     
    
    
    
     
    
    
    
     
    
    
    
    
    
    
     
    
    
    
     
    
    
    
     
    
    
    
    
    
    
    
    
    
    
    
    
    
     
    
    
    
    
     
    
    
     
    typedef struct  {
        volatile Uint16 IER0;
        volatile Uint16 IFR0;
        volatile Uint16 ST0_55;
        volatile Uint16 ST1_55;
        volatile Uint16 ST3_55;
        volatile Uint16 RSVD0[64];
        volatile Uint16 IER1;
        volatile Uint16 IFR1;
        volatile Uint16 RSVD1[2];
        volatile Uint16 IVPD;
        volatile Uint16 IVPH;
        volatile Uint16 ST2_55;
    } CSL_CpuRegs;
    
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
    
    
     
    
     
    
     
    
     
    
     
    
     
    
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
    
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
    
    
     
    
     
    
     
    
     
    
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
    
    
     
    
    
    
    
    
    
     
    
     
    
     
    
    
    
     
    
     
    
     
    
    
     
    
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
    
     
    
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
    
     
    
    
    
     
    
    
    
     
    
     
    
    
     
    
     
    
     
    
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
    
    
    
     
    
    
    
    
    
    
    
    
    
     
    
    
    
    
     
    
    
     
    typedef struct  {
        volatile Uint16 ICOAR;
        volatile Uint16 RSVD0[3];
        volatile Uint16 ICIMR;
        volatile Uint16 RSVD1[3];
        volatile Uint16 ICSTR;
        volatile Uint16 RSVD2[3];
        volatile Uint16 ICCLKL;
        volatile Uint16 RSVD3[3];
        volatile Uint16 ICCLKH;
        volatile Uint16 RSVD4[3];
        volatile Uint16 ICCNT;
        volatile Uint16 RSVD5[3];
        volatile Uint16 ICDRR;
        volatile Uint16 RSVD6[3];
        volatile Uint16 ICSAR;
        volatile Uint16 RSVD7[3];
        volatile Uint16 ICDXR;
        volatile Uint16 RSVD8[3];
        volatile Uint16 ICMDR;
        volatile Uint16 RSVD9[3];
        volatile Uint16 ICIVR;
        volatile Uint16 RSVD10[3];
        volatile Uint16 ICEMDR;
        volatile Uint16 RSVD11[3];
        volatile Uint16 ICPSC;
        volatile Uint16 RSVD12[3];
        volatile Uint16 ICPID1;
        volatile Uint16 RSVD13[3];
        volatile Uint16 ICPID2;
    } CSL_I2cRegs;
    
    
     
    
     
    
    
    
    
     
    
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
    
     
    
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
    
     
    
     
    
     
    
     
    
     
    
     
    
    
     
    
    
    
     
    
    
    
     
    
    
    
     
    
    
    
    
     
    
    
    
    
     
    
    
    
    
     
    
     
    
     
    
     
    
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
    
     
    
    
     
    
    
     
    
    
     
    
     
    
    
     
    
    
    
    
     
    
    
    
    
     
    
    
    
    
    
    
    
    
    
    
    
    
     
    
    
    
    
     
    
    
     
    typedef struct  {
        volatile Uint16 I2SSCTRL;
        volatile Uint16 RSVD0[3];
        volatile Uint16 I2SSRATE;
        volatile Uint16 RSVD1[3];
        volatile Uint16 I2STXLT0;
        volatile Uint16 I2STXLT1;
        volatile Uint16 RSVD2[2];
        volatile Uint16 I2STXRT0;
        volatile Uint16 I2STXRT1;
        volatile Uint16 RSVD3[2];
        volatile Uint16 I2SINTFL;
        volatile Uint16 RSVD4[3];
        volatile Uint16 I2SINTMASK;
        volatile Uint16 RSVD5[19];
        volatile Uint16 I2SRXLT0;
        volatile Uint16 I2SRXLT1;
        volatile Uint16 RSVD6[2];
        volatile Uint16 I2SRXRT0;
        volatile Uint16 I2SRXRT1;
    } CSL_I2sRegs;
    
    
     
    
     
    
     
    
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
    
     
    
     
    
    
     
    
    
     
    
     
    
    
     
    
    
    
     
    
    
    
     
    
    
    
     
    
    
    
     
    
    
     
    
     
    
     
    
     
    
     
    
     
    
    
     
    
    
     
    
     
    
     
    
     
    
     
    
     
    
    
     
    
    
    
     
    
    
    
     
    
    
    
     
    
    
    
    
    
    
    
    
    
    
    
     
    
    
    
    
     
    
    
     
    typedef struct  {
        volatile Uint16 REV;
        volatile Uint16 STATUS;
        volatile Uint16 RSVD0[2];
        volatile Uint16 AWCCR1;
        volatile Uint16 AWCCR2;
        volatile Uint16 RSVD1[2];
        volatile Uint16 SDCR1;
        volatile Uint16 SDCR2;
        volatile Uint16 RSVD2[2];
        volatile Uint16 SDRCR;
        volatile Uint16 RSVD3[3];
        volatile Uint16 ACS2CR1;
        volatile Uint16 ACS2CR2;
        volatile Uint16 RSVD4[2];
        volatile Uint16 ACS3CR1;
        volatile Uint16 ACS3CR2;
        volatile Uint16 RSVD5[2];
        volatile Uint16 ACS4CR1;
        volatile Uint16 ACS4CR2;
        volatile Uint16 RSVD6[2];
        volatile Uint16 ACS5CR1;
        volatile Uint16 ACS5CR2;
        volatile Uint16 RSVD7[2];
        volatile Uint16 SDTIMR1;
        volatile Uint16 RSVD8[27];
        volatile Uint16 SDSRETR;
        volatile Uint16 RSVD9[3];
        volatile Uint16 EIRR;
        volatile Uint16 RSVD10[3];
        volatile Uint16 EIMR;
        volatile Uint16 RSVD11[3];
        volatile Uint16 EIMSR;
        volatile Uint16 RSVD12[3];
        volatile Uint16 EIMCR;
        volatile Uint16 RSVD13[19];
        volatile Uint16 NANDFCR;
        volatile Uint16 RSVD14[3];
        volatile Uint16 NANDFSR1;
        volatile Uint16 NANDFSR2;
        volatile Uint16 RSVD15[2];
        volatile Uint16 PAGEMODCTRL1;
        volatile Uint16 PAGEMODCTRL2;
        volatile Uint16 RSVD16[6];
        volatile Uint16 NCS2ECC1;
        volatile Uint16 NCS2ECC2;
        volatile Uint16 RSVD17[2];
        volatile Uint16 NCS3ECC1;
        volatile Uint16 NCS3ECC2;
        volatile Uint16 RSVD18[2];
        volatile Uint16 NCS4ECC1;
        volatile Uint16 NCS4ECC2;
        volatile Uint16 RSVD19[2];
        volatile Uint16 NCS5ECC1;
        volatile Uint16 NCS5ECC2;
        volatile Uint16 RSVD20[62];
        volatile Uint16 NAND4BITECCLOAD;
        volatile Uint16 RSVD21[3];
        volatile Uint16 NAND4BITECC1;
        volatile Uint16 NAND4BITECC2;
        volatile Uint16 RSVD22[2];
        volatile Uint16 NAND4BITECC3;
        volatile Uint16 NAND4BITECC4;
        volatile Uint16 RSVD23[2];
        volatile Uint16 NAND4BITECC5;
        volatile Uint16 NAND4BITECC6;
        volatile Uint16 RSVD24[2];
        volatile Uint16 NAND4BITECC7;
        volatile Uint16 NAND4BITECC8;
        volatile Uint16 RSVD25[2];
        volatile Uint16 NANDERRADD1;
        volatile Uint16 NANDERRADD2;
        volatile Uint16 RSVD26[2];
        volatile Uint16 NANDERRADD3;
        volatile Uint16 NANDERRADD4;
        volatile Uint16 RSVD27[2];
        volatile Uint16 NANDERRVAL1;
        volatile Uint16 NANDERRVAL2;
        volatile Uint16 RSVD28[2];
        volatile Uint16 NANDERRVAL3;
        volatile Uint16 NANDERRVAL4;
    } CSL_EmifRegs;
    
    
     
    
     
    
    
    
    
     
    
    
     
    
    
     
    
    
    
    
    
     
    
    
    
    
     
    
     
    
     
    
     
    
     
    
    
     
    
     
    
     
    
     
    
    
     
    
    
    
    
     
    
     
    
    
     
    
     
    
     
    
    
     
    
     
    
     
    
     
    
    
     
    
     
    
    
     
    
     
    
    
     
    
    
    
    
     
    
    
    
    
    
     
    
    
     
    
     
    
     
    
    
    
    
    
    
     
    
    
    
    
    
     
    
    
     
    
     
    
     
    
    
    
    
    
    
     
    
    
    
    
    
     
    
    
     
    
     
    
     
    
    
    
    
    
    
     
    
    
    
    
    
     
    
    
     
    
     
    
     
    
    
    
    
    
    
     
    
    
    
    
    
    
    
     
    
    
    
    
     
    
    
    
    
    
    
     
    
    
    
    
    
    
     
    
    
    
    
    
    
     
    
    
    
    
    
    
     
    
    
    
    
    
    
    
    
    
     
    
     
    
     
    
     
    
     
    
    
     
    
    
     
    
    
    
    
     
    
    
     
    
    
     
    
    
     
    
     
    
    
     
    
     
    
    
     
    
    
     
    
     
    
    
     
    
     
    
    
     
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
     
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
     
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
     
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
     
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
     
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
     
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
     
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
     
    
    
    
    
     
    
    
    
    
     
    
    
    
    
     
    
    
    
    
     
    
    
    
    
     
    
    
    
    
     
    
    
    
    
     
    
    
    
    
     
    
    
    
    
     
    
    
    
    
     
    
    
    
    
     
    
    
    
    
     
    
    
    
    
     
    
    
    
    
     
    
    
    
    
     
    
    
    
    
     
    
    
    
    
    
    
    
    
    
    
    
    
     
    
    
    
    
     
    
    
     
    typedef struct  {
        volatile Uint16 THR;
        volatile Uint16 RSVD0;
        volatile Uint16 IER;
        volatile Uint16 RSVD1;
        volatile Uint16 FCR;
        volatile Uint16 RSVD2;
        volatile Uint16 LCR;
        volatile Uint16 RSVD3;
        volatile Uint16 MCR;
        volatile Uint16 RSVD4;
        volatile Uint16 LSR;
        volatile Uint16 RSVD5[3];
        volatile Uint16 SCR;
        volatile Uint16 RSVD6;
        volatile Uint16 DLL;
        volatile Uint16 RSVD7;
        volatile Uint16 DLH;
        volatile Uint16 RSVD8[5];
        volatile Uint16 PWREMU_MGMT;
    } CSL_UartRegs;
    
    
     
    
     
    
    
    
    
     
    
    
    
    
     
    
    
    
     
    
     
    
     
    
    
     
    
    
     
    
    
     
    
     
    
     
    
     
    
    
     
    
    
     
    
    
     
    
     
    
    
     
    
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
    
     
    
    
     
    
     
    
    
     
    
    
    
     
    
    
    
    
    
    
    
    
    
    
    
     
    
    
    
    
     
    
    
    
    
     
    
    
    
    
     
    
    
     
    
     
    
    
     
    
    
    
    
    
    
    
    
    
    
     
    
    
    
    
     
    
    
     
    typedef struct  {
        volatile Uint16 SPICDR;
        volatile Uint16 SPICCR;
        volatile Uint16 SPIDCR1;
        volatile Uint16 SPIDCR2;
        volatile Uint16 SPICMD1;
        volatile Uint16 SPICMD2;
        volatile Uint16 SPISTAT1;
        volatile Uint16 SPISTAT2;
        volatile Uint16 SPIDR1;
        volatile Uint16 SPIDR2;
    } CSL_SpiRegs;
    
    
     
    
     
    
    
    
     
    
     
    
     
    
    
    
     
    
    
     
    
     
    
     
    
     
    
    
     
    
     
    
     
    
     
    
    
     
    
     
    
    
     
    
     
    
     
    
     
    
    
     
    
     
    
     
    
     
    
    
     
    
     
    
     
    
    
    
    
     
    
    
     
    
    
    
    
     
    
    
     
    
    
     
    
     
    
     
    
    
     
    
    
    
    
     
    
    
    
     
    
    
    
    
    
    
    
    
    
     
    
    
    
    
    
    
     
    
    
    
    
    
    
    
    
     
    
     
    
    
     
    typedef struct  {
        volatile Uint16 MMCCTL;
        volatile Uint16 RSVD0[3];
        volatile Uint16 MMCCLK;
        volatile Uint16 RSVD1[3];
        volatile Uint16 MMCST0;
        volatile Uint16 RSVD2[3];
        volatile Uint16 MMCST1;
        volatile Uint16 RSVD3[3];
        volatile Uint16 MMCIM;
        volatile Uint16 RSVD4[3];
        volatile Uint16 MMCTOR;
        volatile Uint16 RSVD5[3];
        volatile Uint16 MMCTOD;
        volatile Uint16 RSVD6[3];
        volatile Uint16 MMCBLEN;
        volatile Uint16 RSVD7[3];
        volatile Uint16 MMCNBLK;
        volatile Uint16 RSVD8[3];
        volatile Uint16 MMCNBLC;
        volatile Uint16 RSVD9[3];
        volatile Uint16 MMCDRR1;
        volatile Uint16 MMCDRR2;
        volatile Uint16 RSVD10[2];
        volatile Uint16 MMCDXR1;
        volatile Uint16 MMCDXR2;
        volatile Uint16 RSVD11[2];
        volatile Uint16 MMCCMD1;
        volatile Uint16 MMCCMD2;
        volatile Uint16 RSVD12[2];
        volatile Uint16 MMCARG1;
        volatile Uint16 MMCARG2;
        volatile Uint16 RSVD13[2];
        volatile Uint16 MMCRSP0;
        volatile Uint16 MMCRSP1;
        volatile Uint16 RSVD14[2];
        volatile Uint16 MMCRSP2;
        volatile Uint16 MMCRSP3;
        volatile Uint16 RSVD15[2];
        volatile Uint16 MMCRSP4;
        volatile Uint16 MMCRSP5;
        volatile Uint16 RSVD16[2];
        volatile Uint16 MMCRSP6;
        volatile Uint16 MMCRSP7;
        volatile Uint16 RSVD17[2];
        volatile Uint16 MMCDRSP;
        volatile Uint16 RSVD18[7];
        volatile Uint16 MMCCIDX;
        volatile Uint16 RSVD19[19];
        volatile Uint16 SDIOCTL;
        volatile Uint16 RSVD20[3];
        volatile Uint16 SDIOST0;
        volatile Uint16 RSVD21[3];
        volatile Uint16 SDIOIEN;
        volatile Uint16 RSVD22[3];
        volatile Uint16 SDIOIST;
        volatile Uint16 RSVD23[3];
        volatile Uint16 MMCFIFOCTL;
    } CSL_MmcsdRegs;
    
    
     
    
     
    
    
     
    
     
    
    
     
    
    
     
    
     
    
     
    
    
     
    
    
     
    
    
    
     
    
    
     
    
     
    
     
    
     
    
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
    
     
    
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
    
     
    
    
     
    
     
    
     
    
     
    
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
    
     
    
    
    
    
     
    
    
    
     
    
    
    
    
     
    
    
    
     
    
    
    
     
    
    
    
     
    
    
    
     
    
    
    
     
    
    
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
    
    
    
     
    
    
     
    
    
     
    
    
    
     
    
    
    
     
    
    
    
     
    
    
    
     
    
    
    
     
    
    
    
     
    
    
    
     
    
    
    
     
    
    
    
     
    
    
    
     
    
    
    
    
     
    
    
    
    
    
    
     
    
    
     
    
     
    
    
     
    
    
     
    
     
    
     
    
    
     
    
    
     
    
     
    
    
     
    
    
     
    
     
    
    
     
    
    
     
    
     
    
     
    
     
    
    
    
    
    
    
    
    
    
    
     
    
    
    
    
     
    
    
     
    typedef struct  {
        volatile Uint16 LCDREVMIN;
        volatile Uint16 LCDREVMAJ;
        volatile Uint16 RSVD0[2];
        volatile Uint16 LCDCR;
        volatile Uint16 RSVD1[3];
        volatile Uint16 LCDSR;
        volatile Uint16 RSVD2[3];
        volatile Uint16 LCDLIDDCR;
        volatile Uint16 RSVD3[3];
        volatile Uint16 LCDLIDDCS0CONFIG0;
        volatile Uint16 LCDLIDDCS0CONFIG1;
        volatile Uint16 RSVD4[2];
        volatile Uint16 LCDLIDDCS0ADDR;
        volatile Uint16 RSVD5[3];
        volatile Uint16 LCDLIDDCS0DATA;
        volatile Uint16 RSVD6[3];
        volatile Uint16 LCDLIDDCS1CONFIG0;
        volatile Uint16 LCDLIDDCS1CONFIG1;
        volatile Uint16 RSVD7[2];
        volatile Uint16 LCDLIDDCS1ADDR;
        volatile Uint16 RSVD8[3];
        volatile Uint16 LCDLIDDCS1DATA;
        volatile Uint16 RSVD9[27];
        volatile Uint16 LCDDMACR;
        volatile Uint16 RSVD10[3];
        volatile Uint16 LCDDMAFB0BAR0;
        volatile Uint16 LCDDMAFB0BAR1;
        volatile Uint16 RSVD11[2];
        volatile Uint16 LCDDMAFB0CAR0;
        volatile Uint16 LCDDMAFB0CAR1;
        volatile Uint16 RSVD12[2];
        volatile Uint16 LCDDMAFB1BAR0;
        volatile Uint16 LCDDMAFB1BAR1;
        volatile Uint16 RSVD13[2];
        volatile Uint16 LCDDMAFB1CAR0;
        volatile Uint16 LCDDMAFB1CAR1;
    } CSL_LcdcRegs;
    
    
     
    
     
    
    
    
     
    
    
    
     
    
    
    
     
    
    
     
    
    
     
    
     
    
    
     
    
     
    
    
     
    
     
    
    
     
    
    
     
    
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
    
     
    
    
    
    
    
    
     
    
    
    
    
    
    
     
    
    
    
     
    
    
    
     
    
    
    
    
    
    
     
    
    
    
    
    
    
     
    
    
    
     
    
    
    
     
    
    
     
    
    
     
    
     
    
     
    
    
     
    
    
    
     
    
    
    
     
    
    
    
     
    
    
    
     
    
    
    
     
    
    
    
     
    
    
    
     
    
    
    
    
    
    
    
    
    
    
    
     
    
    
    
    
     
    
    
     
    typedef struct  {
        volatile Uint16 RTCINTEN;
        volatile Uint16 RTCUPDATE;
        volatile Uint16 RSVD0[2];
        volatile Uint16 RTCMIL;
        volatile Uint16 RTCMILA;
        volatile Uint16 RSVD1[2];
        volatile Uint16 RTCSEC;
        volatile Uint16 RTCSECA;
        volatile Uint16 RSVD2[2];
        volatile Uint16 RTCMIN;
        volatile Uint16 RTCMINA;
        volatile Uint16 RSVD3[2];
        volatile Uint16 RTCHOUR;
        volatile Uint16 RTCHOURA;
        volatile Uint16 RSVD4[2];
        volatile Uint16 RTCDAY;
        volatile Uint16 RTCDAYA;
        volatile Uint16 RSVD5[2];
        volatile Uint16 RTCMONTH;
        volatile Uint16 RTCMONTHA;
        volatile Uint16 RSVD6[2];
        volatile Uint16 RTCYEAR;
        volatile Uint16 RTCYEARA;
        volatile Uint16 RSVD7[2];
        volatile Uint16 RTCINTFL;
        volatile Uint16 RTCNOPWR;
        volatile Uint16 RSVD8[2];
        volatile Uint16 RTCINTREG;
        volatile Uint16 RSVD9[3];
        volatile Uint16 RTCDRIFT;
        volatile Uint16 RSVD10[3];
        volatile Uint16 RTCOSC;
        volatile Uint16 RSVD11[3];
        volatile Uint16 RTCPMGT;
        volatile Uint16 RSVD12[47];
        volatile Uint16 RTCSCR1;
        volatile Uint16 RTCSCR2;
        volatile Uint16 RSVD13[2];
        volatile Uint16 RTCSCR3;
        volatile Uint16 RTCSCR4;
    } CSL_RtcRegs;
    
    
     
    
     
    
    
     
    
    
     
    
     
    
     
    
    
    
     
    
    
     
    
    
    
    
    
     
    
    
     
    
    
    
    
    
     
    
    
    
    
    
     
    
    
    
    
    
     
    
    
    
    
    
     
    
    
    
    
    
     
    
    
    
    
    
     
    
    
    
    
    
     
    
    
    
    
    
     
    
    
    
    
    
     
    
    
    
    
    
     
    
    
    
    
    
     
    
    
    
    
    
     
    
    
    
    
    
     
    
     
    
    
     
    
     
    
     
    
     
    
     
    
     
    
    
     
    
    
     
    
    
     
    
     
    
    
     
    
     
    
     
    
     
    
     
    
     
    
    
     
    
     
    
    
     
    
    
    
    
    
     
    
     
    
    
    
     
    
    
     
    
     
    
     
    
     
    
     
    
    
     
    
    
    
     
    
    
    
     
    
    
    
     
    
    
    
    
    
    
    
    
    
    
    
    
     
    
    
    
    
     
    
    
     
    typedef struct  {
        volatile Uint16 DMACH0SSAL;
        volatile Uint16 DMACH0SSAU;
        volatile Uint16 DMACH0DSAL;
        volatile Uint16 DMACH0DSAU;
        volatile Uint16 DMACH0TCR1;
        volatile Uint16 DMACH0TCR2;
        volatile Uint16 RSVD0[26];
        volatile Uint16 DMACH1SSAL;
        volatile Uint16 DMACH1SSAU;
        volatile Uint16 DMACH1DSAL;
        volatile Uint16 DMACH1DSAU;
        volatile Uint16 DMACH1TCR1;
        volatile Uint16 DMACH1TCR2;
        volatile Uint16 RSVD1[26];
        volatile Uint16 DMACH2SSAL;
        volatile Uint16 DMACH2SSAU;
        volatile Uint16 DMACH2DSAL;
        volatile Uint16 DMACH2DSAU;
        volatile Uint16 DMACH2TCR1;
        volatile Uint16 DMACH2TCR2;
        volatile Uint16 RSVD2[26];
        volatile Uint16 DMACH3SSAL;
        volatile Uint16 DMACH3SSAU;
        volatile Uint16 DMACH3DSAL;
        volatile Uint16 DMACH3DSAU;
        volatile Uint16 DMACH3TCR1;
        volatile Uint16 DMACH3TCR2;
    } CSL_DmaRegs;
    
    
     
    
     
    
    
    
     
    
    
    
     
    
    
    
     
    
    
    
     
    
    
    
     
    
     
    
     
    
     
    
     
    
    
     
    
     
    
    
     
    
    
    
    
    
    
     
    
    
    
     
    
    
    
     
    
    
    
     
    
    
    
     
    
    
    
     
    
     
    
     
    
     
    
     
    
    
     
    
     
    
     
    
     
    
    
    
    
    
    
     
    
    
    
     
    
    
    
     
    
    
    
     
    
    
    
     
    
    
    
     
    
     
    
     
    
     
    
     
    
    
     
    
     
    
     
    
     
    
    
    
    
    
    
     
    
    
    
     
    
    
    
     
    
    
    
     
    
    
    
     
    
    
    
     
    
     
    
     
    
     
    
     
    
    
     
    
     
    
     
    
     
    
    
    
    
    
    
    
    
    
    
    
    
    
    
     
    
    
    
    
     
    
    
     
    typedef struct  {
        volatile Uint16 RSVD0[4];
        volatile Uint16 USBLDOCNTL;
        volatile Uint16 RSVD1[13];
        volatile Uint16 SARCTRL;
        volatile Uint16 RSVD2;
        volatile Uint16 SARDATA;
        volatile Uint16 RSVD3;
        volatile Uint16 SARCLKCTRL;
        volatile Uint16 RSVD4;
        volatile Uint16 SARPINCTRL;
        volatile Uint16 RSVD5;
        volatile Uint16 SARGPOCTRL;
    } CSL_AnactrlRegs;
    
    
     
    
     
    
    
     
    
     
    
    
     
    
     
    
     
    
     
    
     
    
    
    
     
    
     
    
     
    
    
    
    
     
    
    
    
    
     
    
    
     
    
     
    
     
    
    
     
    
     
    
     
    
    
     
    
     
    
    
     
    
     
    
    
     
    
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
    
    
    
    
    
    
    
    
    
     
    
    
    
    
     
    
    
     
    typedef struct  {
        volatile Uint16 TXFUNCADDR;
        volatile Uint16 TXHUBADDR_TXHUBPORT;
        volatile Uint16 RSVD0[2];
        volatile Uint16 RXFUNCADDR;
        volatile Uint16 RXHUBADDR_RXHUBPORT;
        volatile Uint16 RSVD36[2];
    } CSL_UsbEptrgRegs;
    
    
     
    typedef struct  {
        volatile Uint16 TXMAXP;
        volatile Uint16 PERI_TXCSR;
        volatile Uint16 RSVD0[2];
        volatile Uint16 RXMAXP;
        volatile Uint16 PERI_RXCSR;
        volatile Uint16 RSVD1[2];
        volatile Uint16 RXCOUNT;
        volatile Uint16 RSVD41[7];
    } CSL_UsbEpcsrRegs;
    
    
     
    typedef struct  {
        volatile Uint16 TXGCR1;
        volatile Uint16 TXGCR2;
        volatile Uint16 RSVD0[6];
        volatile Uint16 RXGCR1;
        volatile Uint16 RXGCR2;
        volatile Uint16 RSVD1[2];
        volatile Uint16 RXHPCR1A;
        volatile Uint16 RXHPCR2A;
        volatile Uint16 RSVD2[2];
        volatile Uint16 RXHPCR1B;
        volatile Uint16 RXHPCR2B;
        volatile Uint16 RSVD46[14];
    } CSL_UsbChannelRegs;
    
    
     
    typedef struct  {
        volatile Uint16 ENTRYLSW;
        volatile Uint16 ENTRYMSW;
        volatile Uint16 RSVD49[2];
    } CSL_UsbCdmaschetblwordRegs;
    
    
     
    typedef struct  {
        volatile Uint16 QMEMRBASE1;
        volatile Uint16 QMEMRBASE2;
        volatile Uint16 RSVD0[2];
        volatile Uint16 QMEMRCTRL1;
        volatile Uint16 QMEMRCTRL2;
        volatile Uint16 RSVD63[10];
    } CSL_UsbQmmemregrRegs;
    
    
     
    typedef struct  {
        volatile Uint16 RSVD0[12];
        volatile Uint16 CTRL1D;
        volatile Uint16 CTRL2D;
        volatile Uint16 RSVD65[2];
    } CSL_UsbQmqnRegs;
    
    
     
    typedef struct  {
        volatile Uint16 QSTATA;
        volatile Uint16 RSVD0[3];
        volatile Uint16 QSTAT1B;
        volatile Uint16 QSTAT2B;
        volatile Uint16 RSVD1[2];
        volatile Uint16 QSTAT1C;
        volatile Uint16 RSVD67[7];
    } CSL_UsbQmqnsRegs;
    
    
     
    typedef struct  {
        volatile Uint16 REVID1;					
        volatile Uint16 REVID2;					
        volatile Uint16 RSVD0[2];				
        volatile Uint16 CTRLR;					
        volatile Uint16 RSVD1[3];				
        volatile Uint16 STATR;					
        volatile Uint16 RSVD2[3];				
        volatile Uint16 EMUR;					
        volatile Uint16 RSVD3[3];				
        volatile Uint16 MODE1;					
        volatile Uint16 MODE2;					
        volatile Uint16 RSVD4[2];				
        volatile Uint16 AUTOREQ;				
        volatile Uint16 RSVD5[3];				
        volatile Uint16 SPRFIXTIME1;			
        volatile Uint16 SPRFIXTIME2;			
        volatile Uint16 RSVD6[2];				
        volatile Uint16 TEARDOWN1;				
        volatile Uint16 TEARDOWN2;				
        volatile Uint16 RSVD7[2];				
        volatile Uint16 INTSRCR1;				
        volatile Uint16 INTSRCR2;				
        volatile Uint16 RSVD8[2];				
        volatile Uint16 INTSETR1;				
        volatile Uint16 INTSETR2;				
        volatile Uint16 RSVD9[2];				
        volatile Uint16 INTCLRR1;				
        volatile Uint16 INTCLRR2;				
        volatile Uint16 RSVD10[2];				
        volatile Uint16 INTMSKR1;				
        volatile Uint16 INTMSKR2;				
        volatile Uint16 RSVD11[2];				
        volatile Uint16 INTMSKSETR1;			
        volatile Uint16 INTMSKSETR2;			
        volatile Uint16 RSVD12[2];				
        volatile Uint16 INTMSKCLRR1;			
        volatile Uint16 INTMSKCLRR2;			
        volatile Uint16 RSVD13[2];				
        volatile Uint16 INTMASKEDR1;			
        volatile Uint16 INTMASKEDR2;			
        volatile Uint16 RSVD14[2];				
        volatile Uint16 EOIR;					
        volatile Uint16 RSVD15[3];				
        volatile Uint16 INTVECTR1;				
        volatile Uint16 INTVECTR2;				
        volatile Uint16 RSVD16[14];				
        volatile Uint16 GREP1SZR1;				
        volatile Uint16 GREP1SZR2;				
        volatile Uint16 RSVD17[2];				
        volatile Uint16 GREP2SZR1;				
        volatile Uint16 GREP2SZR2;				
        volatile Uint16 RSVD18[2];				
        volatile Uint16 GREP3SZR1;				
        volatile Uint16 GREP3SZR2;				
        volatile Uint16 RSVD19[2];				
        volatile Uint16 GREP4SZR1;				
        volatile Uint16 GREP4SZR2;				
    
    
        volatile Uint16 RSVD20[931];			
    
    
        volatile Uint16 FADDR_POWER;			
        volatile Uint16 INTRTX;					
        volatile Uint16 RSVD21[2];				
        volatile Uint16 INTRRX;					
        volatile Uint16 INTRTXE;				
        volatile Uint16 RSVD22[2];				
        volatile Uint16 INTRRXE;				
        volatile Uint16 INTRUSB_INTRUSBE;		
        volatile Uint16 RSVD23[2];				
        volatile Uint16 FRAME;					
        volatile Uint16 INDEX_TESTMODE;			
        volatile Uint16 RSVD24[2];				
        volatile Uint16 TXMAXP_INDX;			
        volatile Uint16 PERI_CSR0_INDX;			
        volatile Uint16 RSVD25[2];				
        volatile Uint16 RXMAXP_INDX;			
        volatile Uint16 PERI_RXCSR_INDX;		
        volatile Uint16 RSVD26[2];				
        volatile Uint16 COUNT0_INDX;			
        volatile Uint16 RSVD27[4];				
        volatile Uint16 CONFIGDATA_INDX;		
        volatile Uint16 RSVD28[2];				
        volatile Uint16 FIFO0R1;				
        volatile Uint16 FIFO0R2;				
        volatile Uint16 RSVD29[2];				
        volatile Uint16 FIFO1R1;				
        volatile Uint16 FIFO1R2;				
        volatile Uint16 RSVD30[2];				
        volatile Uint16 FIFO2R1;				
        volatile Uint16 FIFO2R2;				
        volatile Uint16 RSVD31[2];				
        volatile Uint16 FIFO3R1;				
        volatile Uint16 FIFO3R2;				
        volatile Uint16 RSVD32[2];				
        volatile Uint16 FIFO4R1;				
        volatile Uint16 FIFO4R2;				
        volatile Uint16 RSVD33[46];				
        volatile Uint16 DEVCTL;					
        volatile Uint16 TXFIFOSZ_RXFIFOSZ;		
        volatile Uint16 RSVD34[2];				
        volatile Uint16 TXFIFOADDR;				
        volatile Uint16 RXFIFOADDR;				
        volatile Uint16 RSVD35[6];				
        volatile Uint16 HWVERS;					
        volatile Uint16 RSVD37[19];				
        CSL_UsbEptrgRegs EPTRG[5];				
        volatile Uint16 RSVD38[89];				
        volatile Uint16 PERI_CSR0;				
        volatile Uint16 RSVD39[6];				
        volatile Uint16 COUNT0;					
        volatile Uint16 RSVD40[4];				
        volatile Uint16 CONFIGDATA;				
        volatile Uint16 RSVD42[2];				
        CSL_UsbEpcsrRegs EPCSR[4];				
    
    
        volatile Uint16 RSVD43[2735];
    
    
        volatile Uint16 DMAREVID1;				
        volatile Uint16 DMAREVID2;				
        volatile Uint16 RSVD44[2];				
        volatile Uint16 TDFDQ;					
        volatile Uint16 RSVD45[3];				
        volatile Uint16 DMAEMU;					
        volatile Uint16 RSVD47[2039];			
        CSL_UsbChannelRegs CHANNEL[4];			
        volatile Uint16 RSVD48[1920];			
        volatile Uint16 DMA_SCHED_CTRL1;		
        volatile Uint16 DMA_SCHED_CTRL2;		
        volatile Uint16 RSVD50[2046];			
        CSL_UsbCdmaschetblwordRegs CDMASCHETBLWORD[64];
        volatile Uint16 RSVD51[5888];			
        volatile Uint16 QMGRREVID1;				
        volatile Uint16 QMGRREVID2;				
        volatile Uint16 RSVD52[6];				
        volatile Uint16 DIVERSION1;				
        volatile Uint16 DIVERSION2;				
        volatile Uint16 RSVD53[22];				
        volatile Uint16 FDBSC0;					
        volatile Uint16 FDBSC1;					
        volatile Uint16 RSVD54[2];				
        volatile Uint16 FDBSC2;					
        volatile Uint16 FDBSC3;					
        volatile Uint16 RSVD55[2];				
        volatile Uint16 FDBSC4;					
        volatile Uint16 FDBSC5;					
        volatile Uint16 RSVD56[2];				
        volatile Uint16 FDBSC6;					
        volatile Uint16 FDBSC7;					
        volatile Uint16 RSVD57[82];				
        volatile Uint16 LRAM0BASE1;				
        volatile Uint16 LRAM0BASE2;				
        volatile Uint16 RSVD58[2];				
        volatile Uint16 LRAM0SIZE;				
        volatile Uint16 RSVD59[3];				
        volatile Uint16 LRAM1BASE1;				
        volatile Uint16 LRAM1BASE2;				
        volatile Uint16 RSVD60[6];				
        volatile Uint16 PEND0;					
        volatile Uint16 PEND1;					
        volatile Uint16 RSVD61[2];				
        volatile Uint16 PEND2;					
        volatile Uint16 PEND3;					
        volatile Uint16 RSVD62[2];				
        volatile Uint16 PEND4;					
        volatile Uint16 PEND5;					
        volatile Uint16 RSVD64[3942];			
        CSL_UsbQmmemregrRegs QMMEMREGR[16];		
        volatile Uint16 RSVD66[3840];			
        CSL_UsbQmqnRegs QMQN[64];				
        volatile Uint16 RSVD68[1024];			
        CSL_UsbQmqnsRegs QMQNS[64];				
    } CSL_UsbRegs;
    
    
     
    
     
    
    
    
    
     
    
    
    
    
    
    
     
    
    
    
    
     
    
    
    
    
    
    
     
    
    
    
    
     
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
     
    
    
    
    
     
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
     
    
    
    
    
     
    
    
    
    
    
     
    
     
    
    
    
    
     
    
    
    
    
    
     
    
     
    
    
    
     
    
    
    
     
    
    
    
    
    
     
    
    
    
    
    
     
    
    
    
    
    
     
    
    
    
    
    
     
    
     
    
    
    
     
    
    
    
    
     
    
     
    
    
    
     
    
    
    
    
     
    
    
    
     
    
    
    
     
    
    
     
    
    
     
    
    
     
    
    
    
    
     
    
    
    
    
     
    
    
    
     
    
    
    
    
     
    
    
    
     
    
    
    
    
     
    
    
    
    
     
    
    
    
     
    
    
    
     
    
    
     
    
     
    
    
     
    
     
    
    
     
    
    
     
    
    
     
    
    
     
    
     
    
     
    
    
     
    
    
     
    
    
     
    
    
     
    
    
     
    
    
     
    
    
     
    
    
     
    
    
     
    
    
     
    
    
     
    
    
     
    
     
    
     
    
     
    
    
     
    
    
    
     
    
    
    
     
    
    
     
    
    
    
     
    
    
     
    
    
    
     
    
    
    
    
    
    
     
    
    
    
    
     
    
    
    
    
    
    
     
    
    
    
    
     
    
    
    
    
    
    
     
    
    
    
    
     
    
    
    
    
    
    
     
    
    
    
    
     
    
    
    
    
    
    
     
    
    
    
    
     
    
    
    
    
    
    
     
    
    
    
    
     
    
    
    
    
    
    
     
    
    
    
    
     
    
    
    
    
     
    
    
    
     
    
    
    
     
    
    
    
     
    
    
    
    
     
    
    
    
     
    
    
    
    
     
    
    
    
     
    
    
    
    
     
    
    
    
     
    
    
    
    
     
    
    
    
    
    
    
    
    
    
    
    
    
     
    
    
    
    
    
    
    
    
     
    
    
    
    
    
    
    
    
     
    
    
    
    
    
    
    
    
     
    
    
    
    
    
    
    
    
     
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
     
    
    
    
    
     
    
    
    
    
    
    
    
    
    
    
    
    
     
    
    
    
    
     
    
    
    
    
    
    
    
    
    
    
    
    
     
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
     
    
    
    
    
     
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
     
    
    
    
    
     
    
    
    
    
     
    
    
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
    
     
    
    
    
     
    
    
    
     
    
    
    
     
    
    
    
     
    
    
    
     
    
    
    
     
    
    
    
     
    
    
    
     
    
    
    
     
    
    
    
     
    
    
     
    
    
    
     
    
    
    
    
    
     
    
    
     
    
    
    
     
    
    
    
     
    
    
    
    
     
    
    
    
    
     
    
    
    
    
    
     
    
    
    
    
    
    
    
    
    
    
    
    
     
    
    
    
    
     
    
    
    
    
    
    
    
    
    
    
    
     
    
    
    
     
    
    
    
     
    
    
    
    
    
     
    
    
    
    
    
     
    
    
    
    
     
    
     
    
    
    
     
    
    
    
     
    
    
    
     
    
    
    
    
     
    
     
    
    
    
    
     
    
    
    
    
     
    
    
    
    
     
    
    
    
    
     
    
    
    
    
     
    
    
    
    
     
    
    
    
    
     
    
    
    
    
     
    
    
    
    
     
    
    
    
     
    
    
    
     
    
    
    
    
     
    
    
    
     
    
    
    
     
    
    
    
     
    
    
    
     
    
    
    
     
    
    
    
     
    
    
    
     
    
    
    
    
    
    
    
    
    
    
    
     
    
    
    
    
     
    
    
     
    typedef struct  {
        volatile Uint16 RSVD0[6];
        volatile Uint16 IODIR1;
        volatile Uint16 IODIR2;
        volatile Uint16 IOINDATA1;
        volatile Uint16 IOINDATA2;
        volatile Uint16 IOOUTDATA1;
        volatile Uint16 IOOUTDATA2;
        volatile Uint16 IOINTEDG1;
        volatile Uint16 IOINTEDG2;
        volatile Uint16 IOINTEN1;
        volatile Uint16 IOINTEN2;
        volatile Uint16 IOINTFLG1;
        volatile Uint16 IOINTFLG2;
    } CSL_GpioRegs;
    
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
     
    
    
    
    
    
    
    
    
    
    
     
    
    
    
    
     
    
    
     
    typedef struct  {
        volatile Uint16 TCR;
        volatile Uint16 RSVD0;
        volatile Uint16 TIMPRD1;
        volatile Uint16 TIMPRD2;
        volatile Uint16 TIMCNT1;
        volatile Uint16 TIMCNT2;
        
    } CSL_TimRegs;
    
    
     
    
     
    
     
    
    
    
     
    
    
    
     
    
    
    
     
    
    
    
     
    
    
    
     
    
    
    
     
    
    
    
    
    
     
    
    
    
    
    
    
    
    
    
    
    
    
    
     
    
    
    
    
     
    
    
     
    typedef struct  {
        volatile Uint16 WDKCKLK;
        volatile Uint16 RSVD0;
        volatile Uint16 WDKICK;
        volatile Uint16 RSVD1;
        volatile Uint16 WDSVLR;
        volatile Uint16 RSVD2;
        volatile Uint16 WDSVR;
        volatile Uint16 RSVD3;
        volatile Uint16 WDENLOK;
        volatile Uint16 RSVD4;
        volatile Uint16 WDEN;
        volatile Uint16 RSVD5;
        volatile Uint16 WDPSLR;
        volatile Uint16 RSVD6;
        volatile Uint16 WDPS;
    } CSL_WdtRegs;
    
    
     
    
     
    
    
    
     
    
    
    
     
    
    
    
     
    
    
    
     
    
    
    
     
    
    
     
    
    
     
    
    
    
     
    
    
    
    
    
    
    
     
    
    
     
    typedef volatile ioport CSL_UsbRegs 	  	     * CSL_UsbRegsOvly;
    typedef volatile ioport CSL_I2cRegs  	    	 * CSL_I2cRegsOvly;
    typedef volatile ioport CSL_I2sRegs  	      	 * CSL_I2sRegsOvly;
    typedef volatile ioport CSL_EmifRegs 	         * CSL_EmifRegsOvly;
    typedef volatile ioport CSL_UartRegs   	         * CSL_UartRegsOvly;
    typedef volatile ioport CSL_SpiRegs              * CSL_SpiRegsOvly;
    typedef volatile ioport CSL_MmcsdRegs            * CSL_MmcsdRegsOvly;
    typedef volatile ioport CSL_LcdcRegs             * CSL_LcdcRegsOvly;
    typedef volatile ioport CSL_RtcRegs              * CSL_RtcRegsOvly;
    typedef volatile ioport CSL_AnactrlRegs          * CSL_SarRegsOvly;
    typedef volatile ioport CSL_GpioRegs   	    	 * CSL_GpioRegsOvly;
    typedef volatile ioport CSL_SysRegs   	    	 * CSL_SysRegsOvly;
    typedef volatile ioport CSL_DmaRegs              * CSL_DmaRegsOvly;
    typedef volatile CSL_CpuRegs    		         * CSL_CpuRegsOvly;
    typedef volatile ioport CSL_TimRegs		         * CSL_TimRegsOvly;
    typedef volatile ioport CSL_WdtRegs		         * CSL_WdtRegsOvly;
    
    
     
    
    
     
     
     
     
     
     
     
     
     
     
     
    
    
    
    
     
     
    Int16 EZDSP5535_init( );
    
     
    void EZDSP5535_wait( Uint32 delay );
    void EZDSP5535_waitusec( Uint32 usec );
    
    
    extern Int16 led_test( );
    
    int  TestFail    = (int)-1;   
    
        void StopTest()
       {
        
       return;
        }
    
    
    
    
    
    
     
    void main( void )
    {
         
        EZDSP5535_init( );
    
         
        printf( "\nTesting LEDs...\n");
    
         
        TestFail = led_test( );
    
         
        if ( TestFail != 0 )
        {
             
            printf( "     FAIL... error code %d... quitting\n", TestFail );
        }
        else
        {
             
            printf( "    PASS\n" );
            printf( "\n***ALL Tests Passed***\n" );
        }
        
           StopTest();
    }
    

    I found the parser preprocessing option in ccs5.5 checked -ppo option ran the compiler and got the main.pp file which i have uploaded to you  basiclly it spit out the csl regs which is good inforamtion but it did not reference above the macro that we were discussing  ex  CSL_FINST and CSL_FINS how does the parsing work does it reference all procedures from the main.c and if it does does it reference the below procedures kinda like an onion let me know what you think and i'll continue to read the wiki about csl libraryies your assistance in this is greatly appreciated

    Best Regards,

    JEFF

  • I thought we were looking at the function named EZDSP5535_GPIO_init(). This function is apparently not defined in main.c, as I cannot see a definition of this function in main.pp. We would need to look at the .pp file produced from the C file which contains the definition of EZDSP5535_GPIO_init().

    If I am correct that CSL_FINS is yet another macro, you will not see it in the .pp file; you will see what it expands to.

    I don't know what you mean when you ask how the parsing works.  The compiler will preprocess each input file individually to take care of #include and macros, then parse it as C code.  This produces object files.  Then, the linker combines the object files into an executable program, which you can run.  If you need more detail than that, I'll have to refer you to the C Compiler User's Guide.

  • //////////////////////////////////////////////////////////////////////////////
    // * File name: ezdsp5535_gpio.c
    // *                                                                          
    // * Description:  GPIO implementation.
    // *                                                                          
    // * Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/ 
    // * Copyright (C) 2011 Spectrum Digital, Incorporated
    // *                                                                          
    // *                                                                          
    // *  Redistribution and use in source and binary forms, with or without      
    // *  modification, are permitted provided that the following conditions      
    // *  are met:                                                                
    // *                                                                          
    // *    Redistributions of source code must retain the above copyright        
    // *    notice, this list of conditions and the following disclaimer.         
    // *                                                                          
    // *    Redistributions in binary form must reproduce the above copyright     
    // *    notice, this list of conditions and the following disclaimer in the   
    // *    documentation and/or other materials provided with the                
    // *    distribution.                                                         
    // *                                                                          
    // *    Neither the name of Texas Instruments Incorporated nor the names of   
    // *    its contributors may be used to endorse or promote products derived   
    // *    from this software without specific prior written permission.         
    // *                                                                          
    // *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS     
    // *  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT       
    // *  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR   
    // *  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT    
    // *  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,   
    // *  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT        
    // *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,   
    // *  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY   
    // *  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT     
    // *  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE   
    // *  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.    
    // *                                                                          
    //////////////////////////////////////////////////////////////////////////////
    
    #include "ezdsp5535_gpio.h"
    #include "csl_gpio.h"
    
    CSL_GpioObj     GpioObj;
    CSL_GpioObj     *hGpio;
    
    /*
     *
     *  EZDSP5535_GPIO_init( )
     *
     *      Initialize GPIO Mudule.
     *
     */
    Int16 EZDSP5535_GPIO_init()
    {
        CSL_Status           status;
        hGpio = GPIO_open(&GpioObj, &status);
        
        /* Set Bus for GPIOs */
        CSL_FINST(CSL_SYSCTRL_REGS->EBSR, SYS_EBSR_PPMODE, MODE6);
        
        return 0;
    }
    
    /*
     *
     *  EZDSP5535_GPIO_setDirection( number, direction )
     * 
     *      Configure the GPIO "number" to input or output.
     *
     *      Uint16 number    <- GPIO number
     *      Uint16 direction <- 0 : Set GPIO as Input
     *                          1 : Set GPIO as Output
     */
    Int16 EZDSP5535_GPIO_setDirection( Uint16 number, Uint16 direction )
    {
        CSL_Status           status;
        CSL_GpioPinConfig    config;
        
        /* Configure GPIO direction */
        config.pinNum    = number;
        config.direction = direction;
        config.trigger   = CSL_GPIO_TRIG_CLEAR_EDGE;
        
        /* Set configuration */
        status = GPIO_configBit(hGpio,&config);
    
        return status;
    }
    
    /*
     *
     *  EZDSP5535_GPIO_setOutput( number, output )
     * 
     *      Sets the GPIO "number" to the high or low state. The GPIO must 
     *      be an output.
     *
     *      Uint16 number   <- GPIO number
     *      Uint16 output    <- 0 : GPIO output is logic low 
     *                         1 : GPIO output is logic high
     */
    Int16 EZDSP5535_GPIO_setOutput( Uint16 number, Uint16 output )
    {
        CSL_Status           status;
        
        /* Set GPIO output */
        status = GPIO_write(hGpio, number, output);
    
        return status;
    }
    
    /*
     *
     *  EZDSP5535_GPIO_getInput( number )
     *
     *      Returns 0 if the GPIO "number" is in the low state and 1 if it is 
     *      in the high state.
     * 
     *      Uint16 number   <- GPIO number
     *
     *      Returns: Uint16 readVal ->  0 : Input to the GPIO is logic low
     *                                  1 : Input to the GPIO is logic high
     */
    Int16 EZDSP5535_GPIO_getInput( Uint16 number )
    {
        CSL_Status           status;
        Uint16          readVal = 0;
        
        /* Get GPIO input */
        status = GPIO_read(hGpio, number, &readVal);
    
        return readVal;
    }
    
    4544.ezdsp5535_gpio.h

    Int16 EZDSP5535_GPIO_init()

    {

        CSL_Status           status;

        hGpio = GPIO_open(&GpioObj, &status);

    /* Set Bus for GPIOs */

        CSL_FINST(CSL_SYSCTRL_REGS->EBSR, SYS_EBSR_PPMODE, MODE6);

     return 0;

    }

    I have included the c file and the header file that contain the function above I'm really interested how the

    CSL_FINST(CSL_SYSCTRL_REGS->EBSR, SYS_EBSR_PPMODE, MODE6); function works I understand the rest of the functions that are in the c file and declared in the header file we have been discussing that the parser will expand the above function  and what is in it including the csl_finst  Can i parse the c file that i have included if so i have include the feature in ccs 5.5 that show parser feature is it possible to parse this file so that we may find out what the above function is and contains.  thanks

     

    best regards,

    jeff

  • When you added the --preproc_only flag, it should have produced a .pp file for every source file in the project.  Did it not?

  • Archaeologist,

    Here is the problem I found out  if you know how the LED demo is constucted it has a reference program ezdsp5535bsl I ran the parser on this part of the LED program and got the .pp file for ezdsp5535_gpio.c

    Here is the .pp code

    Int16 EZDSP5535_GPIO_init()

    {

        CSL_Status           status;

        hGpio = GPIO_open(&GpioObj, &status);

       

        /* Set Bus for GPIOs */

        (((((CSL_SysRegsOvly) 0x1c00)->EBSR)) = (((((CSL_SysRegsOvly) 0x1c00)->EBSR)) & ~(0x7000u)) | ((((0x0006u)) << (0x000Cu)) & (0x7000u)));

       

        return 0;

    }

    Here is the c routine from ezdsp5535_gpio.c

    Int16 EZDSP5535_GPIO_init()

    {

        CSL_Status           status;

        hGpio = GPIO_open(&GpioObj, &status);

       

       

    /* Set Bus for GPIOs */

        CSL_FINST(CSL_SYSCTRL_REGS->EBSR, SYS_EBSR_PPMODE, MODE6);

       

       

    return 0;

    Now we can look at .pp vs .c routine what I need to know or give me approximation on how this statement works I really appreciate it  the

    c: statement is as follows

    /* Set Bus for GPIOs */

        CSL_FINST(CSL_SYSCTRL_REGS->EBSR, SYS_EBSR_PPMODE, MODE6);

    here is the .pp statement for the .c statement

    /* Set Bus for GPIOs */

        (((((CSL_SysRegsOvly) 0x1c00)->EBSR)) = (((((CSL_SysRegsOvly) 0x1c00)->EBSR)) & ~(0x7000u)) | ((((0x0006u)) << (0x000Cu)) & (0x7000u)));

       

    Any ideas,

    Best Regards,

    JEFF

       

  • There's not much to the statement; you just need to carefully look at how it would be parsed in C.  It is a single statement of the form

    x = (x & mask1) | mask2;

    The statement is setting and clearing bits in a memory-mapped register in a set of memory-mapped registers starting at address 0x1c00, which CSL is calling CSL_SYSCTRL_REGS.  That is macro expanding to

    ((CSL_SysRegsOvly)0x1c00)

    This is the only thing funky about the statement.  I don't see a definition of the type CSL_SysRegsOvly, but from the context it is clearly a typedef for a pointer to a structure containing a member named EBSR.  Then,

    ((CSL_SysRegsOvly)0x1c00)->EBSR

    refers to the particular memory-mapped register we want.  Now, to clear a bit in some value, you mask it with a mask of all ones except for the bit you want to clear, such as:

    x = x & 0x8fff;

    For clarity, such masks are often written to show one bits in the field being cleared, with a bitwise not thrown in:

    x = x & ~(0x7000);

    This will clear three bits in the variable x. Now we want to set some bits.  CSL has chosen to use the expression

    (0x0006 << 0x000c) & 0x7000

    or

    (0x6 << 12) & 0x7000

    or

    0x6000 & 0x7000

    or

    0x6000

    So this sets some of the bits in the field we just cleared.  In summary, you can read this statement as

    EBSR = (EBSR & ~0x7000) | 0x6000;

    In other words, set a certain 3-bit field in the EBSR register to 6, which is presumably EBSR PP mode 6.

    In any case, you should just use the CSL macros and let the header files do the right thing.

  • Thank you,   this is exactly what i was looking for your interpertation was right on target the ebsr register is in the tech ref manual of the dsp5535 and it explains it pretty well.I'mpretty familiar with bitwise operators in c it was just the whole macro and using the parser to get at it you are a wise man LOL

    Regards,

    JEFF