Tool/software: TI-RTOS
I'm using Blink LED GPIO example from ti-processor-sdk-rtos-am57xx-evm-04.00.00.04. It blinks USER_LED0 which is GPIO7_8 (F16). What changes do I need to make to toggle GPIO4_10, pin 7 of header P18.
I've tried changing GPIO_USER0_LED_PIN_NUM and PORT_NUM in 'GPIO_evmAM572x_board.c' to desired pin and port and kept everything same, but it doesn't work. I've also used pinmux tool and added all the files generated by this tool but then I didn't understand how to toggle desired pin.
GPIO_write(index, value) requires index of that pin, I don't know what is index of the desired pin. Basically in my main, I'm doing following.
Board_initCfg boardCfg;
boardCfg = BOARD_INIT_PINMUX_CONFIG |
BOARD_INIT_MODULE_CLOCK |
BOARD_INIT_UART_STDIO;
Board_init(boardCfg);
GPIO_init();
while(1){
GPIO_write(USER_LED0, GPIO_PIN_VAL_HIGH);
AppDelay(DELAY_VALUE);
GPIO_write(USER_LED0, GPIO_PIN_VAL_LOW);
AppDelay(DELAY_VALUE);
}
Please help.
Thanks.