Coldfire -  Flash Programmer Task Error

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

Coldfire -  Flash Programmer Task Error

2,104 Views
matiascordero
Contributor I

Hi, Im trying to program a Coldfire V2 MCF52235CAL60 with codewarrior v10.5 on a computer with OS Windows Xp 32 bits. In order to do this, we are using a PEMICRO P&E USB Universar Multilink, using its port D.

 

I ve tried to do the following task always with similar kind of error.

-Blanck Check fails.

-Program fails.

-Hardware Diagnostic Fails.

 

On the other hand, erase task success.

 

The error I receive when programming is copied below.

 

---ERROR MESSAGE---

fl::target -lc "test1_FLASH_PnE U-MultiLink"

fl::target -b 0x20000000 0x8000

fl::target -v on -l off

cmdwin::fl::device -d "CFM_MCF52235" -o "8Kx32x1" -a 0x0 0x3ffff

cmdwin::fl::image -f "C:\\My-Proj.S19" -t "Motorola S-Record Format" -re on -r 0x0 0x3ffff -oe on -o 0x0

cmdwin::fl::write

Beginning Operation ...   

-------------------------

Using restricted address range 0x00000000 to 0x0003FFFF  

Programming file C:\My-Proj.S19  

Performing target initialization ...   

Downloading Flash Device Driver ...  

Reading flash ID ...

Downloading 0x00006030 bytes to be programmed at 0x00000000  

Executing program ....  

Error:  Program failed.   Flash driver reports the following error(s): The flash device algorithm was interrupted during execution.

Please check if the flash base address is correct or if there are any flash devices mapped inside the selected memory space.

If a custom target initialization file was used then check the following parameters: flash base address, flash bank size and flash

bank port size.

Please enable Verify Target Memory Writes in Target Configuration to check that the algorithm downloads correctly. If you are down

loading the algorithm to DDR try checking your DDR configuration.

An invalid preference was passed to the ColdFire GDI protocol(ColdFire GDI Protocol Adapter)

Error: Program failed. Flash driver reports the following error(s): The flash device algorithm was interrupted during execution.

Please check if the flash base address is correct or if there are any flash devices mapped inside the selected memory space.

If a custom target initialization file was used then check the following parameters: flash base address, flash bank size and flash

bank port size.

Please enable Verify Target Memory Writes in Target Configuration to check that the algorithm downloads correctly. If you are down

loading the algorithm to DDR try checking your DDR configuration.

----------------

 

I am attaching the screenshot of the Flash Programer Task.

 

10295_10295.pngFlash_Program_Task.png

 

I’ve upgraded U-multilink firmware. I’ve reinstalled U-multilink driver.

 

Any idea? I’m a bit confused.

 

Thanks a lot.

Labels (1)
0 Kudos
4 Replies

807 Views
Jorge_Gonzalez
NXP Employee
NXP Employee

Hello Matias:

We are sorry for the time with no replies.

I see this happens to you with a target task. Have you tried to flash the device with a new project but with a debug session instead?

This would help to confirm that your device can be programed and it is not damaged.

Also, please open the "Program" operation you have in there and take a screenshot to see the configurations. I see you have an Address Offset, have you tried with no address offset?

I tried from my side with a M52235EVB board and had no problems to erase, blank check or program in CodeWarrior v10.5.


Regards!
Jorge Gonzalez

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

807 Views
matias178
Contributor I

Hello, thanks for answering.

Now, placed on another computer with W7 32bits, I installed CW 7.2 and unfortunately I've reached the same result.

But I could use the Hardware Diagnostic tool available on this CW version and I succeeded in reading the following address from the target.


(Address 0x40000000) = IPSBAR = (value 0x40000001)

(Address 0x40110000) = RCR = (value 0x05)

(Address 0x40110001) = RSR = (value 0x04)

(Address 0x40110004) = CCR = (value 0x0600)

(Address 0x40110007) = LPCR = (value 0x02)

(Address 0x40110008) = RSR = (value 0x0000)

(Address 0x4011000A) = CIR = (value 0x1301) means it’s a MCF52235

(Address 0x401D0000) = CFMMCR = (value 0x0000)

(Address 0x401D0002) = CFMCLKD = (value 0x00)

(Address 0x401D0008) = CFMSEC = (value 0x00000000)

(Address 0x401D0010) = CFMPROT = (value 0x00000000)

(Address 0x401D0014) = CFMSACC = (value 0x00000000)

(Address 0x401D0018) = CFMDACC = (value 0x00000000)

(Address 0x401D0020) = CFMUSTAT = (value 0xC0)

(Address 0x401D0024) = CFMCMD = (value 0x00)

(Address 0x401D004A) = CFMCLKSEL = (value 0x0000)

Knowing this I could say

- I am able to communicate with the target through the Universal Multilink successfully.

- The Universal Multilink works properly..

- This last block of registers means that flash is neither secured nor protected.

- The target is not damage, it answers correctly.

Here are some screenshots.


Hardware Diagnostic of CW.7.2

Nuevo Imagen de mapa de bits.PNG.png

Nuevo Imagen de mapa de bits.PNG.png



This happens when trying to debug. This window appears and I cannot neither step nor run.

cero - debug no run.PNG.png

When I execute the diagnostic task, this error is thrown. Similiar to Blank Chek and Program task executions.uno- Error on diagnostic Task.PNG.png

Other configurations.

dos - Session.PNG.png

tres.PNG.png

The offset you mentioned was 0x00000000.

I suspect I have some configuration problem. Either in the lcf file or in the cfg file or in the .mem file. I am using the defaults provided by CW for this files.

That’s why I’ve prepared and attached a single program (workspace zipped - TEST1.zip) developed on CW 10.5 with the Prossesor Expert.


This is the code into the workspace I've attached plus PE initializations of course.

int count =0;

count++;

The S19 file generated from this project cannot be programmed with the program task...

I cannot debug neither in RAM nor in FLASH. Why couldn’t I debug on RAM?


Program, Blanck Check, Diagnostic Tasks fail.

Erase Task doesn't fail. However.... With the Hardware diagnostic I read values different to 0xFF from addresses 0x00000000 ---

After erasing the flash FF values are expected isnt it?

Ok... I will go on working.

Thanks Thanks a lot.

Regards

Matias

0 Kudos

807 Views
tsi-chung_liew
NXP Employee
NXP Employee

Hi,

Can you go back to CW7.2 with correct HW cofiguration set to M52235EVB.CFG? I think the reason it does not work on CW7.2 is that you have chosen the wrong cfg file (MCF5235.CFG) that does not have internal flash support (FlashBar is not enabled).

Regards,

TsiChung

0 Kudos

807 Views
Jorge_Gonzalez
NXP Employee
NXP Employee

Hello Matias:

Sorry for the delay to reply.

I see that you have covered a lot of options and all your setup seems to be correct.

I remember a while ago I had these kind of problems and they were related to the power supply of my board. It was solved changing to a power supply with more volts and amperes available. Obviously you need a proper regulator, are you using custom board or Freescale EVB board?

I know this is a vague response, but I really had those problems, and other than that I am out of ideas :S

Regards!

Jorge Gonzalez

0 Kudos