Announcement

Collapse
No announcement yet.

gen4-PA Serial Bus Contention

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • gen4-PA Serial Bus Contention

    While changing displays for our host controller from uLCD-43DT to gen4 50D CLB via gen4-PA, the serial port communication worked fine from the display to the host. However, the 50D was unable to receive any information from the host. Swapping around all combinations of two hosts, two 43DT's and two 50D's, as well as both ribbon cables and both gen4-PA's verified that the problem is consistent and repeatable. Further probing with the scope exposed the problem.

    The Host TX to Display RX signal looked great, until the display was powered up from the host. After that, it would only swing voltages from 3.5v to about 2.0v. Obviously, an argument broke out on the bus.

    Looking at the PA design and schematic, tt became apparent that it would work fine powering the host from the microUSB cable. But powering the PA and thus, the 50D from the host also powers up the CP2104 USB interface chip. Once that powered, the host is no longer able to override the now enabled TX output from the CP2104 chip. This put the utility of the gen4-PA as a breakout for breadboarding on hold. So what am I missing here?

    How can I turn off the CP2104 chip while testing my host with the new gen4-DT display? Our host has the power supplies, battery, charger, regulators, etc. from which we power the display under host software control.

    I have two PA's and may have to butcher one up for testing and another for display programming. An Eagle board file may help on where to add a movable power jumper - one position for programming (power from USB to display and CP2104) and another for host power (to test host/display only). Or if you have any alternative ideas, I am all ears.

    I don't want to defeats the documentation warning about multiple connect/disconnect cycles with the FFC cable and connectors. Unfortunately, the 50D will need some programming changes due to the jump in pixles over the 43DT. Any ideas?

    Thanks, Scott
    Scott

  • #2
    This would not be much of a problem if we did not already have a system developed around the uLCD-43DT and have all of the GPIO pins already allocated to inputs and SPI. No pins available to use a different RX1-3 port. But the gen4 CLB super slim packaging gave us the urge to upgrade (saves custom designed display) before completing our prototypes. Also, being able to program both host and display during production from a single port by selectively powering subsystems we really want to keep. So for our application, we are really need to keep host/program UART on the RX0 pin.

    Reading the CP2104 docs, I could not find a way via USB software driver to switch off the chip. Next best is probably a enhanced MOSFET switch to power the CP2104 only from the USB and still feed the display for programming. A simple Shottky diode would isolate the display/host 5v supply but put programing display power dangerously close to 4.5v. The jumper mentioned in the our previous post is simple if I could see where to put it. And lifting the CP2104 power pin for testing is still better than reworking our hardware and software just to test this new packaging.

    Any suggestions appreciated.
    Scott
    Scott

    Comment


    • #3
      Hi Scott

      Sorry for the delayed reply.

      You are right and powering the PA will also power the CP2104 which means it 'hogs' the RX0/TX0 pins of the Diablo, which is unfortunate if you wish to use those to go to something else during development. Typically the RX0/TX0 in this situation would be dedicated to programming and the 1-3 ports from GPIO would be used for your host, but you said those are already utilised, so it makes that somewhat tricky.

      There is not even a very nice place on the gen4-PA to cut the track to allow the CP2104 to stay off, while letting the USB and/or 5V pin power up just the display.

      However R5 and R6 resistors go between the CP2104 and the display, but there is a direct connection between display and RX/TX pins on the PA itself. So I guess you could remove these two resistors, which would essentially disable the CP2104 from touching the bus, and program the display via the RX/TX pins via your breadboard using a uUSB-PA5 or Programming Cable. You could remove R4 too if that causes problems with the reset line.

      Its not a very elegant solution I am sorry, but at least removing 2 (or 3) resistors from the PA should get you going again.

      I will review this all tomorrow (Monday) and see if there is an improvement we can make to the gen4-PA in the future, or maybe even replace the gen4-IB board with something that breaks out all pins instead of just the 5 programming ones alone.

      Let me know how you go

      Regards
      James

      Comment


      • #4
        Hi James,

        Thanks for the weekend reply. You have a good idea I missed. Actually, we only need to disable the Tx output; the Rx would still be an input, even if active. Seems we don't need to cut the board (I couldn't find a place either). Yet putting jumper pins in place of R5, and actually placing the resistor on the jumper might just work. Very simple. But the 0402(?) resistor is really giving the dexterity a run.

        Having a gen4-IB interface to a breakout board might work better (lower insertion force than microUSB) but more do-dads on the bench to cross wires with. A disabling jumper might work more easily as the microUSB could remain connected. I really like the breakout board the way it already is, except for disabling Tx. Even a push on / push off switch (with LED indicator!?) would work. Anything to keep wiggling during change-over to a minimum.

        Auto recognition of the USB power works great - already using this for the program/test cycles on the host audio/RF board. All I do is use a Sabrient 2A Powered Hub with individual power switches for each port. One push on / push off button does the change-over

        I'll put some more thought to it also, while playing with R5 and let you know how it works out

        Thanks, again
        Scott
        Scott

        Comment


        • #5
          Ok James.

          All is well. Removing R5 and everything started working just fine. But the 0402's are just too tight together to get any sort of jumper in there for use when programming.

          So let's keep it even more simple. I just unsolder the UART 5 pin cable from our host to the gen4-PA and replace with a 5 pin header from the uLCD-43DT setup. We unplug the host anyway during programming; might as well pull it from the breakout board. It is easier on the wiring than the microUSB (insertion force wise).

          Summarizing, to make the gen4-PA useful to those of us using gen4 display TX0/RX0 for host (or any other) UART interconnect:
          - Just remove R5 from the PA wich disables microUSB access (and bus contention), and install a header where the UART wires connect (adjacent to the microUSB connector).
          - Disconnect UART cable when programming and use a uUSB-PA5(II) at the header to program as before. Reconnect when done, and test.

          The best solution seems to be to allow a simple 2 pin jumper disconnect of power from the CP2104 so the microUSB can be used during programming (for those who do not have a PA5 available. R5 remains. Click image for larger version

Name:	Modified gen4-PA.png
Views:	126
Size:	63.0 KB
ID:	54006


          Let me know if you found any ideas.

          Thanks,
          Scott
          Last edited by Passionate Jaguar; 28th August 2016, 06:32 PM.
          Scott

          Comment


          • #6
            Hi Scott

            Good stuff, thanks for the feedback.

            Another option is, change the resistor to be 1K. it will get overpowered and not even really be a factor.
            Should work well.
            James

            Comment


            • #7
              Hi James,

              Will the CP2104 still program the display properly with R5 at 1K? If so, that would be great.

              Thanks,
              Scotgt
              Scott

              Comment


              • #8
                Hi Scott

                The 1K will allow you to still program yes, but will be overpowered when the UART is used to your host as that is a direct connection. CP2104 will be pulling the R5 high basically with the 1K resistor while your host is talking direct, so it shouldn't affect your host comms at all. You will obviously still need to disconnect your host when you program the display though via the CP2104, but just means you don't have to un-jumper R5 etc.
                James

                Comment


                • #9
                  Hi James,

                  Thanks. I will give that a run. That would solve all challenges.

                  Scott
                  Scott

                  Comment


                  • #10
                    Originally posted by James_4DSystems View Post
                    Hi Scott

                    Sorry for the delayed reply.

                    You are right and powering the PA will also power the CP2104 which means it 'hogs' the RX0/TX0 pins of the Diablo, which is unfortunate if you wish to use those to go to something else during development. Typically the RX0/TX0 in this situation would be dedicated to programming and the 1-3 ports from GPIO would be used for your host, but you said those are already utilised, so it makes that somewhat tricky.

                    There is not even a very nice place on the gen4-PA to cut the track to allow the CP2104 to stay off, while letting the USB and/or 5V pin power up just the display.

                    However R5 and R6 resistors go between the CP2104 and the display, but there is a direct connection between display and RX/TX pins on the PA itself. So I guess you could remove these two resistors, which would essentially disable the CP2104 from touching the bus, and program the display via the RX/TX pins via your breadboard using a uUSB-PA5 or Programming Cable. You could remove R4 too if that causes problems with the reset line.

                    Its not a very elegant solution I am sorry, but at least removing 2 (or 3) resistors from the PA should get you going again.

                    I will review this all tomorrow (Monday) and see if there is an improvement we can make to the gen4-PA in the future, or maybe even replace the gen4-IB board with something that breaks out all pins instead of just the 5 programming ones alone.

                    Let me know how you go

                    Regards
                    HI.

                    Some years later I have the same problem. I solved it removing R5 and R6, but It's not a very elegant solution.

                    I have to remove the resistors in 50 modules. Could there be another solution?
                    ( I can't use others GPIOs becasuse I'm using all )

                    Best regards.

                    Comment

                    Working...
                    X