Hi Dave and all others here,
I already sayed thanks to Rodri (the previous thread), because already his solution with lpclink2-config-tool works perfectly for me too!
Also let me say thank you to you Dave, because you further helped to find a solution.
I also had a LPC Link II and worked with it 3 month. This morning, the same error came-up.
But the basic question here is "Why the error flash programming impossible" does appear at all of us?
I have had a look at Rodri's code "Test_LED" because I wanted to find-out what we have done both.
We both do not access the flash from wqithin our code.
But we both use the USB stack and we both use a Timer Interrupt and we both use the HSADC.
My error came up (after months of no error) after I used the HSADC, the USB stack (HID device) and the SysTick.
I had to change the SysTick IRQ prio in NVIC because the LPC SysTick_Config changed SysTick's prio to lowest.
Unfortunately (blackout yesterday) I have sent a Bluetooth LE advistising packet from within (!!!) the SysTick IRQ handler and this takes some time and is repeated every 2 millisecs.
I have seen, that the USB stack is no more responding after 20-30 seconds. So I moved-out the BT packet sending code and wanted to program the device and the error came-up.
My opinion is, that my lengthy SysTick handler prevented the USB stack to continue (no USB response). My SysTick is at highest prio, so it can also interupt USB and for a "lengthy" time not return to USB.
And this might have caused the flash programming problem.
With the modified code (thanks to Rodri now in my board) the USB stack no more hangs, my adverstising packet is sent
from the main while loop (signaled by SysTick), the 80Msamples ADCHS values are transfered through USB and the board again can be re-programmed as often I want.
@NXP:
1. One more bug in USB stack?
2. The LPCScrypt can not solve the program, the old LPC_Link2_Config_tool_v1_11_1.zip (834KByte, no need for .NET) solved it.
3. The modified LPC18_43_SPIFI_GENERIC.cfx I could not test, because the error no more appears.
Could move the packet sending code again into the SysTick and check, wether it appears again.
Harry