OLA: Mapping Uart1 TX and RX to D8 and D9.

Hi,

I am trying to reconfigure TXRX such that Serial1 TX RX is through D8 and D9 - assigned as qwicc SCL and SDA by default. I thought i could do this easily by modifying configureSerial1TxRx() like below:

void configureSerial1TxRx(void) // Configure pins 8 and 9 for UART1 TX and RX

{

am_hal_gpio_pincfg_t pinConfigTx = g_AM_BSP_GPIO_COM_UART_TX;

pinConfigTx.uFuncSel = AM_HAL_PIN_8_UART1TX;

pin_config(PinName(BREAKOUT_PIN_TX), pinConfigTx);

am_hal_gpio_pincfg_t pinConfigRx = g_AM_BSP_GPIO_COM_UART_RX;

pinConfigRx.uFuncSel = AM_HAL_PIN_9_UART1RX;

pinConfigRx.ePullup = AM_HAL_GPIO_PIN_PULLUP_WEAK; // Put a weak pull-up on the Rx pin

pin_config(PinName(BREAKOUT_PIN_RX), pinConfigRx);

}

also

const byte BREAKOUT_PIN_TX = 8;

const byte BREAKOUT_PIN_RX = 9;

and finally

commented out

//TwoWire qwiic(PIN_QWIIC_SDA,PIN_QWIIC_SCL); //Will use pads 8/9

Please let me know if i am missing something.

Thank you for your help.

Hj

Please disregard. This worked exactly as I expected. I just made a mistake wiring my cable - flipflop’d RX and TX. Apologies for the wasteful post. Please remove.

Thank you,

hj

Hi Hj,

No problem. Glad that is working for you.

Best wishes,

Paul