Copyright © https://mongoose-os.com

Mongoose OS Forum

frame
ATTENTION! This forum has moved to:

https://community.mongoose-os.com

Do not post any new messages.

How about making the UART pin usage configurable?

I spent most of today trying to use the UART 1 on my custom CC3200 board to connect to a sensor. After giving up my attempts to get this working I found that mongoose-os has the UART 1 pins hardcoded to some other pins than the ones I use (of course).

If this had been I2C, I could have specified some other pins to use in the mos.yml file. Why don't you add the same possibility for specifying which UART pins to use, at least for UART 1?

Comments

  • For I2C we have generic GPIO-based implementation, it works slower than the hardware implementation but should work basically everywhere and on any GPIO pins. For UART, we don't yet have GPIO-based implementation, that's why we can't make pins fully configurable.

  • ulsoulso Stockholm

    I got it working by modifying the file cc32xx_uart.c like this:

    //    MAP_PinTypeUART(PIN_07, PIN_MODE_5); /* UART1_TX */
    //    MAP_PinTypeUART(PIN_08, PIN_MODE_5); /* UART1_RX */
        MAP_PinTypeUART(PIN_01, PIN_MODE_7); /* UART1_TX */
        MAP_PinTypeUART(PIN_02, PIN_MODE_7); /* UART1_RX */
    
Sign In or Register to comment.