Program flash error

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Program flash error

1,075 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by pramodh on Mon Nov 30 09:27:55 MST 2015
Hello,

   I am using LPC4357 Development kit with LPC LinkII and LPCXpressov8.0.0 for my project. I developed a simple multicore blinky project on my own following the instructions under the link :
https://www.lpcware.com/content/faq/lpcxpresso/lpc43xx-multicore-apps

I used Flash bank B for M0 and Flash Bank A for M4.When I flash the code, it works fine for the first few program flash. Later i get the following error after few attempts and I am unable to flash even a single core project.
Driver code (at 0x10000000) not set as written - corrupted at 0x10000000 (word 0)
    Driver code (at 0x10000000) not set as written - corrupted at 0x10000000 (word 0)
    15: Target error from Commit Flash write: Ef(50): Flash driver failed to initialize.

Then I used LPC Linl II Configuration tool to flash the program. It worked fine. Then I did not get the above error. Now I am unable to flash using the Configuration tool also because I get the following error :

PROGRAM CYCLE ERROR
Programming Algorithm failed command : 7
Programming Algorithm failed response: 1
What is the procedure to resolve this error?

Are there any other documents present that explains IPC in LPC4357 (other than application note AN11177) and initial steps to set up the platform for dual core application using LPCXpresso and EA-lpc4357 dev board like the following.
   https://www.lpcware.com/content/project/lpc43xx-dual-core-examples

I have attached detailed description about the errror.

Regards
Pramodh
Labels (1)
0 Kudos
2 Replies

519 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by pramodh on Wed Dec 02 01:56:09 MST 2015
Thanks whitecoe

Ya I used booting into ISP mode (USB0). As you suggested, I used LPCScrypt and now it works.

I used the LPCOpen template for Multicore application from LPCXpresso IDE and just included a LED Blinky toggle code in M0 and M4 main file. I dont know what is corrupting the flash bankB (M0).

Only change in my code :
while(1) {
        i++ ;
        Board_LED_Set(1, true);
        MSleep(1000);
        Board_LED_Set(1, false);
        MSleep(1000);
    }

Are there any documents related to inter-process communication in lpc4357 availabe ? I think thats where the problem lies.

Pramodh
0 Kudos

519 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by whitecoe on Mon Nov 30 09:54:56 MST 2015
Sounds to me like your M0 code is executing and corrupting the flash driver. Have you tried booting the part into ISP mode?

https://www.lpcware.com/content/faq/lpcxpresso/regaining-debug-access
https://www.lpcware.com/content/faq/lpcxpresso/isp-reset-over-debug

And I would suggest you consider using LPCScrypt rather than the old LPC-Link2 Config tool.

https://www.lpcware.com/LPCScrypt

HTH!
0 Kudos