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.

TMS320F28027F: Bad GpioBaseAddr - can't find where this is declared

Part Number: TMS320F28027F
Other Parts Discussed in Thread: C2000WARE,

I'm trying to debug gpio_ex1_setup, and so far I'm finding a lot of problems.

Notable amongst these is that the Gpio base address is set to 0x7c00 instead of 0x6f80 for this chip.

I'm going slightly nuts trying to find where this address is actually specified - it's not in gpio.c or gpio.h or in any of the other files I can find.

However i'm finding a reference to "GpioCtrlRegsFile":-


#ifdef __cplusplus
#pragma DATA_SECTION("GpioCtrlRegsFile")
#else
#pragma DATA_SECTION(GpioCtrlRegs,"GpioCtrlRegsFile");
#endif
volatile struct GPIO_CTRL_REGS GpioCtrlRegs;

in globalvariabledefs.c, but can't find any actual file of that name.

  • The above code snippet seems to be a compiler directive telling the compiler to make an area in the data section called gpio ctrl regs file, and linking this to the gpio ctrl regs structure. So far so good, EXCEPT What is telling the compiler to put this at 0x7c00? I found a file called hw_memmap.h, which indeed had the incorrect references in it, but correcting these did not sort out the problem.  So ***WHERE*** is the file that tells the compiler where to put this reference? (This is not the only case, all the PWM references are wrong too!!

  • So far so good, EXCEPT What is telling the compiler to put this at 0x7c00?

    C2000Ware has device-specific linker command files which define the base addresses of the peripheral registers.

    E.g. ~/ti/C2000Ware_3_04_00_00_Software/device_support/f2802x/headers/cmd/F2802x_Headers_nonBIOS.cmd has the following in SECTIONS which places the GpioCtrlRegsFile section in the GPIOCTRL memory region:

    /*** Peripheral Frame 1 Register Structures ***/      
       ECap1RegsFile     : > ECAP1        PAGE = 1   
       GpioCtrlRegsFile  : > GPIOCTRL     PAGE = 1
       GpioDataRegsFile  : > GPIODAT      PAGE = 1
       GpioIntRegsFile   : > GPIOINT      PAGE = 1

    And the MEMORY part of the same F2802x_Headers_nonBIOS.cmd there is the following memory region which has GPIOCTRL at address 0x006F80:

       GPIOCTRL    : origin = 0x006F80, length = 0x000040     /* GPIO control registers */

  • I'm trying to debug gpio_ex1_setup, and so far I'm finding a lot of problems.

    Can you clarify which version of C2000Ware you are using and how you imported the example?

    Looking at C2000Ware_3_04_00_00 I can't find the gpio_ex1_setup example for a TMS320F28027F (which is the part number in the thread).

  • Thanks Chester,

    I found this file listed in the project explorer for the project. It does indeed have the incorrect references.

    Version of CCS is:

    Code Composer Studio
     Version: 10.4.0.00006

    OS: Linux, v.4.19.0-16-amd64, x86_64 / gtk 3.24.5, WebKit 2.30.4
    Java version: 1.8.0_112

    I also have installed the windows version, and I'm having even more trouble with that one - the browser module is firefox based, and I keep getting error messages about unsupported apps.

    I just checked the windows version, (10.4.0.0006) and this file is incorrect as well.

    It looks like at some point there was a pretty major shift in the memory mapping of the F2802x devices, and this has not been corrected in the on line files. However, it looks like the entire memory section of the file will have to be rebuilt - from the data sheet.

    Thank you again for the support.

    Mike.