Controlling I.MX6 GPIO pins using MFG Tool

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Controlling I.MX6 GPIO pins using MFG Tool

1,990 Views
chetkaufman
NXP Employee
NXP Employee

My customer wants to control LEDs on their board using the MFG Tool to indicate the status of the firmware image download process.   Is it possible to control GPIO pins from the UCL2.xml file during the installation of the image?   Here is what they want to do:
****

Here are the pins we need to control during the use of the MFG Tool
IMX6UL Products
MX6UL_PAD_GPIO1_IO09__GPIO1_IO09

MX6UL_PAD_JTAG_TDI__GPIO1_IO13

 

IMX6ULL Products

MX6UL_PAD_LCD_DATA01__GPIO3_IO06

MX6UL_PAD_JTAG_TDI__GPIO1_IO13


We want to be able to control these pins from the ucl2.xml file during the installation of the image. 

Yellow - installing

Green - Finished

Red - Error



******

Labels (2)
Tags (2)
7 Replies

1,656 Views
jamesbone
NXP TechSupport
NXP TechSupport

You can try also something like:

<LIST name="SabreSD-SD" desc="USB SDP">

    <CMD state="BootStrap" type="boot" body="BootStrap" file ="u-boot-mx6q-sabresd_nopad.bin" >Loading image</CMD>

    <CMD state="BootStrap" type="jump" > Jumping to image. </CMD>

    <CMD state="Updater" type="push" body="$ echo Load Complete!">Done</CMD>  --- This is the important part.  the UPDATE Command provide the info that the IMAGE has been loaded.  Then you can echo GPIO sysfs.

</LIST>

For more details you can check:

Manufacturing Tool V2 (MFGTool2) Update Command List (UCL) User Guide · codeauroraforum/mfgtools Wik... 

Have a nice day!

1,656 Views
jamesbone
NXP TechSupport
NXP TechSupport

Hello Chet,

,  I understand that you want to turn on/off GPIO and get the notification on the Windows GUI, but  this need to be personalized the RED / GREEN it is not for commands it is for the flashing process, whish it is the objective of MFGTool. This is not control in the  XML file .  This need to be change/modified from the  Windows GUI side, you can download the code from the link that  igorpadykov‌.  In his last reply.

Have a nice weekend/holiday!

saludos,

Jaime

0 Kudos
Reply

1,656 Views
igorpadykov
NXP Employee
NXP Employee

Hi Chet

since mfg tool is just small linux image, one can try to enable gpio sysfs

as in ordinary linux, for example

GPIO (Linux) 

and use echo command as in example from ucl2.xml:

    <CMD state="Updater" type="push" body="$ echo Update Complete!">Done</CMD>

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
Reply

1,656 Views
chetkaufman
NXP Employee
NXP Employee

Thanks Igor!  The customer has one more question, can you answer it?

****

Hello Chet,

 

Thanks for getting me the information quickly. I greatly appreciate it. It looks like one of the three options should work.

 

The only thing I don't understand is how do I know when the MFG Tool has failed. Using the mfgtool it appears that once a command fails a signal/message is sent back to the MFG Tool. The MFG Tool aborts the process and turns the GUI status bar red. This would be the same signal/message I would need to monitor in order to turn the LED red. What signal/message would I need to monitor in order to know when a command failed and I 

should illuminate the red LED?

*****

0 Kudos
Reply

1,656 Views
igorpadykov
NXP Employee
NXP Employee

Hi Chet

I am afraid there is no way for mfg tool to know that command failed.

In general customer can customize tool according to needs using sources:

https://github.com/codeauroraforum/mfgtools

Best regards
igor

0 Kudos
Reply

1,656 Views
chetkaufman
NXP Employee
NXP Employee

Igor,

   The MFG Tool must know whether the programming passed or failed, because on the PC screen there is a status that turns green when the programming passed or red if the programming failed.   The customer is asking what registers in the MFG Linux image on the i.MX6 need to be monitored to get this status at the board level as well?    

0 Kudos
Reply

1,656 Views
igorpadykov
NXP Employee
NXP Employee

Hi Chet

in general this depends on what do you mean by "programming passed or failed" expression.

Right: "red if the programming failed" means linux command error -
(return code), however in case of gpio sysfs (if it was correctly enabled in image) it will
always return success. Also it does not verify or checks (read back) pin output value.

Best regards
igor

0 Kudos
Reply