DFUSec Flash Programming Error

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

DFUSec Flash Programming Error

411 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by bigkahuna on Mon Oct 15 16:02:50 MST 2012
Hello,

I am using customer board with LPC1857FET256 and trying to flash firmware into internal flash using USB0 boot.  I believe I got the USB algorithm correct because
A.  it boots from RAM correctly and displays following on UART
********************************************
USB Bootloader Algorithm
Build date: Oct 15 2012:17:33:56
********************************************


FLASH detected: 2 bank(2) (0xf001d830/0x1ef20000)
FLASH bank 0: Start: 1a000000, Size 00080000
FLASH bank 1: Start: 1b000000, Size 00080000
Initializing USB interface
Initializing DFU
Connecting USB

B.  LPC DFUSec says Download Complete, Waiting for device detection after initial download.

The tool chokes at this point.  What could be wrong?  What device detection is the tool waiting for?

Thanks
Labels (1)
0 Kudos
3 Replies

340 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by bigkahuna on Sun Nov 25 19:07:29 MST 2012
If anybody is interested DFU header definitions for all entry points were not correct.  Fixed those and it started working.
0 Kudos

340 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by wellsk on Mon Oct 15 18:51:00 MST 2012
>firmware into internal flash using USB0 boot.
I guess I missed this, if it's definitely USB0, then something else is probably wrong. :(
0 Kudos

340 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by wellsk on Mon Oct 15 18:48:00 MST 2012
>LPC DFUSec says Download Complete, Waiting for device detection after initial download.
The default boot device for DFU boot in the programming algorithm (not the boot ROM) is USB0. This may not be the same as you are using for the boot ROM and the download of the programming algo.

Are you using USB0 or USB1 for download? If it's not USB0, you may need to rebuild the algo using USB1.
(I'm not certain if this is the problem, but it might be worth a try.)

I think these are all the changes you need:
<code>
//void USB0_IRQHandler(void)
void USB1_IRQHandler(void) /* Change to USB1 */
{
        USBD_API->hw->ISR(hUsb);
}

...
...

//usb_param.usb_reg_base = LPC_USB0_BASE;
usb_param.usb_reg_base = LPC_USB1_BASE; /* Change to USB1 */

...
...

// NVIC_EnableIRQ(USB0_IRQn);
NVIC_EnableIRQ(USB1_IRQn); /* Change to USB1 */
</code>
0 Kudos