How to use LPC55S28 Bootloader

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

How to use LPC55S28 Bootloader

跳至解决方案
7,927 次查看
bressan
Contributor III

Hi,

I use a LPC55S28, connected with USB0 to PC. My USB-HID example is working.

I erased all flash, but it didn't run as USB Device. What do I have to do, to test the USB-Bootloader option? Which pins must be connected?

We need this for mass production.

Thanks!

Bernhard

Edit: There is no crystal connected to the LPC55S28

标签 (2)
0 项奖励
回复
1 解答
6,499 次查看
jplathuile
Contributor III

Hi,

I reopen this question, I have made a board with an LPC5528, and wired it to receive ISP from USB0, according to LPC55S2x/LPC552x Data sheet on page 2 and UM11126 on page 140.

At time in the version of the UM there was no note "To enable USB0-FS ISP mode, see the BOOT_CFG (USB_SPEED. attached PFRexcel sheet) needs to be set." ,which can't be set without a programmer and if I had a programmer I won't use ISP


Is the USB0 usable for ISP?

Regards

JP

在原帖中查看解决方案

9 回复数
6,500 次查看
jplathuile
Contributor III

Hi,

I reopen this question, I have made a board with an LPC5528, and wired it to receive ISP from USB0, according to LPC55S2x/LPC552x Data sheet on page 2 and UM11126 on page 140.

At time in the version of the UM there was no note "To enable USB0-FS ISP mode, see the BOOT_CFG (USB_SPEED. attached PFRexcel sheet) needs to be set." ,which can't be set without a programmer and if I had a programmer I won't use ISP


Is the USB0 usable for ISP?

Regards

JP

6,306 次查看
bressan
Contributor III

The solution is:   There is no solution!
==> You can't use USB0 for empty, factory default chips.


You need to set a flag first, and therefore need another ISP-serial-port (USB1 with crystal, UART, SPI, I2C, ...)

In my opinion, the UM11126-chapter6.3 is wrong:

"One of the serial interfaces (UART0, I2C1, SPI3, HS_SPI, USB0, USB1) is used to
download image from host into internal flash. The first valid probe message on USART,
I2C, SPI or USB locks in that interface."

It does not work for USB0 with default factory settings chip.

0 项奖励
回复
7,657 次查看
bressan
Contributor III

Pins set/reset to use the USB-Bootloader is uncomfortable for mass production. But if this is the only way, I would use this.

I looked at the Boot ROM Chapter again:

  1. USB0 VDetect is P0_22 connected to USB V+ via resistor divider. So the Pin is High. (my HID Code would not work, if this isn't High)
  2. I put Pin 0_5 manually Low. After reset, my firmware doesn't boot. So I assume, it is in ISP Mode.

But the device is not recognized as any USB-Device by Windows. Not USB D+ neither USB D- goes high. The LPC55S28 seems not to activate the USB-Bus.

In the UM is written:

The LPC55S6x/LPC55S2x/LPC552x probes the active peripheral from one of below serial interfaces, and download image from the probed peripherals:
UART0, I2C1, SPI3, HS_SPI, USB0 or USB1.

Why does Auto ISP not work? Do I have to force another Pin(s) hi/lo, to disable USART, I2C, SPI ?

0 项奖励
回复
7,657 次查看
FelipeGarcia
NXP Employee
NXP Employee

Hi Bernahrd,

 

You can use USB1 with Auto ISP mode. I tested using LPC55S28-EVK and USB1 is enabled when entering ISP mode by pressing ISP button. USB1 in ISP mode is identified as a USB input device in the HID section of the device manager.

 

If you want to enable the USB0, the only way is by setting CMPA : BOOT_CFG bit9 as 1. Then, reset the chip and USB0 ISP will be enabled. If you choose this option please be extra careful as you could brick your device.

 

Hope it helps!

 

Best regards,

Felipe

7,155 次查看
ThingPiaoChew
NXP Employee
NXP Employee

Hi , I have some questions on the following --> 

If you want to enable the USB0, the only way is by setting CMPA : BOOT_CFG bit9 as 1. Then, reset the chip and USB0 ISP will be enabled. If you choose this option please be extra careful as you could brick your device.

I have some question .

(1) I cannot find any description in user manual CMPA : BOOT_CFG bit 9 

(2) It was mentioned in the above that it has to be extra careful else you could break the system . Can elaborate ?? how can it break the device in what sense ??

 

0 项奖励
回复
5,503 次查看
bressan
Contributor III

In UM11126 you've to select view Attachments.

There is a XLS-Sheet attached with CFPA and CMPA.

Unfold the hidden rows.

I hope this helps. I still didn't get USB0 ISP running.

0 项奖励
回复
7,513 次查看
bressan
Contributor III

So it seems that a crystal is needed, because USB1 doesn't work without crystal, right? My design is intended to work without crystal.

0 项奖励
回复
7,657 次查看
bressan
Contributor III

Thank you for that info.

That means, I have to change the design of my PCB, to use USB1, if I want to be able, to program a new and empty LPC5528 in mass production via USB, right?

Mit freundlichen Grüßen / with kind regards

0 项奖励
回复
7,657 次查看
FelipeGarcia
NXP Employee
NXP Employee

Hello Bernahrd,

 

You can find more information about the ISP mode and the pins used in the Boot ROM Chapter of the User Manual.

 

Hope it helps!

 

Best regards,

Felipe

0 项奖励
回复