LPC1345 ROM_USB_msc corrupts SPI FLASH read

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

LPC1345 ROM_USB_msc corrupts SPI FLASH read

627 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CC58 on Fri Jan 18 07:35:20 MST 2013
I successfully used the LPC1343 usbmsd_rom sample code to integrate an external 8meg SPI FLASH.  Currently trying to migrate code to LPC1345. 

The LPC1345/47 equivalent sample code is ROM_USB_msc. This code is very different from LPC1343 sample code. I modified this sample code callback translate_rd() to use my known good SPI FLASH read routine.

When SPI FLASH read routine is called the SPI FLASH read is corrupted.  The odd thing is first 256 byte reads are fine, but after that it returns garbage.  This same SPI FLASH read routine works correctly if test code is inserted in main() before USB is initiated.  It appears ROM USB code interfers with SPI reads.

Has anyone successfully used LPC1345/47 USB rom code to implement an external SPI FLASH?
0 Kudos
Reply
1 Reply

616 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CC58 on Sat Jan 19 16:33:32 MST 2013
My bad.  Made a mistake. Not a problem with ROM USB routines. Working now.
Noticed the new DiskImage.c changed some indexes moving around some things.  Changed filename showed up in the readme.txt file as text.  Had all that figured out in old Diskimage.c so copied the old one. 

It appears a different programmer wrote the USB MSC example code for the LPC1343 and LPC1345.  Makes porting a little more difficult than it should be.
0 Kudos
Reply