I have run both the flash_example and flash_demo and simply tried replicating this logic within a new project (for a bootloader) using Processor Expert. I am aware of the demo/example using the bare metal platform library rather than PE but that appears to be the only difference. My main issue appears to be centered around:
g_FlashLaunchCommand = (pFLASHCOMMANDSEQUENCE)RelocateFunction((uint32_t)__ram_func , LAUNCH_CMD_SIZE ,(uint32_t)FlashCommandSequence);
Whether I'm calling FlashEraseSector, FlashReadResource, FlashProgram, etc. They all call:
ret = pFlashCommandSequence(pSSDConfig);
This always returns 0x20 (FTFx_ERR_ACCERR)
Attached is my test project, at this point I really can not tell a difference between the demo and my test application in regards to utilizing this driver.
Thanks in advance.
EDIT:
Hardware: TWRKV31F120M
IDE: KDS 3.0
SDK: KSDK 1.3
Original Attachment has been moved to: FlashTest.zip
Solved! Go to Solution.
Hello Steven Neves:
Flash erase/program operations are not possible in HSRUN mode (maximum frequency). Try setting Clock Configuration 4 in your project:
Then generate code, build and try again. I hope this helps.
Regards!,
Jorge Gonzalez
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hello Steven Neves:
Flash erase/program operations are not possible in HSRUN mode (maximum frequency). Try setting Clock Configuration 4 in your project:
Then generate code, build and try again. I hope this helps.
Regards!,
Jorge Gonzalez
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Thank worked. Thank you very much. Is this documented anywhere by chance?
Hello Steven:
I am glad it worked. This limitation is documented in the Reference Manual:
Regards!
Jorge Gonzalez