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.

Using IOID_2 as output on cc1310

Other Parts Discussed in Thread: CC1310

Hi All

I'm trying to use IOID_2 as output.

I'm using a empty RTOS project , I can run the LED's on the RF06 Eval board but when I try to toggle IOID2 no joy.

LedState is defined as IOID2

const PIN_Config BoardGpioInitTable[] = {
		Board_DK_LED1    | PIN_GPIO_OUTPUT_EN | PIN_GPIO_LOW   | PIN_PUSHPULL | PIN_DRVSTR_MAX,
		Board_DK_LED2    | PIN_GPIO_OUTPUT_EN | PIN_GPIO_LOW   | PIN_PUSHPULL | PIN_DRVSTR_MAX,
		Board_DK_LED3    | PIN_GPIO_OUTPUT_EN | PIN_GPIO_LOW   | PIN_PUSHPULL | PIN_DRVSTR_MAX,
		Board_DK_LED4    | PIN_GPIO_OUTPUT_EN | PIN_GPIO_LOW   | PIN_PUSHPULL | PIN_DRVSTR_MAX,
		Board_KEY_SELECT | PIN_INPUT_EN  | PIN_PULLUP | PIN_HYSTERESIS,
		    Board_KEY_UP     | PIN_INPUT_EN  | PIN_PULLUP | PIN_HYSTERESIS,
		    Board_KEY_DOWN   | PIN_INPUT_EN  | PIN_PULLUP | PIN_HYSTERESIS,
		    Board_KEY_LEFT   | PIN_INPUT_EN  | PIN_PULLUP | PIN_HYSTERESIS,
		    Board_KEY_RIGHT  | PIN_INPUT_EN  | PIN_PULLUP | PIN_HYSTERESIS,
		    Board_3V3_EN     | PIN_GPIO_OUTPUT_EN | PIN_GPIO_LOW    | PIN_PUSHPULL,
		    Board_LCD_MODE   | PIN_GPIO_OUTPUT_EN | PIN_GPIO_HIGH   | PIN_PUSHPULL,
		    Board_LCD_RST    | PIN_GPIO_OUTPUT_EN | PIN_GPIO_HIGH   | PIN_PUSHPULL,
		    Board_LCD_CSN    | PIN_GPIO_OUTPUT_EN | PIN_GPIO_HIGH   | PIN_PUSHPULL,
		    Board_ALS_PWR    | PIN_GPIO_OUTPUT_EN | PIN_GPIO_LOW    | PIN_PUSHPULL,
		    Board_ACC_PWR    | PIN_GPIO_OUTPUT_EN | PIN_GPIO_LOW    | PIN_PUSHPULL,
		    Board_ACC_CSN    | PIN_GPIO_OUTPUT_EN | PIN_GPIO_HIGH   | PIN_PUSHPULL,
		    Board_SDCARD_CSN | PIN_GPIO_OUTPUT_EN | PIN_GPIO_HIGH   | PIN_PUSHPULL,
			EnableConfig	 | PIN_INPUT_EN       | PIN_PULLUP,
		    StateCount		 | PIN_INPUT_EN       | PIN_PULLUP,
			LedState		 | PIN_GPIO_OUTPUT_EN |  PIN_GPIO_HIGH	| PIN_PUSHPULL| PIN_DRVSTR_MAX,
		PIN_TERMINATE
};
 /* Open LED pins */
    ledPinHandle = PIN_open(&ledPinState, ledPinTable);
    if(!ledPinHandle) {
        System_abort("Error initializing board LED pins\n");
    }
PIN_Config ledPinTable[] = {
    Board_LED0 | PIN_GPIO_OUTPUT_EN | PIN_GPIO_LOW | PIN_PUSHPULL | PIN_DRVSTR_MAX,
    Board_LED1 | PIN_GPIO_OUTPUT_EN | PIN_GPIO_LOW | PIN_PUSHPULL | PIN_DRVSTR_MAX,
	Board_LED2 | PIN_GPIO_OUTPUT_EN | PIN_GPIO_LOW | PIN_PUSHPULL | PIN_DRVSTR_MAX,
	Board_LED3 | PIN_GPIO_OUTPUT_EN | PIN_GPIO_LOW | PIN_PUSHPULL | PIN_DRVSTR_MAX,
	LedState   | PIN_GPIO_OUTPUT_EN | PIN_GPIO_LOW | PIN_PUSHPULL | PIN_DRVSTR_MAX,
	PIN_TERMINATE
};

What am I missing?

Kind regards

Ben

  • Hi Ben,

    Can you let me know what version of TIRTOS are you using? Can you also expand a bit on what are errors (if any) you are seeing? Is PIN_open succeeding and you cannot control the IOID2 pin?

    Regards,
    Gilbert
  • Hi Gilbert
    After some work, I saw that the io pin I want to control falls under the Sensor Controller. Apparently one can control the Sensor Controller from the main controller. but I do not know where to start.. I have downloaded the Sensor Controller studio and had a look at it but I can still not close the loop how I can get the main controller to control the Sensor controller.
    I'm running the latest ti rtos and code composer studio.
    Kind regards
    Ben
  • The Sensor Controller Studio has a lot of abstractions, so it may not be the most helpful in helping you understand how to control the different signals. It looks like IOID_2 is tied to the board's UART RX pin. If you are not using the UART, it should still be able to work, but you have to make sure that you are not calling the UART_init() function. The bottom right of the RF06 board has the UART RX pin broken out but with no header, so minor board modifications may be in order. Alternatively, you can move the bottom XDS100v3 Bypass header down by one to access the pin, so you can do a quick test. If you still are having issues, can you show me a picture of the board setup and how you defined the LedState variable?

    Regards,
    Gilbert
  • Hi Gilbert.

    You are correct the UART is using IOID_2, I'm not using the UART, so yes, I should be able to use the pin but for some reason I can not get the pin to behave as I would like.  We have developed our own board that plugs in to the RF06 board based on the ref design for the cc1310.  We have made a duplicate and brought out IOID2,3 and 8 to the side of the board that is all.8306.itcTest.zip

  • Hi Gilbert
    PICNIC(Problem In Chair Not In Computer) ....... Found the issue. I'm looking at the wrong pin !! All running now.
    Thanx for your support
  • Hi Ben,

    Great to hear it's all working!

    Regards,
    Gilbert