I have been working with the GPIO driver for the C6657 and was having issue getting it to control pins that were shared with the Timer. I have configured the GPIO driver with
...
GPIO_PinConfig gpioPinConfigs[] =
{
GPIO_DEVICE_CONFIG(0, 1) | GPIO_CFG_OUTPUT, //This is the pin shared by the GPIO01/BOOTMODE00
GPIO_DEVICE_CONFIG(0, 17) | GPIO_CFG_OUTPUT, //This is the pin shared by the TIM1/GPIO17
};
void Board_GPIO_Init ( void )
{
// NOTE: a structure GPIO_v0_config needs to be defined for this
// driver to compile
GPIO_init(); // Initialize the GPIO system
GPIO_write(0, 0); // Set GPIO01 low
GPIO_write(0, 1); // Set GPIO01 high
GPIO_write(1, 0); // Set GPIO17 low
GPIO_write(1, 1); // Set GPIO17 high
}
...
When I execute the GPIO01 writes the pin follows the controls. However, when I execute the GPIO17 writes the pin is not controlled.
After researching this a little I have found that if I configure the PIN_CONTROL_0 register with (0x20000), the GPIO driver properly controls the pin.
Questions:
- Have I missed something in the GPIO's driver configuration? (Is there somewhere in the documentation that these steps are described?)
- Is there a different driver that controls the pin mux? (If so, what is it?)
Thanks,
Brad