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.

assertion failure in GPIOTiva.c

While I debugging a TIRTOS project I find that every time I run the debugger it will halt at the GPIO_write() fun. in the file GPIOTiva.c. 

And it give me a message like:

[Cortex_M3_0] xdc.runtime.Main: "gpio/GPIOTiva.c", line 616: assertion failure
xdc.runtime.Error.raise: terminating execution

what should I do?

void GPIO_write(unsigned int index, unsigned int value)
{
unsigned int key;
uint32_t output;
PinConfig *config = (PinConfig *) &GPIOTiva_config.pinConfigs[index];

Assert_isTrue(initCalled && index < GPIOTiva_config.numberOfPinConfigs,
NULL);
Assert_isTrue((GPIOTiva_config.pinConfigs[index] & GPIO_CFG_INPUT) ==
GPIO_CFG_OUTPUT, NULL);                                                                                                      <==================    line 616  

key = Hwi_disable();

/* Clear output from pinConfig */
GPIOTiva_config.pinConfigs[index] &= ~GPIO_CFG_OUT_HIGH;

if (value) {
output = config->pin;

/* Set the pinConfig output bit to high */
GPIOTiva_config.pinConfigs[index] |= GPIO_CFG_OUT_HIGH;
}
else {
output = value;
}

thanks!