GPIO 7, 8 and 11 configuring error

Hi all,

When I tried to configure all the 12 GPIOs as Triggers IO 7, 8 and 11 fails. But if I try it again those pins get configured as well. I have change default operation to GPIO on those Pins using spc(). How can I get this to work on the first go because I don’t want to add error checking on configurations to monitoring loop which runs all the time after configuration. If I add configuration check and reconfigure commands to endless loop it will reduce the efficiency of my application.
Thank you
Asiri

Here the output put of configuration of
IO 1 set err = 1
IO 2 set err = 1
IO 3 set err = 1
IO 4 set err = 1
IO 5 set err = 1
IO 6 set err = 1
IO 7 set err = 0
IO 8 set err = 0
IO 9 set err = 1
IO 10 set err = 1
IO 11 set err = 0
IO 12 set err = 1

/* IO.SC - This basic script shows how to set up and use IO1

  • Functions exercised - io, prtf & dlys.
    */

main()
{
int io_err_1,io_err_2,io_err_3,io_err_4,io_err_5,io_err_6,io_err_7,io_err_8,io_err_9,io_err_10,io_err_11,io_err_12;
prs(0);

/*Disableing default operation of IO pin */
spc(0,0);
spc(1,0);
spc(2,0);
spc(3,0);	
spc(4,0);
spc(5,0);
spc(6,0);

	
io_err_1  = io(3,"IO1",1);  /* set IO1  for Trigger */
io_err_2  = io(3,"IO2",1);  /* set IO2  for Trigger */
io_err_3  = io(3,"IO3",1);  /* set IO3  for Trigger */
io_err_4  = io(3,"IO4",1);  /* set IO4  for Trigger */
io_err_5  = io(3,"IO5",1);  /* set IO5  for Trigger */
io_err_6  = io(3,"IO6",1);  /* set IO6  for Trigger */
io_err_7  = io(3,"IO7",1);  /* set IO7  for Trigger */
io_err_8  = io(3,"IO8",1);  /* set IO8  for Trigger */
io_err_9  = io(3,"IO9",1);  /* set IO9  for Trigger */
io_err_10 = io(3,"IO10",1); /* set IO10 for Trigger */
io_err_11 = io(3,"IO11",1); /* set IO11 for Trigger */
io_err_12 = io(2,"IO12",1); /* set IO12 for Trigger */

prtf("\r\n\r\n");
prtf("IO  1 set err = %d\n", io_err_1);
prtf("IO  2 set err = %d\n", io_err_2);
prtf("IO  3 set err = %d\n", io_err_3);
prtf("IO  4 set err = %d\n", io_err_4);
prtf("IO  5 set err = %d\n", io_err_5);
prtf("IO  6 set err = %d\n", io_err_6);
prtf("IO  7 set err = %d\n", io_err_7);
prtf("IO  8 set err = %d\n", io_err_8);
prtf("IO  9 set err = %d\n", io_err_9);
prtf("IO 10 set err = %d\n", io_err_10);
prtf("IO 11 set err = %d\n", io_err_11);
prtf("IO 12 set err = %d\n", io_err_12);

prtf("\r\n\r\n");	
dlys(3);

while(1)
{
	/* IO 1 */
	if ( io(0,"IO1",0) )  /* if IO1 is asserted… */
	{
		/* here if output is asserted */
		io_err_1 = io(1,"IO1",0); /* negate IO1 output */

		prtf("In IO-1   = 1 if, io_err_1  = %d\n", io_err_1);
	}
	else
	{
		io_err_1 = io(1,"IO1",1); /* assert IO1 output */
		prtf("In else IO-1  = 0, io_err_1  = %d\n", io_err_1);
	}

	/* IO 2 */
	if ( io(0,"IO2",0) )  /* if IO2 is asserted… */
	{
		/* here if output is asserted */
		io_err_2 = io(1,"IO2",0); /* negate IO2 output */

		prtf("In IO-2   = 1 if, io_err_2  = %d\n", io_err_2);
	}
	else
	{
		io_err_2 = io(1,"IO2",1); /* assert IO2 output */
		prtf("In else IO-2  = 0, io_err_2  = %d\n", io_err_2);
	}

	/* IO 3 */
	if ( io(0,"IO3",0) )  /* if IO3 is asserted… */
	{
		/* here if output is asserted */
		io_err_3 = io(1,"IO3",0); /* negate IO3 output */

		prtf("In IO-3   = 1 if, io_err_3  = %d\n", io_err_3);
	}
	else
	{
		io_err_3 = io(1,"IO3",1); /* assert IO3 output */
		prtf("In else IO-3  = 0, io_err_3  = %d\n", io_err_3);
	}

	/* IO 4 */
	if ( io(0,"IO4",0) )  /* if IO4 is asserted… */
	{
		/* here if output is asserted */
		io_err_4 = io(1,"IO4",0); /* negate IO4 output */

		prtf("In IO-4   = 1 if, io_err_4  = %d\n", io_err_4);
	}
	else
	{
		io_err_4 = io(1,"IO4",1); /* assert IO4 output */
		prtf("In else IO-4  = 0, io_err_4  = %d\n", io_err_4);
	}

	/* IO 5 */
	if ( io(0,"IO5",0) )  /* if IO5 is asserted… */
	{
		/* here if output is asserted */
		io_err_5 = io(1,"IO5",0); /* negate IO5 output */

		prtf("In IO-5   = 1 if, io_err_5  = %d\n", io_err_5);
	}
	else
	{
		io_err_5 = io(1,"IO5",1); /* assert IO5 output */
		prtf("In else IO-5  = 0, io_err_5  = %d\n", io_err_5);
	}

	/* IO 6 */
	if ( io(0,"IO6",0) )  /* if IO6 is asserted… */
	{
		/* here if output is asserted */
		io_err_6 = io(1,"IO6",0); /* negate IO6 output */

		prtf("In IO-6   = 1 if, io_err_6  = %d\n", io_err_6);
	}
	else
	{
		io_err_6 = io(1,"IO6",1); /* assert IO6 output */
		prtf("In else IO-6  = 0, io_err_6  = %d\n", io_err_6);
	}

	/* IO 7 */
	if ( io(0,"IO7",0) )  /* if IO7 is asserted… */
	{
		/* here if output is asserted */
		io_err_7 = io(1,"IO7",0); /* negate IO7 output */

		prtf("In IO-7   = 1 if, io_err_7  = %d\n", io_err_7);
	}
	else
	{
		io_err_7 = io(1,"IO7",1); /* assert IO7 output */
		prtf("In else IO-7  = 0, io_err_7  = %d\n", io_err_7);
	}

	/* IO 8 */
	if ( io(0,"IO8",0) )  /* if IO8 is asserted… */
	{
		/* here if output is asserted */
		io_err_8 = io(1,"IO8",0); /* negate IO8 output */

		prtf("In IO-8   = 1 if, io_err_8  = %d\n", io_err_8);
	}
	else
	{
		io_err_8 = io(1,"IO8",1); /* assert IO8 output */
		prtf("In else IO-8  = 0, io_err_8  = %d\n", io_err_8);
	}

	/* IO 9 */
	if ( io(0,"IO9",0) )  /* if IO9 is asserted… */
	{
		/* here if output is asserted */
		io_err_9 = io(1,"IO9",0); /* negate IO9 output */

		prtf("In IO-9   = 1 if, io_err_9  = %d\n", io_err_9);
	}
	else
	{
		io_err_9 = io(1,"IO9",1); /* assert IO9 output */
		prtf("In else IO-9  = 0, io_err_9  = %d\n", io_err_9);
	}

	/* IO 10 */
	if ( io(0,"IO10",0) )  /* if IO10 is asserted… */
	{
		/* here if output is asserted */
		io_err_10 = io(1,"IO10",0); /* negate IO10 output */

		prtf("In IO-10  = 1 if, io_err_10 = %d\n", io_err_10);
	}
	else
	{
		io_err_10 = io(1,"IO10",1); /* assert IO10 output */
		prtf("In else IO-10 = 0, io_err_10 = %d\n", io_err_10);
	}

	/* IO 11 */
	if ( io(0,"IO11",0) )  /* if IO11 is asserted… */
	{
		/* here if output is asserted */
		io_err_11 = io(1,"IO11",0); /* negate IO11 output */

		prtf("In IO-11  = 1 if, io_err_11 = %d\n", io_err_11);
	}
	else
	{
		io_err_11 = io(1,"IO11",1); /* assert IO11 output */
		prtf("In else IO-11 = 0, io_err_11 = %d\n", io_err_11);
	}

	/* IO 12 */
	if ( io(0,"IO12",0) )  /* if IO12 is asserted… */
	{
		/* here if output is asserted */
		io_err_12 = io(1,"IO12",0); /* negate IO12 output */

		prtf("In IO-12  = 1 if, io_err_12 = %d\n", io_err_12);
	}
	else
	{
		io_err_12 = io(1,"IO12",1); /* assert IO12 output */
		prtf("In else IO-12 = 0, io_err_12 = %d\n", io_err_12);
	}
	prtf("\r\n");	
	dlys(4);
}

}