Flashing Update over USB in iMXRT1050 referance Code & Document Needed.

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

Flashing Update over USB in iMXRT1050 referance Code & Document Needed.

1,643 Views
nivassenrai
Contributor I

Working on Integrating USB Stack in iMXRT1050 using MCU Expresso Example program provided by NXP.

Objective:

Creating an App for upgrading flash program via USB jus by drag & drop firmware binary in HOST Device.

refered this link but still, many info is missing regarding Bootloader context

https://www.youtube.com/watch?v=IOd58-RaivY

Steps tried:

Refered Document:

https://www.emcraft.com/imxrt1050-evk-board/using-imx-rt1050-as-the-usb-mass-storage-gadget

https://www.nxp.com/docs/en/user-guide/USBUG.pdf 

https://community.nxp.com/docs/DOC-330834

 https://www.nxp.com/docs/en/application-note/AN3564.pdf

https://www.nxp.com/docs/en/user-guide/USBUG.pdf.

Refered Souce Code:

DAPLink/README.md at master · ARMmbed/DAPLink · GitHub 

and also tried importing some USB examples mentioned in MCU Expresso for the board: EVKB-IMXRT1050

Refered the document:

https://www.nxp.com/docs/en/application-note/AN4379.pdf 

which suits exactly but it is not for iMXRT1050. Can I know is there anything related to IMXRT1050 please support on that.

Need Support in:

I need to know exactly which example should I refer to achieve my goal of reading a data from MSD to flash memory of my controller. which suits of flashing the code into my flash memory.

0 Kudos
5 Replies

1,360 Views
jeremyzhou
NXP Employee
NXP Employee

Hi Nivas Bathirappan,

Thank you for your interest in NXP Semiconductor products and
for the opportunity to serve you.
Firstly, there's no similar application note for the RT MCU series like the AN4379, however, in the SDK library, it contains the USB MSD demos, in further, it also provides the FlexSPI demo which implements a variety of operation about the external flash.
It can allow the developer to integrate them into a bootload application.

Looking forward to your reply.

TIC

 

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos

1,360 Views
nivassenrai
Contributor I

Hi jeremyzhou,

Thanks for the reply.

I can able to copy the content into iMXRT (MSD)treating my PC as HOST & iMXRT1050 as a device. 4KB memory space is available for transferring data.

I was working on Example "evkbimxrt1050_dev_msc_ramdisk_bm" downloaded from SDK example program.

I can able to transfer the file into MSD of iMXT1050 at Endpoint address "2 ". I got to know this by debugging the code. keeping breakpoint @ usb_status_t USB_DeviceTransfer(usb_device_handle handle,uint8_t endpointAddress,uint8_t *buffer,uint32_t length).

I am stuck at this point. I need to copy the data from the buffer to flash memory. I don't know how to do this. 

Challenges faced.

-->I can't keep the code stopped by breakpoint for more than 3 minute due to the timeout function the drive(POPS up in PC) gets deleted automatically.

--> I can able to identify the data stored address in RAM memory @ 0x20001cdc. But it is dynamic in nature.

What I needed.

I just want to know where the transferred data in MSD located and how to copy the data from that location to ROM.

Please help me with this.

0 Kudos

1,360 Views
jeremyzhou
NXP Employee
NXP Employee

Hi Nivas Bathirappan,

Thanks for your reply.
1) Please receive and transfer data via responding to the below USB events.

pastedImage_1.png
2. To implement the flash programming, it needs to run the code in the RAM or SDRAM prior to utilizing the FlexSPI driver to make it.

TIC

 

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos

1,360 Views
nivassenrai
Contributor I

Hi jeremyzhou

Thanks for the reply.

Yes, what you told is correct. I can able to identify the data flow for transfer & Reception in that code

The problem still remains the same.

Something that I expect is like.

 You may know the Open SDA controller in iMXRT1052 Eval Board where the code (.hex)is flashed into RT Controller via Open SDA, Yes it is working fine. I refered the code of Open SDA from "GitHub - ARMmbed/DAPLink ". Where I can able to see some function which solves my problem. I can able to see the virtual file system where I can able to read the data from the dropped file into the memory of the RT Controller. The path s   is given below.

\DAPLink-master\DAPLink-master\source\daplink\drag-n-drop\vfs_user.c

For example, Function like 

stream_write

stream_open

stream_close etc.in file file_stream.c

I am expecting the same behaviour in MSD related example program available in SDK or Should we need to integrate the VFS related stuff to working MSD examples to achieve our goal

What I expect::

I may require a File system which is capable of reading the data which is dropped into the PC.

 

 

My use case is the same as the Open SDA Program which works in Eval board which solves the purpose. I am looking into the same kind of behaviour into any kind of USB example

0 Kudos

1,360 Views
jeremyzhou
NXP Employee
NXP Employee

Hi Nivas Bathirappan,

Sorry for reply late.
Yes, the OpenSDA circuit can update the external flash chip via dragging the image to U-Disk which is enumerated after attaching the circuit to the PC.
I think this application is worth referring, however, I'd like to remind you that the OpenSDA circuit updates the external flash via utilizing the Serial Downloader Mode of the RT series, for your implementation, it should use the FlexSPI module to completing the flash update.That's a bit different.

TIC

 

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos