CCSProtocolPlugin : Error writing memory  [CCS last error: Scan timeout ]

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

CCSProtocolPlugin : Error writing memory  [CCS last error: Scan timeout ]

5,860 Views
kristinkrueger
Contributor II

Hello,

 

I followed the steps in this thread (CW won't debug T4240QDS: fails to reset target), downgraded the FPGA version and now CW gives me the above mentioned new error message. I already updated the drivers and firmware for the CW Tap. I'm working on the T4240QDS under Win7 and I try to run the example baremetal project.

 

Any help will be highly appreciated!

 

Kind regards,

Kristin

Labels (1)
0 Kudos
22 Replies

2,999 Views
lunminliang
NXP Employee
NXP Employee

From the other thread you input, it seems you are using a CGA_PLL2_RAT[34-39] 0b011000 which is not supported, see section 4.1.4 Core cluster to SYSCLK PLL ration in Technical Data of T4240QorIQ T Series T4240/T4160/T4080 24/16/8 Virt|Freescale

0 Kudos

2,996 Views
kristinkrueger
Contributor II

Thank you for your reply.

As I used the default switch settings, I can't explain the difference. So you propose to set the RCW manually?

Regards,

Kristin

0 Kudos

2,996 Views
addiyi
NXP Employee
NXP Employee

You could use a default rcw and check if the error is still there. Then you should change the rcw and switches according with your setup.

Adrian

0 Kudos

2,999 Views
addiyi
NXP Employee
NXP Employee

Could you please provide a ccs log (go to Debug Configuration -> Target Settings, Edit -> Advanced -> Advanced CCS settings and Enable logging )?

Also, did you use the default project generated by CW? Did you change init or mem file?

Adrian

0 Kudos

2,999 Views
kristinkrueger
Contributor II

Hello Adrian, thank you for your fast reply!

I did not change any files and used the example project generated by CW. Where do I find the ccs log file?

Regards,

Kristin

0 Kudos

2,999 Views
addiyi
NXP Employee
NXP Employee

Go to Console view, and select your current debug connection (something similar as in attached picture).

Adrian

0 Kudos

2,999 Views
kristinkrueger
Contributor II

Here it is.

0 Kudos

2,999 Views
yipingwang
NXP TechSupport
NXP TechSupport

Hello Kristin,

I suspect there is problem with your RCW, please try whether this problem could be solved by using CodeWarrior JTAG configuration file to override RCW on the target board, please refer to the section "Setting up a remote system to use a JTAG configuration file" in CW_PA_v10.4.0\PA\Help\PDF\Targeting_PA_Processors.pdf.

In addition, please note to check the initialization file after configure JTAG configuration file.

For any result, please kindly let us know.


Have a great day,
Yiping

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

0 Kudos

2,999 Views
kristinkrueger
Contributor II

Hello Yiping,

thank you for your help.

I set the RCW manually and I don't get any errors anymore, but the console output is still missing. The serial connection is up and running, I can read the system information etc. after bootup, but when I run the example code, there is no output generated. When I try to debug, it does not stop automatically, and if it do this by hand, it stops somewhere in dissassembled code (screenshot attached). What prevents the output?

Additionally, what should I check in the initialization file?

Regards,

Kristin

0 Kudos

2,999 Views
yipingwang
NXP TechSupport
NXP TechSupport

Hello Kristin,

It looks that there is problem with DDR controller initialization.

Please try whether it would be better to use SRAM(to replace DDR) initialization file.


Have a great day,
Yiping

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

0 Kudos

2,999 Views
addiyi
NXP Employee
NXP Employee

This happens also using the stationary project?

Adrian

0 Kudos

2,999 Views
kristinkrueger
Contributor II

Yes.

0 Kudos

2,999 Views
addiyi
NXP Employee
NXP Employee

Check the followings:

- rcw (use the one attached)

- init file (use the one attached)

- switch settings, should be like in readme file (T4240QDS_aeabi_README.txt)

- also check the serial console speed to be 115200

- check the serial cable and the serial port on board.

Adrian

0 Kudos

2,999 Views
kristinkrueger
Contributor II

Which flash configuration file should I use to program the RCW with CW flash programmer?

0 Kudos

2,999 Views
addiyi
NXP Employee
NXP Employee

For programming rcw binary to NOR, from Target Task, just import PA\bin\plugins\support\TargetTask\Flash_Programmer\QorIQ_T4\T4240QDS_NOR_FLASH, then create Add Program Action, select Erase sectors before program, set the Address Offset to 0xE8000000 and browse for the rcw binary.

Adrian

0 Kudos

2,999 Views
kristinkrueger
Contributor II

Hello Adrian,

when I try to program the flash the way you mentioned I get the following output and error:

fl::target -lc "LC for Simple Flash"

fl::target -b 0x0 0x180000

fl::target -v off -l off

cmdwin::fl::device -d "S29GL01GP" -o "64Mx16x1" -a 0xe8000000 0xefffffff

cmdwin::fl::image -f "C:\\Users\\krueger\\Documents\\JTAG_T4240_files\\rcw_1_28_6_12_1666MHz.bin" -t "Auto Detect" -re on -r 0xe8000000 0xefffffff -oe on -o 0xe8000000

cmdwin::fl::erase image

Beginning Operation ...   

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

Auto-detection is successful.  

  File is of type Binary/Raw Format.  

Performing target initialization ...   

Downloading Flash Device Driver ...  

Reading flash ID .......

Error:  The algorithm was not able to run on the target or the flash is not configured properly.

Error:  Getting flash ID failed

Error: The algorithm was not able to run on the target or the flash is not configured properly.

0 Kudos

2,999 Views
addiyi
NXP Employee
NXP Employee

Seems that the DDR or NOR is not correctly configured. When this error appears, you can try to use the Reset and be sure that the initialization file is selected. If this is not help, and you are using CW for PA 10.4, you can use SRAM project (select the SRAM launch from Project Wizard > Debug Target Settings).

If you are using an older CW version, please try to use the project attached.

Adrian

0 Kudos

2,999 Views
kristinkrueger
Contributor II

Thank you for your fast responses.

Where should I place the initialization file? Are they automatically used, as several of them are in the CFG folder of the example project?

When I put the core initialization file Adrian provided under Debug configuration>Target Setting>Target>Initialization>Initialize target script for core 0, it stops while initialization with "error writing memory" (as in my first post).

When I replace this file with the SRAM initialization file (if that even makes sense), it produces the same error.

Where is the SRAM project in CW 10.4, which I am using? The Project Wizard shows no SRAM project.

0 Kudos

2,999 Views
addiyi
NXP Employee
NXP Employee

To create a SRAM stationary project, follow the steps:

- New -> CodeWarrior Bareboard Project Wizard

- At Debug Target Settings select Download SRAM or/and Connect SRAM

Then build the project and try to debug it.

Adrian

0 Kudos

2,999 Views
yipingwang
NXP TechSupport
NXP TechSupport

Hello Kristin Krueger,

As discussed previously, it seems there is problem with DDR controller initialization, which causes the flash algorithm cannot be run successfully.

Would you please try to use the SRAM initialization file instead to do flash programming?

Please refer to the attachment in the following post.


Have a great day,
Yiping

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

0 Kudos