LPC51U68 USB Boot problem with firmware.bin

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

LPC51U68 USB Boot problem with firmware.bin

2,311 Views
christian_gross
Contributor II

Hello,

I am designing a board around LPC51U68. When I put the chip in MSC USB ISP I can see the device on my PC and I can see the firmware.bin file on it. So far so good.

I noticed that the size of the firmware.bin file on the device is 260KB. I also noticed a bit too late that the bin file I generated from MCUXpresso IDE (using the Create binary on the project axf file), only was about 7KB.

I deleted the firmware.bin file on the device (LPC51U68) and I renamed my smaller bin file to firmeware.bin and copied it to the device(LPC51U68).

I proceeded to set the chip to boot from flash to see if my application software did what I wanted, it did not so I needed to create a new version. But when I switched back to MSC USB ISP, the device will no longer show up on my PC at all. Is the chip bricked?

I think I need some clarification on how to generate the correct bin file (from MCUXpresso IDE?) and how to recover from a corrupted firmware.bin file on the chip.

All help is appreciated.

Best regards,
Christian.

0 Kudos
Reply
7 Replies

1,982 Views
christian_gross
Contributor II

My board is very simple at the moment, I only have:

*)Pwr, GND
*)USB
*)UART to FTDI USB (PIO0_0 and PIO0_1)
*)Jumpers for ISP Boot pins.

I only use internal clocks on chip.

My board will boot up and show the CRP DISABLD device on my PC (when I boot from USB/MSC).

I tried the hello world example in the LPC51U68 SDK, and I changed SDK Debug consle to UART console. I downloaded the app, and set the MCU to boot from flash. I did not get any printouts on the UART (I use TeraTerm on PC setup according to NXP guide with FTDI TTL-232R cable).

And then when I switch back to boot from USB it will no longer show the CRP DISABLD device. The hello world example is really small so I am not sure what I am doing wrong. As long as the hello world uses internal clocks then there should be no problems with my board.

int main(void)
{
    char ch;

    /* Init board hardware. */
    /* attach 12 MHz clock to FLEXCOMM0 (debug console) */
    CLOCK_AttachClk(BOARD_DEBUG_UART_CLK_ATTACH);

    BOARD_InitPins();
    BOARD_BootClockFROHF48M();
    BOARD_InitDebugConsole();

    PRINTF("hello world.\r\n");

    while (1)
    {
        ch = GETCHAR();
        PUTCHAR(ch);
    }
}

So in conclusion I have two problems:
1) USB Device no longer shows up after change of firmware.
2) No printouts on the UART to FTDI USB.

0 Kudos
Reply

1,982 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Christian,

How about the method Con Verse mentioned?

If it even can't enter into ISP mode, I think maybe your chip broken.

0 Kudos
Reply

1,982 Views
christian_gross
Contributor II

I managed to solve the problem, it was related to the boot pins not beeing correctly grounded, and was read as "one" and not "zero".

Best regards,

Christian.

0 Kudos
Reply

1,982 Views
christian_gross
Contributor II

Do I need to add code for USB in my application to make the MSC USB ISP boot process work?

0 Kudos
Reply

1,982 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Christian Grosse,

- In normal way, after copy .bin file into device, just re-power board, it can work well, I test on my side.

- "how to generate the correct bin file (from MCUXpresso IDE?)"

-> Config Debug Console to "UART console", build, then refer to the below screenshot to generate .bin file:

pastedImage_13.png

pastedImage_14.png

-" How to recover from a corrupted firmware.bin file on the chip."

-> Do you mean your chip now can't run into USB Mass storage mode ? Can't show "CRP DISABLD" device?

BR

Alice

0 Kudos
Reply

1,982 Views
christian_gross
Contributor II

Hello Alice,

Yes, I no longer get "CRP DISABLD" device on my PC.

When I built my project in MCUXpresso IDE, I did not Configure Debug Console to "UART console".

My application size was only 7k, while the firmware-bin on device was 260k. Do I need to add code to my application to make USB MSC BOOT work?

0 Kudos
Reply

1,982 Views
converse
Senior Contributor V

You do not add any code to make USB boot work - it is embedded i the on-chip ROM.

However, you may need to regain debug access - see https://community.nxp.com/thread/389112 

0 Kudos
Reply