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.

EVMK2GX: GPIO Register Overlay structure

Part Number: EVMK2GX

Hi,

I am working on EVMK2Gx evaluation board. I have gone through the cslr_gpio.h file located at C:\TI\pdk_k2g_1_0_16\packages\ti\csl\src\ip\gpio\V2  and found that the register overlay structure given for CSL_GpioRegs is incompatible with the register addresses given in Technical Reference Manual.

typedef struct {
    volatile Uint32 PID;
    volatile Uint32 PCR;
    volatile Uint32 BINTEN;
    volatile Uint8  RSVD0[4];
    CSL_GpioBank_registersRegs	BANK_REGISTERS[8];
    CSL_GpioBank_registers_9Regs	BANK_REGISTERS_9;
} CSL_GpioRegs;

Below are the errors I have identified,

1) There is no PCR register and
2)CSL_GpioBank_registersRegs BANK_REGISTERS[8] , here only 4 sets are required instead of 8 as Each Bank Registers structure has 2 banks paired.

Regards,
Vishnu



  • Hello Vishnu,

    My name is Andrew, and I would be more than happy to assist you with this question.  Thank you for the information that you have provided. I am consulting with my colleagues on this now and we will try to have an answer/followup for you within the next 24-48 hours.

    Best regards,

    Andrew

     

  • Hello Vishnu,

    Thank you kindly for your patience.  I believe this discrepancy may be a result of a version mismatch;  my colleges inform me that this particular device uses "V0" of that gpio IP (C:\TI\pdk_k2g_1_0_16\packages\ti\csl\src\ip\gpio\V0). Is there a particular reason why you are using V2?

    pdk\packages\ti\csl\src\ip\gpio\src_files_gpio.mk lists which version of each file is to be used per the device. 

    Best regards,

    Andrew

  • Hi Andrew,

    In file cslr_gpio.h found at location C:\TI\pdk_k2g_1_0_16\packages\ti\csl it is written for SOC_K2G device version V2 should be used.

    #ifndef CSLR_GPIO_TOP_H_
    #define CSLR_GPIO_TOP_H_
    
    #include <ti/csl/cslr.h>
    #include <ti/csl/tistdtypes.h>
    #if defined(SOC_AM574x) || defined(SOC_AM572x)|| defined(SOC_AM571x) || defined (SOC_TDA2XX) || defined (SOC_TDA2PX) || defined(SOC_DRA75x) || defined(SOC_TDA2EX) || defined(SOC_DRA72x) || defined(SOC_TDA3XX) || defined(SOC_DRA78x)
    #include <ti/csl/src/ip/gpio/V1/cslr_gpio.h>
    #include <ti/csl/src/ip/gpio/V1/hw_gpio.h>
    #elif defined(SOC_AM335x)|| defined(SOC_AM437x)
    #include <ti/csl/src/ip/gpio/V1/cslr_gpio.h>
    #include <ti/csl/src/ip/gpio/V1/hw_gpio.h>
    #elif defined(SOC_K2G)
    #include <ti/csl/src/ip/gpio/V2/cslr_gpio.h>
    #elif defined(SOC_C6678)||defined(SOC_C6657) || defined (SOC_AM65XX) || defined (SOC_J721E) || defined (SOC_J7200) || defined (SOC_AM77X)
    #include <ti/csl/src/ip/gpio/V0/cslr_gpio.h>
    #elif defined(SOC_TPR12)
    #include <ti/csl/src/ip/gpio/V3/cslr_gpio.h>
    #else
    #include <ti/csl/src/ip/gpio/V0/cslr_gpio.h>
    #endif
    
    #endif

    Even in the makefile you have mentioned in above post , it is written to use include file from Version V2:

    ifeq ($(SOC),$(filter $(SOC), k2g))
    PACKAGE_SRCS_COMMON += src/ip/gpio/V2
    INCDIR += . src/ip/gpio/V2
    else
    INCDIR += . src/ip/gpio/V0
    endif

    Regards,
    Vishnu
  • Hi Vishnu,

    What version of the Technical Reference Manual are you using? And could you provide the link that you are using to find it?

    Regards,

    Dillon

  • Hi Dillon,

    I am using Revision I of Technical reference manual. Below is the link for the manual:

    https://www.ti.com/lit/ug/spruhy8i/spruhy8i.pdf?ts=1618900602817&ref_url=https%253A%252F%252Fwww.ti.com%252Fproduct%252F66AK2G12

    Regards, Vishnu

  • Thank you for the link. That does seem to be the correct version.

    Which specific section(s) of the TRM have you identified the issue in?

    Regards,

    Dillon

  • 11.7.6 - GPIO Registers. By comparing the register addresses from TRM and the overlay structure in cslr_gpio.h I found some issues which I had already mentioned in my first post.

    Regards,

    Vishnu

  • Hello Vishnu,

    I apologize for the delay, I am currently looking into confirming this documentation error. If so, I will also see if we can update our resources accordingly.   While I do this, has there been any change in your application's status (i.e have you been able to successfully build yet)?

    Regards,

    Andrew