2021-01-22 04:14 AM
Hi All,
I am using SBSFU to load my firmware which is running from external flash. The firmware works but seem to be experiencing speed issues on the I2C communications.
In an attempt to solve this issue, I am would like to, at start-up copy the code that is placed at 0x90000000 to RAM and run but not sure how to do this.
Regards
ooni
2021-01-22 04:54 AM
Bring up the QSPI
memcpy() the executable code from 0x90000000 to 0x00000000 or wherever.
Use a function pointer to jump into an entry point of the code.
I don't really understand how running from RAM will materially improve the speed of the I2C interface.
Suggest you understand the actual problem first, rather than Edison a 1000 unworkable solutions to some other problem.
2021-01-22 06:00 AM
Hi Tesla,
Thanks for your reply, there might be another underlining issue but getting desperate and frustrated so just throwing everything out there. As I understand the process. SBSFU sets up the QSPI and enables the external memory range starting at 0x90000000 using HAL_OSPI_MemoryMapped() function. Once this is up and running SBSFU then calls my executable which seems to be running fine with the exception of this Issue that I am seeing on the I2C.
I was thinking that the firmware running from external flash might be the reason the I2C is struggling. The code runs fine at 100KHz and also runs fine at 400KHz when using the debugger so it looks like something is inhibiting the speed when running from SBSFU environment.
Regards