LPC55S69 with USB Bootloader at USB0 not working

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

LPC55S69 with USB Bootloader at USB0 not working

1,923 Views
bressan
Contributor III

Hi,

LPC55S6x/LPC55S2x/LPC552x User manual UM11126 says USB0 is also possible for ISP mode.

I tried this with LPCXpresso55S69:
       Erased Flash

       connected USB port of LPCXpresso with Windows-PC
       connected to USB1 USB Device 1fc9:0021 appeared, if poweron with ISP0 pulled down.

       connected to USB0 no USB Device was recognized by Windows with ISP0 pulled down.

What do I have to do, to test the USB-Bootloader option at USB Port0?

I want to transfer this info to use bootloader at USB0 with LPC55s28 for mass production.

see also: How to use LPC5528 Bootloader 

Thanks!

Bernhard

Edit: Also tried to pull down P0_4 and P0_6; with P0_5 pulled up. like in https://community.nxp.com/docs/DOC-344283 : Also no USB0 activity.

Labels (2)
0 Kudos
Reply
3 Replies

886 Views
emblink182
Contributor III

Here is a code sample that will allow to unlock the USB 0 FS ISP mode. I have tested it with LPC5528 and it works, I was able to update the firmware in ISP mode with USB_0 and the blhost.exe tool.

bool Usb0IspModeEnable(void)
{
    // This info is from a LPC55S6x_LPC55S2x_LPC552x Protected Flash Region v1.3.ods
    // which is an attachment to the UM11126 LPC55S6x/LPC55S2x/LPC552x User Manual
    // The register is configured to enable the USB FS ISP interface.
    #define FLASH_CMPA_BOOT_CFG_USB_ISP_MODE_MASK     (((1U << 9) | (1U << 10)))
    #define FLASH_CMPA_BOOT_CFG_USB_ISP_MODE_SHIFT    (9U)
    #define FLASH_CMPA_BOOT_CFG_USB0_FS_ISP_MODE      (1U)
    #define FLASH_CMPA_BOOT_CFG_USB1_HS_ISP_MODE      (2U)

    static cmpa_cfg_info_t cmpa = {0};
    const uint32_t size = sizeof(cmpa);
   
    uint32_t status = FFR_GetCustomerData(&flashConfig, (uint8_t *)&cmpa, 0x0, size);
    if (status != kStatus_FLASH_Success) {
        return false;
    }

    cmpa.bootCfg &= (~FLASH_CMPA_BOOT_CFG_USB_ISP_MODE_MASK);  // clear bits
    cmpa.bootCfg |=
        ((FLASH_CMPA_BOOT_CFG_USB0_FS_ISP_MODE << FLASH_CMPA_BOOT_CFG_USB_ISP_MODE_SHIFT)
         & FLASH_CMPA_BOOT_CFG_USB_ISP_MODE_MASK);
   
    status = FFR_CustFactoryPageWrite(&flashConfig, (uint8_t *)&cmpa, 0);
    if (status != kStatus_FLASH_Success) {
        return false;
    }

    return true;
}
0 Kudos
Reply

1,724 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Bernahrd Bressan,

After talking with SE, if you really want to enable the USB0, the only way is set the CMPA : BOOT_CFG bit9 as 1.

 

then reset the chip. The USB0 ISP is enabled.

 

Becareful!!! Configure the CMPA area maybe lock the chip, pls take care of it.

I haven't test on my side, also I strongly recommend you don't chang CMPA to use USB0, just use USB1.

pastedImage_1.png

Hope it helps,

Alice

1,724 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Bernahrd Bressan,

In LPC55s6x/LPC55s2x ROM bootloader, the first valid probe message on USART, i2c,spi or USB locks in that interface.

the pins P0_4 and P0_6 have no effect. And the PIO0_5 must low when ISP mode.

And I test USB1 in ISP mode, it can work well with blhost, can erase and write.

Abut USB0, I will check with development team.

BR

Alice