Hi
I have added the SST SPI Flash to the LPC23XX and LPC17XX projects. I tested a
SPI_FLASH_SST25VF016B on an MCB2300 to verify that it worked.
In fact I re-wrote the driver to utilise the LPC23XX's 8 deep SPI FIFO (although there is in fact no real advantage of using the FIFO in this application - more as reference) and it worked first time on the HW so that went well. The LPC17XX version uses the same driver and so I just tested its configuration in the simulator. The following small packs include the new code (I can't be absolutely sure that it will just drop in but the changes should be quite clear), including a configuration for the SPI chip (note that
SPI_FILE_SYSTEM may have to be set since I think that I removed it during some follow up tests as described below):
http://www.uTasker.com/software/V1.4/LPC23XX_SST25.zip (passwords from V1.4 project)
http://www.uTasker.com/software/V1.4/LPC17XX_SST25.zipAlthough things did indeed work first go I realised that the GCC stand-alone build was sometimes hanging when serving pages from SPI FLASH on the web server. However other builds were stable (including Rowley, which also uses GCC and the same files).
After a few unsuccessful attempts to solve this (it was hanging when the SPI FLASH chip select line was held low so seemingly obviously in the new driver part) I realised that it was in fact the same when serving the pages from internal FLASH. Then looking at my "to do list" I also realised that this is a known issue with this build - unfortunately after a few hours I still hadn't got any closer to solving it - just verifying that it is there and not in any other projects... Finally I concluded that, since this has nothing to do with the new SST driver (although it does almost always hang when retrieving data from the FLASH - supposedly since this is the main activity at the time) there was no reason not to post it.
I would certainly be interested in other peoples experiences with the GCC build (maybe it is restricted to the version that I am using -
gcc version 4.2.3 (Sourcery G++ Lite 2008q1-126) ?) but the fact is that the instability is during serving web pages and the picture that I get in the debugger is not really helping much. It is (seemingly?) indicating a data or program abort occurs when it handles a normal interrupt - it looks as though it is getting interrupted, jumping to the IRQ (address 0x18) and then immediately jumping from there into the abort handler. I am not absolutely sure but it is something that I really cant explain - also why it works fine compiled by the GNU compiler as used by Rowley... Going a bit off-topic but it would be nice to get to the bottom of this one!
Regards
Mark