Hi
I am trying to configure the port 9 and 10 of (MSP430f5438A) using GPIO_config and GPIO_init function as shown below.
<board.c>
#if TI_DRIVERS_GPIO_INCLUDED
#include <ti/drivers/GPIO.h>
/* GPIO configuration structure */
const GPIO_HWAttrs gpioHWAttrs[MSP_EXP430F5438A_GPIOCOUNT] = {
{GPIO_PORT_P1, GPIO_PIN0, GPIO_OUTPUT}, /* MSP_EXP430F5438A_LED1 */
{GPIO_PORT_P1, GPIO_PIN1, GPIO_OUTPUT}, /* MSP_EXP430F5438A_LED2 */
{GPIO_PORT_P2, GPIO_PIN6, GPIO_INPUT}, /* MSP_EXP430F5438A_S1 */
{GPIO_PORT_P2, GPIO_PIN7, GPIO_INPUT}, /* MSP_EXP430F5438A_S2 */
{GPIO_PORT_P9, GPIO_PIN0, GPIO_OUTPUT},
};
const GPIO_Config GPIO_config[] = {
{&gpioHWAttrs[0]},
{&gpioHWAttrs[1]},
{&gpioHWAttrs[2]},
{&gpioHWAttrs[3]},
{&gpioHWAttrs[4]},
{NULL},
};
/*
* ======== MSP_EXP430F5438A_initGPIO ========
*/
void MSP_EXP430F5438A_initGPIO(void)
{
/* Buttons are active low with pullup resistor */
GPIO_setAsInputPinWithPullUpresistor(GPIO_PORT_P2, GPIO_PIN6);
GPIO_setAsInputPinWithPullUpresistor(GPIO_PORT_P2, GPIO_PIN7);
/* LEDs */
/* LED1 */
GPIO_setAsOutputPin (GPIO_PORT_P1, GPIO_PIN0);
GPIO_setDriveStrength(GPIO_PORT_P1, GPIO_PIN0,
GPIO_FULL_OUTPUT_DRIVE_STRENGTH);
/* LED2 */
GPIO_setAsOutputPin (GPIO_PORT_P1, GPIO_PIN1);
GPIO_setDriveStrength(GPIO_PORT_P1, GPIO_PIN1,
GPIO_FULL_OUTPUT_DRIVE_STRENGTH);
GPIO_setAsOutputPin (GPIO_PORT_P9, GPIO_PIN0);
/* Once GPIO_init is called, GPIO_config cannot be changed */
GPIO_init();
}
Port 9 doesn't configure and the port registers have the default value even if the pins are configured.
same applies for port 10.
port 1-8 are accessible but 9 and 10 doesn't get configured.
Please help me out!
Thanks!
Arslan