I made an experiment with the uart_set_pin and figured out that even the pins are the direct ones they are still routhed through the GPIO matrix. I explisitly should do the following to acomplish this:
Let say I want to use UART2:
so
if the Pin is input:
Code: Select all
gpio_iomux_out(16, FUNC_GPIO16_U2RXD, 0);
gpio_iomux_in(16, U2RXD_IN_IDX);
Code: Select all
gpio_iomux_out(17, FUNC_GPIO17_U2TXD, 0);
Code: Select all
uart_set_pin(2, UART_PIN_NO_CHANGE, UART_PIN_NO_CHANGE, UART_PIN_NO_CHANGE, UART_PIN_NO_CHANGE);
Code: Select all
buscfg.flags = SPICOMMON_BUSFLAG_NATIVE_PINS;
Code: Select all
gpio_iomux_out() & gpio_iomux_in()