3 Replies Latest reply on Nov 25, 2015 10:38 AM by PabloM_Intel

    Disabling UART pins on Yocto

    geotheory

      I have an Edison project based on the small red Sparkfun Blocks.  I'm trying to implement a script that runs on startup and controls LEDs attached to pins GP129 - GP131.  The startup script runs ok.  GP129 works fine.  The other two pins (also labelled TX and RX) are overridden on startup, which I assume is because they're UART pins.  When I run the script manually after startup it functions fine so I know the script is ok.

       

      Is there any way to prevent pins GP130 (TX) and GP131 (RX) from activating as UART going to high by default on startup?  Thanks in advance

        • 1. Re: Disabling UART pins on Yocto
          PabloM_Intel

          Hi geotheory,

           

          As you pointed out, the pins behave different at startup because some of them are shared by different interfaces, and this what’s causing the override. What you can do is to write a service script that runs your code, the services are run at startup if you configure them to behave this way. Check at this thread for some more information on writing scripts Startup scripts on Edison.

           

          Regards,

          PabloM_Intel

          • 2. Re: Disabling UART pins on Yocto
            geotheory

            Thanks for the advice Paolo.  I had in fact created an update-rc.d service to start the script (creating folder `/etc/init.d` containing script `startup.sh` and adding it to the daemon with `update-rc.d startup.sh defaults 99`.  Any idea what the difference is between that and the systemd method in your link?

             

            By the way in the end I managed a workaround to get the pins responding by simply delaying the script for 10s, giving time for the default processes to complete..

            • 3. Re: Disabling UART pins on Yocto
              PabloM_Intel

              Hi geotheory,

               

              It’s a matter of how services are controlled. In Edison, most services are functional with systemd and just a few services are functional with init.d, while on Galileo it is recommended to use init.d.

              It is good to know that you already found a workaround for your issue.

               

              Regards,

              PabloM_Intel