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: Proper use of the BIOS GPIO driver.

Part Number: TMS320C6657


I am attempting to us the GPIO driver for the TMS320C6657.  My question is in regard to the configuration and use of this driver.  I have found an example for the use of this driver but it is for the C6748.  If I understand the example correctly, to use this driver the user needs to include the <ti/drv/gpio/soc/GPIO_soc.h>  header file and set the gpioPinConfigs, gpioCallbackFunctions, and the GPIO_v0_config structures and then call the drivers GPIO_init() function.  After the driver has been initialized the user can then proceed to use the driver calls (i.e. GPIO_write, GPIO_read, …)

Example Code:

GPIO_PinConfig gpioPinConfigs[] =

{

    GPIO_DEVICE_CONFIG(GPIO_LED0_PORT_NUM, GPIO_LED0_PIN_NUM) | GPIO_CFG_OUTPUT

};

GPIO_CallbackFxn gpioCallbackFunctions[] =

{

    NULL

};

 

GPIO_v0_Config GPIO_v0_config =

{

    gpioPinConfigs,

    gpioCallbackFunctions,

    sizeof(gpioPinConfigs) / sizeof(GPIO_PinConfig),

    sizeof(gpioCallbackFunctions) / sizeof(GPIO_CallbackFxn),

    12,

};

 

My questions are:

  • Is my assessment of how to utilize the driver correct?  I it this is not correct please explain the proper implementation of the driver?
  • In setting GPIO_PinConfig structure the example used a macro to determine the pin number. This macro uses information from the datasheet (i.e. Port and Pin), however, the c6657 datasheet does not list such information.  How are GPIO pins of the C6657 (i.e. GPIO_0 to GPIO_15) mapped to the driver?