6 Replies Latest reply on Jun 18, 2015 3:24 PM by JacobT_81

    Mux'ing HCI UART and Peripheral UART for file transfer

      Hello,

       

      We're developing a new board and I would like to transfer data from the BCM20737S to a host computer over USB.

       

      I understand that the HCI UART, when in application mode (not programming mode) still can't be used for 2-way communication with the host.  So for my file transfer application, I wouldn't be able to send an acknowledge from the host to the BCM20737S to tell it the data was received ok, if using the the HCI UART.

       

      On the TAG3 board, the FT2232 device is used to route both the HCI UART and the Peripheral UART out through USB.  However, my issue with the FT2232 device is that's it's huge!  All the space I've saved from using the BCM20737S would be lost if I used this device. 

       

      As an alternative, could you simply use an analog mux such as an NXP 74HC_HCT4052 to choose between routing out the HCI UART or the peripheral UART?  This would allow a smaller single channel FTDI USB-UART device, such as the FT231XQ to be used.  The select signal for the mux would be the same one used to set the polarity of HCI_UART_RX on power up (which is used to set programming mode or application mode).

       

      Does anyone foresee any issues with this setup?

       

      Are there plans to apply some kind of patch to allow the HCI UART to be used for 2-way communication with a host when in application mode? 

        • 1. Re: Mux'ing HCI UART and Peripheral UART for file transfer
          MichaelF_56

          Note that the HCI UART only supports the programming of the part, nothing more, regardless of if it is in programming or application mode.  You can use the PUART or SPIFFY2 (secon, lower speed SPI port) for data transfers.

           

          If a PC is on the other end, would a USB to Serial cable be an option, or does the UART switching logic need to reside on the custom board?

           

          I'm not sure if any of the other customer on the forum have experience using an analog mux with the two UARTs.

           

          davida_06

          • 2. Re: Mux'ing HCI UART and Peripheral UART for file transfer

            Thanks for clarifying the operation of the HCI UART.

             

            SPIFFY2 is going to be used for Flash memory, so I do need to use the PUART.

             

            We need to have the USB connector on the board, so I am going to go down the route of mux'ing the HCI UART and PUART.  The HCI UART will only be used during debug and factory programming.  The end user, our customers, will never use it.

             

            Would you mind glancing over my GPIO assignments to make sure I've followed all the rules?

             

            SPI

            P24   SPI_CLK

            P38   SPI_MOSI

            P25   SPI_MISO

            P28   SPI_CS

             

            Peripheral UART

            P33  PUART_RX

            P32  PUART_TX

             

            Push Button GPIO Inputs

            P0     SWITCH0

            P1     SWITCH1

            P2     SWITCH2

            P3     SWITCH3

            P4     SWITCH4

             

            ADC

            P11   ADC_INPUT

             

            GPIOs Used in Power Circuitry

            P15   PWR_HOLD

             

            Sensor Interrupt

            P12    Sensor Interrupt

            • 3. Re: Mux'ing HCI UART and Peripheral UART for file transfer
              MichaelF_56

              Unfortunately, we have not tried to use an analog mux internally to seperate the two UARTs and the associated USB to serial conversion signal paths, so we will not be able to provide much guidance in this area.

               

              Note that we do use a different USB to Serial device from Silicon Labs on the WICED Sense product (uses a 20737S module). We selected that device for WICED Sense because of the size.

               

              I believe there are links to the device drivers for that device, along with the design files here in the WICED Sense Table of Contents

              • 4. Re: Mux'ing HCI UART and Peripheral UART for file transfer
                JacobT_81

                lewisallison

                 

                Taking a look at your pin configuration, it seems there is a problem with your SPIFFY2 SPI_CS pin. According to  WICED Smart Hardware Interfaces , using P28 for the CS line is contraindicated. This shouldn't be too big of an issue, it can easily be swapped with another.

                 

                All other pins look good--no double-bonded issues, ADC is allowed, etc.

                 

                Jacob

                • 5. Re: Mux'ing HCI UART and Peripheral UART for file transfer

                  Hi Jacob,

                   

                  Thanks very much for checking the pins over.  I'm intending to use SPIFFY2 in master mode for external flash storage to log data. In master mode, I was under the impression that any pin could be used for CS.  I can't see anything about P28 not being allowed.  Can you confirm??   PCB layout will finish this week, so this might be a timely catch!

                  • 6. Re: Mux'ing HCI UART and Peripheral UART for file transfer
                    JacobT_81

                    My apologies, I assumed slave operation. There shouldn't be any problem using p28 as CS in the master role given that it, then, utilizes the generic GPIO driver API. Your pin configuration should be good to go.

                     

                    Jacob