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.

Regarding DSP2833x Library files

Hi,


I am just in the learning process of the DSP F28335. Currently I am exploring the TI library files that are needed for the initial make up of the processor such as initial clocking for every peripherals, etc. During my analysis, I found difficulty in understanding some low level of the code, which I have described below. Please help me in understanding these parts,

1) DSP2833x_CpuTimers.c 

         The function ConfigCpuTimer is present in this file. One of the parameters for this function is frequency. Since the CPU frequency for F28335 is 150MHz, should we give the same 150MHz as input ? Or else giving any other frequency values is possible?

Also I am not able to understand the typecasting done in the function "temp = (long) (Freq * Period)" but temp is a unsigned long value.

My roundup question: What are the maximum values, which can be given for the input parameters Freq and Period?


2)  DSP2833x_usDelay.asm

      - What is the maximum value for the input "LoopCount", since giving the maximum value of the data type, the function doesn't perform its intended funtionality.


Please help resolving this queries.

  • Hi,

    1) DSP2833x_CpuTimers.c

    The function ConfigCpuTimer is present in this file. One of the parameters for this function is frequency. Since the CPU frequency for F28335 is 150MHz, should we give the same 150MHz as input ? Or else giving any other frequency values is possible?

    Other frequency values are possible but they are configured in DSP2833x_Examples.h

    2)  DSP2833x_usDelay.asm

          - What is the maximum value for the input "LoopCount", since giving the maximum value of the data type, the function doesn't perform its intended funtionality.

    It can  be implemented as : DELAY_US(time) where time parameter has long double datatype
    Also, you can refer: http://e2e.ti.com/support/microcontrollers/c2000/f/171/t/21315.aspx

    Regards,

    Gautam

  • Hi Gautam,

    Thanks for your answer. It was really helpful for me. I need one more clarification on the assembly files that are included as the library files. What I am trying to do is this,

        - Invoke the assembly funtion from a simple C file. The assembly files include DSP2833x_ADC_cal.asm and DSP2833x_usDelay.asm. I am able invoke the fuctions present in these files easily.

    But when I am trying to invoke "code_start" and "wd_disable" funtion (DSP2833x_CodeStartBranch.asm) from a C file independently, I am not able to do that. My aim is to invoke the funtions "codestart" and "wd_disable" independently from a C file.

    Please provide your ideas/suggestions on this.

    Note: Hence I tried invoking this funtion "codestart" via a funtion pointer by using the address from the linker command file in a sample C file, it worked. But I am not able to invoke "wd_disable".

    Forgive me if my questions are too silly.