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.

TMS320C6657 header file for accessing registers

Other Parts Discussed in Thread: TMS320C6657

I am not familiar with dsp and i have to use EVM6657.

I am experienced with microcontroller and ARM M processor.

When I make code for microcontroller, i can access the register directly after include the device header file.

How about dsp TMS320C6657, is there any header file that i have to include so that i can access registers directly?

I mean like timer register TCR (timer control register), i can write in C --> TCR=0x00000001;

Thanks in advance !

  • isro,

    You can access register in C6657 with the same way you mentioned above.

    One of the best example of these can be found in the GEL file which is used to initialize EVM board as soon as connecting emulator. If you installed CCSv5 and MCSDK, then just find "evmc6657l.gel" file under 'C:\ti\ccsv5\ccs_base\emulation\boards\evmc6657l\gel' folder. Otherwise search '*.gel' for other reference processors.

    In case of C6657, you can find the GPIO register definitions in the GEL file like below

    #define GPIO_BASE           0x02320000

    #define GPIO_BITEN          (*(unsigned int*)(GPIO_BASE + 0x0008)) // BITEN Control

    #define GPIO_DIR            (*(unsigned int*)(GPIO_BASE + 0x0010)) // DIR Control

    #define GPIO_OUT_DATA       (*(unsigned int*)(GPIO_BASE + 0x0014)) // OUT_DATA Control

    #define GPIO_IN_DATA        (*(unsigned int*)(GPIO_BASE + 0x0020)) // IN_DATA Register

     #define GPIO_CLR_RIS_TRIG   (*(unsigned int*)(GPIO_BASE + 0x0028)) // CLR_RIS_TRIG Control

    #define GPIO_CLR_FAL_TRIG   (*(unsigned int*)(GPIO_BASE + 0x0030)) // CLR_FAL_TRIG Control

    if you include this definition in your code and then you can access the registers and control GPIO signals like the way you want.

    GPIO_DIR = ~0x0000C000; (set GPIO 14, 15 as output)

    GPIO_SET_DATA = 0x0000C000; (set GPIO 14,15 output to '1')

    GPIO_CLR_DATA = 0x0000C000; (set GPIO 14,15 output to '0')

     I attached the 'evmc6657.gel' for your convenience.

    - Jun

  • So we have to define them by our selves, huh?

    I have another question. I try to include CSL .h header file into my program, but it looks like that the compiler cannot find .c source file. Temporary solution is just to copy manually the .c file into my project. do you have suggestion regarding this problem? 

    Thanks Jun !
     

  • Isro,

    Yes! Otherwise, refer CSL like you mentioned.

    CSL is a kind of library provided by EVM manufacturer. You can find the binary file, 'ti.csl.ae66' under 'C:\ti\pdk_C6657_1_1_2_6\packages\ti\csl\lib\' Just link it with your code, only if you included header files properly, and it should work.

    - Jun

  • Hi Jun,

    I can find 'ti.csl.ae66' file but i can not find a way to include it to the project.
    How to do it? 

  • Isro,

    I was huddling lots of work, yesterday and coudln't afford to visit here.

    Using evm6657l, the csl library would be under "C:\ti\pdk_C6657_1_1_2_6\packages\ti\csl\lib", for example.

    If you don't have the 'PDK' folder, you must check the installation of BIOS_MCSDK coming with your EVM6657 Kit(find in CD). Or you can download the latest version of BIOS_MCSDK from TI site. (http://software-dl.ti.com/sdoemb/sdoemb_public_sw/bios_mcsdk/latest/index_FDS.html)

    If this answer was solved your issue, please check 'verfy answer'

    - Jun

  • Hi Jun,

    I know the file location. What i wanted to ask was how to include it to the my project.
    However, i just found it.

    Thanks a lot Jun !!!