Hi,
I am going to build a bootloader, would like to program internal spifi 4M flash in LPC54S018J4MET180E. My developement environment is IAR. J-LINK (SWD). IC version is 1B.
I found the errata of https://www.zlgmcu.com/data/upload/file/Utilitymcu/LPC540xx-kanwu.pdf .
I means it should be implement programming functions by self, right?!
So, I get the example code package from NXP from as SDK_2_11_0_LPC54S018J4M.zip.
There is a example code in \SDK_2_11_0_LPC54S018J4M\boards\lpcxpresso54s018m\driver_examples\spifi\polling_transfer\.
spifi_polling_transfer.c seems a good example for execute programming/ erasing internal flash.
But, I try it and still have problem. Need to call help from you ~~
I am make sure the SPIFI command is set corrcot to 0x40080000 SPIFI command registers. and also include startup_LPC54S018M.s to initial W25Q32JV without XIP_IMAGE & ADD_CRC define.
Question:
1. Base on SDK_2_11_0_LPC54S018J4M package spifi_polling_transfer.c main (). how many files has to include? (ex. iar_lib_power.a, startup_LPC54S018M.s ... ?)
2. How to correct to config icf for ram_bootloader?
3. How to set base option of project for this?
4. After SPIFI_INIT (), the memory show as below:
It means already copy 0x3000000 rom code 512 byte to 0x0 sramx region. my bootloader image also download to sram0 0x20000000. but, flash 0x10000000 shows all 0s. 0x40080014 always un-readable. Erase/ Write flash do nothing. What is the trouble on this?
5. One more strange, If I set Project\Option\J-Link\Setup\ reset by "Core". I can do my function well, once implement J-Flash to read or write function. But set "Reset Pin", "Core and periperals" & "Normal" are still not work. I guess some of peripherals parameters is not set or incorrect, like as PLL or clock speed not match, setting sequency, or somehow. could some one help to give a hand?!
Extra information:
J-Flash (J-Link) is workable (Read/ Write/ Erase) at my board base on this project.
解決済! 解決策の投稿を見る。
Hello,
About using bootloader on lpc54s018J4M, how about using method as blow thread:
BR
Alice
Hi, Alice,
Download flashtloader is no problem by J-link tools. Thanks for give me an other ways to tranfer flashloader to ram.
I found access internal Flash, also need to initial external flash (IOCON).
So, now I can access the 0x10000000 correctly.
Thanks for your response ~~
Welcome!