4 Replies Latest reply on May 13, 2019 1:50 AM by Jan Cumps

    PI race condition prevents startup

    colporteur

      G'Day,

      I have a Pi 3B+ connected to an interface board developed in this RoadTest Review New Year's Grab Bag RoadTest - Review The interface board has its own 3VDC and 5VDC power supplies. If the interface board is powered up before the Pi, the Pi will refuse to start. It starts but I never get network capabilities.  If the Pi is powered up first, bothe the Pi and the interface board operate as designed.

       

      The caveat is, I have one Pi that works without the needed the power sequence and another that will only function if the power is applied in the sequence. I have another half dozen Pi's I can try to see what happens but before that I thought it be nice to white board the issue.

       

      I am "napkin developing" a strategy for investigating and was hoping for some community insight and experiences. COmmentary in the past has enabled me to solve other problems I have posted relatively fast.  I'm thinking this might be a power issue. The Pi power supply is being loaded by the interface board on power up causing it to fail boot. How could I see this on the Pi?  I'm in the infancy of testing at the moment so what to look for and where to look would be of value.

       

      Mother's Day supper is starting so I will have to sign-off. I'm hoping I provided sufficient information to start the discussion.

      Sean

        • Re: PI race condition prevents startup
          shabaz

          Hi Sean,

           

          This kind of behavior sometimes happens if some (say) GPIO pin is accidentally being fed with a voltage when the processor card (Pi in this case) is unpowered. What happens is that there could be a couple of protection diodes on the I/O pad inside the chip, for some small bit of ESD or overload protection, and one diode goes to the positive supply for the chip, and the other goes to ground. Ordinarily the diodes do not conduct, but if the processor is unpowered so that the supply rail is at a low voltage, then the diode will conduct if there is a positive voltage on the I/O pin, causing the supply rail to be pulled up and either fully starting the processor, or causing awkwardness with its reset or partial startup. I can't be sure if this is occurring with the Pi (I don't know what the I/O pins look like internally), but other processors do have such diodes, and would do this.

          So, it is worth checking, with the Pi disconnected, are any of the pins high when just the interface board is powered up? And if so, can that pin source any significant current? (use something like a 100 ohm resistor on that pin to ground, and see if the voltage remains high). If that's the case, then that part of the interface board circuit needs examining (it could be some chip-enable or direction pin to a chip is not pulled via a resistor to the disabled or input state).

          If this is the thing causing the issue, then the explanation why one Pi works, is that either the chip-enable or direction pin happens to float in the right direction, or the protection diode could be damaged.

           

          Another thing that sometimes causes such weird behavior, (again not sure with the Pi, since I'm not so familiar with this hardware in detail) is if some pins on the header serve a double-purpose as boot selection pins. In that case, the processor wants those pins in a certain level to boot correctly. Any different logic levels there during startup could cause the processor not to start up. This too can be resolved in the same way as mentioned above, i.e. scan for any pins high with the Pi disconnected.

          3 of 3 people found this helpful
            • Re: PI race condition prevents startup
              colporteur

              G'Day,

              Much appreciate you sharing your insight.

               

              I'm not sure if my circuit design suffers from the weakness you suggest. I haven't done field samples only napkin research. The GPIO outputs are each connected to a Bi-directional level converter. I have included a schematic but I am not sure if this is the actual silicon or not. I purchased 8 channel modules from a distributor. https://www.banggood.com/8-Channel-Logic-Level-Translator-Converter-Bi-Directional-Module-p-1023173.html?gmcCountry=CA&c…   No schematic provided so I culled this from the internet. Examining the PCB's the circuit looks very similar.

              level converter

              The DC power for the module does not come from the Pi but rather from buck boost boards connected to a 12VDC source.  If I follow your train of thinking, yes the pin (TX_LV) connected to a GPIO point would be high as soon as the buck boost modules provide power to the interface board.

               

              Do you have any suggestions on how to isolate the interface power from the Pi? I'm thinking maybe my design is flawed and the LV supply should actually come from the Pi? I had rather hoped to not use any Pi resources to enable the interface board.

               

              Sean

                • Re: PI race condition prevents startup
                  shabaz

                  Hi Sean,

                   

                  It could be those, although each TX_LV (assuming it is connected that way around, and not accidentally the TX_HV pin) in theory would only be providing a fraction of a milliamp perhaps, there are lots of them, so it all adds up.

                  It could be easy to test, by unplugging all of those modules, and trying to start up the Pi. If that works, slowly add the modules and see if it fails on a particular one, or on a particular quantity.

                  Once that is determined, if it is the case, then yes powering from the Pi's 3.3V supply would solve it.

                  It may be something else though, so it's worth temporarily unplugging them and trying adding them one at a time or  swapping them, to see if the problem goes away at some quantity or some particular module or some position of the module on the board.

                  Regarding isolation, currently it is level conversion that is still only separated by the pins of the MOSFET. For true isolation, then that needs a separate supply (could be derived from an isolated DC-DC converter) but also something like a digital isolator IC (several manufacturers make these). There's nothing wrong with level conversion, it depends on the use-case if that is sufficient. Regarding isolated interface power, if you do want it isolated (although as mentioned this is only partial, since the I/O pins are not isolated, just level translated) then the easiest way is to use an isolated DC-DC converter module.

                  I've just been working on an isolated circuit, I used a DC-DC converter. In my case it was REE-0505SREE-0505S, which gives me an isolated 5V supply (I didn't need 3.3V for my use-case), it internally has a transformer.

                  2 of 2 people found this helpful
              • Re: PI race condition prevents startup
                Jan Cumps

                There’s a term for that symptom: latch-up.