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.

CCS/TMS320LF2407A: One Descriptor for Two 16bit registers definition

Part Number: TMS320LF2407A

Tool/software: Code Composer Studio

On 16 bit LF2407A;

If I need One Descriptor (Long or Float type) defined on Two 16bit registers:

What I need write?

When I type in Core.h file: extern volatile float *V;

and in Core.C file: volatile float *V=(void*)03FE; ,- I have One 16bit Descriptor on variable *V in External Memory.

I need One 32 bit Descriptor in External Memory, it is possible?

  • Hi Igor,

    You can use the following typedefs:
    typedef int int16_t;
    typedef unsigned int uint16_t;
    typedef long int32_t;
    typedef unsigned long uint32_t;

    To define a pointer to 16 bit/32-bit registers, do the following:
    volatile uint16_t *p1;
    volatile uint32_t *p2;

    Hope this helps!

    Regards,
    Veena
  • Hi Veena!
    CCS 3.3 don't understand this directives in .h and .c files
    correct work only:
    in 123.h file
     #ifndef 123_h
    #define 123_h
    volatile float *p2=(void*)0x03EF;
    #endif
    and:
    in 123.c file
    #include 123.h
    extern volatile float *p2;
    But after that I have only One register 16 bit for *p2.
    ...
    If I try it in main.c program for internal memory, I have One 32bit register, from Two 16bit merged registers

    ?: In External 16bit Memory can I defining One 32bit variable? It is possible?, or for this I need Split my 32bit variable and save Two 16bit variables, then read and merge Two 16bit variables, then work with him, etc...?

    I need manual about Defining Variables in CCS... Do You can help My find it?

    Thanks Veena!

    Hawe a nice weekend!

  • Hi Igor,

    Are you saying CCS 3.3 does not understand int and long types?

    Regards,
    Veena
  • Dear Veena!
    CCS 3.3 understand int and long types, but I don't understand how define variable long type in External 16bit memory in construction:
    in 123.h file:
     #ifndef 123_h
    #define 123_h
    volatile float *p2=(void*)0x03EF;
    #endif,
    because I see only One 16bit register. I need Two!
    (apparently the luck I need...)
  • Ok!
    I do that!
    I forgot to change the display style at the bottom of the window!
    I Hex 16 Bit and 32 Bit Float stile is different...
    Have a nice weekend!
  • Hi Igor,

    Glad to know that you were able to resolve the issue. Thanks for posting on E2E!

    Regards,

    Veena