3 Replies Latest reply on Jun 28, 2015 9:14 PM by nasac_2167841

    BCM94390 GPIO Usage

      Hi,

      I'd like to know if UART4_RX(P34) and UART4_TX(P33) can be used as GPIO.

       

      I'm looking into BCM94390 platform.c and platform.h as there is no datasheet or Port Map in the Broadcom site.

      In platform.h, UART4 is decribed as following.

         [WICED_UART_4] = /* this uart resides in wlan core */

          {

              .port    = UART4,

              .tx_pin  = &platform_gpio_pins[WICED_PERIPHERAL_PIN_7],

              .rx_pin  = &platform_gpio_pins[WICED_PERIPHERAL_PIN_8],

              .cts_pin = NULL,

              .rts_pin = NULL,

          }

      and WICED_PERIPHERAL_PIN_7 is defined as PB12 and WICED_PERIPHERAL_PIN_8 as PB13.

      It looks that PB12 and PB13 can be defined as GPIO, but the comments are written as UART2_TX and UART2_RX.

       

      Can you clear me if this P33 and P34 can be used as GPIO or not?

        • 1. Re: BCM94390 GPIO Usage

          Yes,,

           

          These pins can be used as GPIO's, by default the development board needs some UART TX/RX for its console prints, Since these pins are availbale on the board header they chose these pins for UART,

           

          To use these pins as normal GPIO you should comment out this section in the platform.c file

           

          #ifndef WICED_DISABLE_STDIO
              /* Initialise UART standard I/O */
              platform_stdio_init( &platform_uart_drivers[STDIO_UART], &platform_uart_peripherals[STDIO_UART], &stdio_config );
          #endif
          

           

          Which initializes the Pins as UART pins,

           

          After this you can use these Pins as just any normal GPIO.

          • 2. Re: BCM94390 GPIO Usage

            I remember there are some issues with using PB* pins as GPIO on 4390.

            You had better get confirm from Broadcom.

            • 3. Re: BCM94390 GPIO Usage

              The only issue is lack of interrupt support. But otherwise they can be used as regular GPIOs