How to program LPC43xx using USB

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

How to program LPC43xx using USB

4,577 次查看
julienbrissard
Contributor II

Hello,

I am currently using FlashMagic and USART0 to program my application on LPC43xx.

I want now to program my application using USB.

It seems possible according to LPC43xx user manuel (Chapter 5: LPC43xx Boot ROM).

The board is Keil MCB4300 and ULink2 debug Adapter (from keil)

I set P2_8,P2_9, P1_2 and P1_1 to select USB0 or USB1.

But what PC tool can I use to do it and what is the procedure ?

I found LPCScrypt tool, but I am not sure that it is the correct way to do it and I don't understand why I shall use the debugger. I am not sure that it could work with ULink2 since user guide mention a specific configuration on LPC-Link2.

I think that programming LPC43xx with a simple USB cable is common today, since the LPC have a specific USB boot mode. So could somebody help me to look at the correct way ?

0 项奖励
回复
10 回复数

3,145 次查看
julienbrissard
Contributor II

Hi,

I am not able to install LPCScrypt\Drivers\lpc_driver_installer.exe, errors appears !

So I tried with another PC and it works !!!

Thanks Bernhard and Jeremy for your support

Have a nice day

0 项奖励
回复

3,145 次查看
julienbrissard
Contributor II

Hi Jeremy,

Thanks for your reply.

I just receive a new evaluation board for a colleague (also MCB4300).

Before do anything  with this board I put Jumper as on your board and I connect it to my PC with USB cable.

Then I launch boot_lpcscrypt.cmd and I got same result :

  • Booting LPCScrypt target with "LPCScrypt_158.bin.hdr"
    LPCScrypt target boot failed:
    Cannot open device

LPCScript come from LPCScrypt_installer_1.8.2_723.exe   (I use Windows7)

Could you supply to me your version of LPCScrypt ?

Do you have any idea of why it's not working with my board and PC ?

Have a nice day

0 项奖励
回复

3,145 次查看
jeremyzhou
NXP Employee
NXP Employee
Thanks for your reply.
The version of my LPCScrypt is v1.8.2, please referring to Bernhard's reply which illustrates the procedure of entering USB ISP mode.
Have a great day,
TIC
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
0 项奖励
回复

3,145 次查看
bernhardfink
NXP Employee
NXP Employee

Hi Julien,

the package AN4370SW does not belong to the LPC microcontroller family. This is something which has been done from Freescale for the Kinetis family.

If Windows does not have the driver already, try it with the driver installation "lpc_driver_installation.exe" in the Drivers folder of the LPCScrypt install folder.

pastedImage_1.png

I did not install LPCScrypt on my current W7 PC, so the driver might have also come in with the MCUXpresso installation.

Regards,

Bernhard.

0 项奖励
回复

3,145 次查看
bernhardfink
NXP Employee
NXP Employee

The USB boot mode is based on the DFU usb profile (device firmware upgrade).

This means that you see a DFU device in the Windows device manager:

Picture1.png

My hint of the day:  when you have the board connected as shown above, make another reset, but keep the ISP button pressed while pressing the reset button.

Background for this procedure is, that if there is a valid program in the internal flash, then it starts from there and doesn't go into USB boot mode (nor in any other boot mode). It simply starts from the internal flash. With the ISP button pressed during reset this procedure is overruled and it goes into the bootmode determined by the jumpers.

Regards,

Bernhard.

3,145 次查看
julienbrissard
Contributor II

Hi Bernhard Fink,

Thank you for your reply.

I think that my problem come from the DFU_winusb_driver which is not installed.

I have installed dfusec_v1_11 and LPCScrypt_installer_1.8.2_723.exe, but If I look in Windows Device Manager I see that driver is unknown.

 LPC_USB.PNG

But if I want to install the driver from this window (update driver), and then select  AN4370SW\DFU_winusb_driver directory, Windows does not find it (even if there is DFU_Device.inf and DFU_Device_runtime.inf Inside).

If I right_click on DFU_Device_runtime.inf and select install, I got an error also.

If I try to follow chapter "5.4.1 Driver installation" of AN4370_USB DFU boot loader for MCUs.pdf, then after selecting DFU_Device_runtime.inf, I got an access error :

LPC_updateDriverError.PNG

Do you have any hint about my problem ?

0 项奖励
回复

3,145 次查看
jeremyzhou
NXP Employee
NXP Employee
Thanks for your reply.
You can run the script whose name is InstallDrivers is provided in the scripts directory and this script must be run as an Administrator to enable the drivers to be installed.
pastedImage_1.png
Hope it helps.

Have a great day,
TIC

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

0 项奖励
回复

3,145 次查看
jeremyzhou
NXP Employee
NXP Employee

Hi julien brissard,

Thank you for your interest in NXP Semiconductor products and 
the opportunity to serve you.
To provide the fastest possible support, I'd highly recommend you to . 
refer to the attachment to view the details.
Have a great day,
TIC

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

3,145 次查看
julienbrissard
Contributor II

Hi jeremyzhou,

Thank you for your answer

I tried to use LPCScript, but I got following error :

  •  D:\logiciel\LPCScrypt\scripts>boot_lpcscrypt.cmd
    Booting LPCScrypt target with "LPCScrypt_158.bin.hdr"
    LPCScrypt target boot failed:
    Cannot open device

I use MCB4300 keil board with an USB cable connected on USB0, and I set P2_8,P2_9, P1_2 and P1_1 to select USB0.

Is LPCScrypt_158.bin.hdr the correct file ?

Do you know what could be my mistake ?

0 项奖励
回复

3,145 次查看
jeremyzhou
NXP Employee
NXP Employee

Hi julien brissard,

Thanks for your reply.

I'd like to replicate the error on my site, but it doesn't happen.

The LPCScrypt can connect the board successful when MCU boot from the USB0.

pastedImage_1.png

pastedImage_2.png


Have a great day,
TIC

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

0 项奖励
回复