Using Mfg_tool to flash at QuadSPI1 interface

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

Using Mfg_tool to flash at QuadSPI1 interface

Jump to solution
5,083 Views
BlueJay
Contributor III

Hello,

I want to use the Mfg_tool (Rel. 1.0.1) to download an SW binary with a simply blinking LED into 4SPI flash device which is connected at 4SPI1 interface of Vybrid VF65xx but sofar all tryings are failed.

What should be set exactly in ucl2.xml to be able to do it ?

This was the last settings I tried with, but without any success:

<LIST name="vybrid-qspi-led" desc="Boot Vybrid FW">
<CMD state="BootStrap" type="boot" body="BootStrap" file="u-boot.imx">Loading U-boot</CMD>
<CMD state="BootStrap" type="jump"> Jumping to OS image. </CMD>
<CMD state="Updater" type="push" body="qspiinit dev=0">Initializing QSPI</CMD>
<CMD state="Updater" type="push" body="pipeqspi addr=0x50000000" file="files/FNLD_A.bin">Sending and writing QSPI Led Sample</CMD>
<CMD state="Updater" type="push" body="$ !">Done</CMD>

    </LIST>

I would be very appreciated for any hints or answers, thank you in advance.

Labels (1)
1 Solution
3,595 Views
alejandrolozan1
NXP Employee
NXP Employee

Hi,

Never mind, I think I just got it working. I used a u-boot binary that is about 200K large and after checking it it was written, it seems it was.

Please use the attached file. Sorry for the delay but it was not an easy task to debug and find out the problem. I hope this is the good one. It worked on my side.

Best Regards,

Alejandro

View solution in original post

42 Replies
2,049 Views
BlueJay
Contributor III

Hello,

after several tryings I found out that BOOT_MODE[1:0] shall be set (even image in flash in invalid or flash is empty):

BOOT_MODE[1:0] = 01 (serial downloader)

Mfg_tool doesn´t hang anymore, performed with status "done" and green bar, BUT

the flash content has been erased ONLY, it seems that this CMD:

<CMD state="Updater" type="push" body="pipeqspi addr=0x50000000" file="files/FNLD_A.bin">Sending and writing QSPI Led Sample</CMD>

is NOT executed or execution is failed.

What can I look for or try out ?

0 Kudos
2,049 Views
alejandrolozan1
NXP Employee
NXP Employee

Hi,

You have to remember that the image to load needs the IVT and the qspi structure so the ROM code boots correctly.

Otherwise it will not boot. Have you tried with the default image?

Best Regards,

Alejandro

0 Kudos
2,049 Views
BlueJay
Contributor III

Hi Alejandro,

thank you for your reply.

On our developement HW there is a JTag interface, and the JTag Debugger of Lauterbach is in use.

I could load the binary file with the Debugger into 4SPI flash by using the serial flash programming script provided by Lauterbach, and I can also verify the content of 4SPI flash with the debugger,

all is running well, the image with IVT is correctly set.

As I described (posting at

For the series HW we need the Mfg_tool to do the initial flashing so it is absolutely essential.

I would be appreciated for any proposal to solve this problem, and thank you in advance.

Best Regards,

Tai-Phan

0 Kudos
2,049 Views
BlueJay
Contributor III

Hi Alejandro,

today I was trying to evaluate the Mfg_tool with the TWR-VF65GS10 again. As I could see u-boot SW also outputs logging data via SCI1 interface:

PTB4 (SCI1_TX), PTB5 (SCI1_RX)

With HTerm at J8 (RS232) logging data can be recorded.

On our target HW the 4SPI flash device is connected at QSPI1 interface of Vybrid VF6xx:

4SPI1.jpg

As you can see, QSPI1_A_DATA0 is at PTB4, so there is a conflict with PTB4 of Vybrid VF6xx.

If my assumption is correct Mfg_tool cannot support booting 4SPI flash at QSPI1 interface of Vybrid VF6xx.

Can you confirm this issue ?

Best Regards,

Tai-Phan

0 Kudos
2,049 Views
alejandrolozan1
NXP Employee
NXP Employee

Hi,

As I see you should be able to boot from QSPI1, I mean that the BootROM code should be able to get the uboot image from QSPI memory. But after U-boot is runnig, this configures the SCI_Tx pin after that you won't be able to communicate with the QSPI memory.

Best Regards,

Alejandro

0 Kudos
2,049 Views
BlueJay
Contributor III

Hi Alejandro,

after this acknowledement do you schedule to provide an update for Mfg_Tool for VF65xx soon ?

Since the Mfg_tool generates itsself a log.-file also, so it is worth to reconsider if the u-boot needs to output log.-data via SCI1 interface also ?!

Currently we have got some functional HW-models to be put into operation so could you provide a quick support about this issue ?

Best Regards, and thank you in advance for any quick support

Tai-Phan

0 Kudos
2,049 Views
alejandrolozan1
NXP Employee
NXP Employee

Hi,

I wonder if you can try to patch u-boot with this.

Please let me know how it goes.

/Alejandro

2,049 Views
BlueJay
Contributor III


Hi Alejandro,

firstable thank you very much for you prompt reponse and support.

I want to ask you if you can possibly send me the "final" binary file (u-boot.imx) with the changes done by you (re-mapping the UART interface) since I currently still walk through the \U-boot_src\u-boot\README with about 6k lines how to build u-boot, and I also need to setup the tool-chain firstly until I can build a version of u-boot, so I will spend lots of time for the first steps.

So if you just need to "press a button" to generate the u-boot binary-file and provide me the binary file I would be appreciated for it very well, I can do afterwards a functional test quickly.

Cheers,

Tai-Phan 

0 Kudos
2,049 Views
alejandrolozan1
NXP Employee
NXP Employee

Hi

The changes will depend on your board. As you are using a custom board I recommend you to check the pin changes according to your board.

The previous attachment corresponds to the Vybrid Auto board. In other words I suggest you to use as reference that patch according to your board.

/Alejandro

0 Kudos
2,048 Views
BlueJay
Contributor III

Hi Alejandro,

I forgot to tell you re-mapping the UART1 to UART0 with pads PTB10 and PTB11 is fine for us since the UART0 (PTB10 and PTB11) is in use as UART interface on our HW also. So if you could just "press a button" to generate the u-boot binary-file I would be appreciated for it very well.

Best regards,

Tai-Phan 

0 Kudos
2,047 Views
alejandrolozan1
NXP Employee
NXP Employee

Hi,

Please try with the attached file.

Best Regards,

Alejandro

2,047 Views
BlueJay
Contributor III

Hi Alejandro,

firstable thank you very much for the attached file.

Today I tried the u-boot.imx immediately, I copied the new u-boot.imx into ..\Mfgtools-Rel-1.0.1\Profiles\Vybrid TO 1.1 Update\OS Firmware.

After execution the Mfg_Tool is hanging at:

1.jpg

ucl2.xml:

     <LIST name="vybrid-qspi-led" desc="Boot Vybrid FW">

     <CMD state="BootStrap" type="boot" body="BootStrap" file="u-boot.imx">Loading U-boot</CMD>

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

     <CMD state="Updater" type="push" body="qspiinit dev=1">Initializing QSPI</CMD>

     <CMD state="Updater" type="push" body="ubootcmd qspierase 0x50000000">Erase u-boot environment sector</CMD>

     <CMD state="Updater" type="push" body="pipeqspi" file="files/FNLD_A.bin">Sending and writing QSPI Led Sample</CMD>

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

     </LIST>

MfgTool.log:

     DLL version: 2.2.3

     Tuesday, April 07, 2015 17:10:05   Start new logging

     ModuleID[2] LevelID[10]: CMyExceptionHandler thread is running

     ModuleID[2] LevelID[1]: new MxHidDeviceClass

     ModuleID[2] LevelID[10]: new MxHidDevice[02392358]

     ModuleID[2] LevelID[10]: Device Manager thread is running

     ModuleID[2] LevelID[10]: CmdOperation[0] device chagned and reset to state 0

     ModuleID[2] LevelID[10]: ExecuteCommand--Boot[WndIndex:0], File is ..\Mfgtools-Rel-1.0.1\Profiles\Vybrid TO 1.1 Update\OS Firmware\u-boot.imx

     ModuleID[2] LevelID[10]: ExecuteCommand--Jump[WndIndex:0]

     ModuleID[2] LevelID[10]: *********MxHidDevice[02392358] Jump to Ramkernel successfully!**********

     ModuleID[2] LevelID[10]: CmdOperation[0], current state command has been finished and the last command is successful, so SetEvent(hDevCanDeleteEvent)

     ModuleID[2] LevelID[10]: CmdOperation[0] device chagned and reset to state 0

     ModuleID[2] LevelID[10]: ExecuteCommand--Boot[WndIndex:0], File is ..\Mfgtools-Rel-1.0.1\Profiles\Vybrid TO 1.1 Update\OS Firmware\u-boot.imx

     ModuleID[2] LevelID[10]: ExecuteCommand--Jump[WndIndex:0]

     ModuleID[2] LevelID[10]: *********MxHidDevice[02392358] Jump to Ramkernel successfully!**********

     ModuleID[2] LevelID[10]: CmdOperation[0], current state command has been finished and the last command is successful, so SetEvent(hDevCanDeleteEvent)

     ModuleID[2] LevelID[10]: CmdOperation[0] device chagned and reset to state 0

     ModuleID[2] LevelID[10]: ExecuteCommand--Boot[WndIndex:0], File is ..\Mfgtools-Rel-1.0.1\Profiles\Vybrid TO 1.1 Update\OS Firmware\u-boot.imx

     ModuleID[2] LevelID[10]: ExecuteCommand--Jump[WndIndex:0]

     ModuleID[2] LevelID[10]: *********MxHidDevice[02392358] Jump to Ramkernel successfully!**********

     ModuleID[2] LevelID[10]: CmdOperation[0], current state command has been finished and the last command is successful, so SetEvent(hDevCanDeleteEvent)

     ModuleID[2] LevelID[10]: CCmdOpreation[0] thread is Closed

     ModuleID[2] LevelID[10]: CCmdOpreation[0] thread is Closed

     ModuleID[2] LevelID[10]: DeviceManager::OnMsgDeviceEvent() - EVENT_KILL

     ModuleID[2] LevelID[10]: CMyExceptionHandler::OnMsgExceptionEvent() - KillExceptionHandlerThread

     ModuleID[2] LevelID[10]: Exception Handler thread is closed

     ModuleID[2] LevelID[1]: delete MxHidDeviceClass

     ModuleID[2] LevelID[10]: delete MxHidDevice[02392358]

     ModuleID[2] LevelID[10]: Device Manager thread is closed

Please tell me what I could still try ? And just tell me if you need any additional details I could provide for you. 

Best regards,

Tai-Phan 

0 Kudos
2,047 Views
BlueJay
Contributor III

Hi Alejandro,

today I closely take a look at the files you provided: ..\u-boot

2.jpg

All files are from 2014 !!! Is it the wrong folder I look for ? Something is quite strange ! Please would you check it e. g. correct attached file ?

Best regards,

Tai-Phan

0 Kudos
2,047 Views
alejandrolozan1
NXP Employee
NXP Employee

Hi,

I wonder if it is possible to check the output in the serial pins at PTB10 and PTB11. Those are the pins that where changed to not interfere with the QSPI1 connection.

That will give us more informatio about the problem.

Best Regards,

/Alejandro

0 Kudos
2,047 Views
BlueJay
Contributor III

Hi Alejandro,

...sure, I can try to get the output from UART0 interface !

Firstable I ensure that our HW and PC tool work well at UART0 interface:

3.jpg

The I start the Mfg_Tool with the uboot.imx provided by you: there is no data received by HTerm => see also "video.zip" !

5.jpg

Best Regards,

Tai-Phan

0 Kudos
2,047 Views
alejandrolozan1
NXP Employee
NXP Employee

Hi,

I have been working on this with a few modifications. I can erase the memory but for some reason it is not written. I will check the signals of the pins with a scope just to make sure that the data is sent as expected.

/Best Regards,

Alejandro

0 Kudos
2,047 Views
alejandrolozan1
NXP Employee
NXP Employee

Hi,

I could finally generate an image that can program a serial flash with QuadSPI1 module.

Please use the attachment. On my side it does not boot I assume that the image that was flashed needs certain modifications.

I can tell that the memory is flashed correctly checking with a debugger and an application that runs in iRAM  and initializes the QSPI1 module so the memory can be read correctly.

Best Regards,

Alejandro

0 Kudos
2,047 Views
BlueJay
Contributor III

Hi Alejandro,

with the new U-boot I could get partial sucsess with Mfg-Tool.

For the 1st trying I created a blinking SW with suitable boot header for Vybrid: all work fine !

Size of the binary file is about 9k.

Then I tried to flash a test SW with bigger size, about 233k into device, but it was not successfully done by Mfg-Tool (please refer to attached file):

1.jpg

Enclosed you can find beside the logging files, also the binary file for testing.

Best regards,

Tai-Phan

0 Kudos
2,047 Views
alejandrolozan1
NXP Employee
NXP Employee

Hi,

Can you share your larger application?

/Alejandro

0 Kudos
3,596 Views
alejandrolozan1
NXP Employee
NXP Employee

Hi,

Never mind, I think I just got it working. I used a u-boot binary that is about 200K large and after checking it it was written, it seems it was.

Please use the attached file. Sorry for the delay but it was not an easy task to debug and find out the problem. I hope this is the good one. It worked on my side.

Best Regards,

Alejandro