Anders,
Thanks for the fix! I have been seeing these symptoms with a number of
flash chips on an LPC4330, but without the time to look into it I had
resigned myself to using the workaround. This will be nice to have.

At the time I implemented this the SPIFI registers were undocumented and
the ROM API was (except for the init code) non-functional or unavailable on
the parts. NXP had been dragging their feet on fixing either of those for a
few months, so SPI was the quickest answer at the time. I think the ROM API
is still unavailable but the registers are now well documented; I expect
using them instead would yield a pretty significant write speed increase.

George



On Mon, Oct 27, 2014 at 5:17 PM, Anders Oleson <[email protected]> wrote:

> I have posted a fix 2359 http://openocd.zylin.com/#/c/2359 to Gerrit for
> a bug I tracked down in the SPIFI flash write. I was wondering if you can
> take a look and review it.
>
> I found on my board it was locking up the SPI flash chip because the last
> flash write command wasn't ended with CS going high and I had to power
> cycle the board after flashing. This is the quickest, lowest impact fix I
> could make by just adding one more instruction to the embedded assembly
> program right before it exits. I notice that there is one edge case that
> where it might exit due to an error, but it shouldn't hurt anything in that
> case so it should be fine.
>
> This was found on an LPC4370 with Spansion S25FL164K QSPI flash. I don't
> know whether or not the problem affects other SPI devices or other LPC
> processors with SPIFI.
>
> Also, I am curious about the design choice to manually toggle the SPI bus
> commands and CS pin via the SPI peripheral and GPIO vs. using the SPIFI
> peripheral registers or even the spifi_rom_api calls? If the flash is
> supported by the bootrom, then it is likely to have been already setup
> properly and running. It might be simpler and allow less mode changing,
> etc. Even if it is not already setup (this could be checked at runtime) it
> could be still be initialized like init does now. Anyway, this is just
> curiosity about the history; I'm quite happy that the capability was there
> and working in any case. :)
>
> Thanks!
> Anders
>
>
>
>


-- 
George Harris
Luminaire Coffee
phone: (703) 901 2930
fax: (617) 446 6749
------------------------------------------------------------------------------
_______________________________________________
OpenOCD-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openocd-devel

Reply via email to