Hello,
We have an application which uses the LPC4320 which, up to now has been running out of external flash using SPIFI. Periodically (every 1s) the code writes a DWORD to a FRAM memory device on I2C0. Everything works correctly, no issues.
We have now added the header to the image in the external FLASH IC so the CPU copies the application out of the external FLASH and into the RAM on the CPU and executes it from there. The code runs a lot faster now but the reads or writes to/from the I2C FRAM chip fail.
We are investigating how it fails but so far (we haven't an I2C protocol analyser yet) when running from SPIFI there is a gap of about 5uS between the bytes on the I2C bus but when running out of RAM there doesn't appear to be any gaps.
FRAM memory is similar to EEPROM but you can do many billions of writes and the writes/reads are as fast as you can read/write them. You don't need to check the byte has been written before sending the next.
Anyone any ideas on why it should work OK out of SPIFI and not out of RAM?
Many thanks
Pete
Hi Pete,
TIC
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi,
Many thanks for your reply and support.
The only changes we make to the code in the external flash IC is the header which tells the LPC4320 to copy to RAM and then execute.
1. The code runs correctly when running out of external flash and functions correctly, except for the I2C when running out of RAM.
2. We haven't tried programming the RAM directly from the debugger. We will try this.
I suspect the issue is with the speed of the I2C state machine.
Regards
Pete
Hi Pete James,
Thanks for your reply.
I think to confirm the I2C clock rate whether works on you expect or not, you should have a logical analyzer to measure it.
Have a great day,
TIC
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------