TWR-K70F120M Tower Module: "not able to run on the target or the flash is not configured properly"

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

TWR-K70F120M Tower Module: "not able to run on the target or the flash is not configured properly"

Jump to solution
1,401 Views
arnogir
Senior Contributor II

Hello

I'm using since few week the TWR-K70F120M Tower Module and I flash and debug it via USB port directly connected on the board.

I haven't yet any problem to use it.

Then I need to use External Nadflash for my software. (I have question about this here: K70 flexnvm used for program flash)

But during my manipulations, something works bad and then since I'm not able to flash the board :smileyconfused:

The debug procedure stop when tcl file is loaded

With the P&E linled to the JTAG  on the board, whenI try to do a "Flash file to target" -> "Erase whole device", following error occurs:

  Erase_error.png


The Console write following:



fl::target -lc "LC for Simple Flash (2)"

 

fl::target -b 0x1fff0000 0x20000

 

fl::target -v off -l off

 

cmdwin::fl::device -d "FTFE_PFlash1M0" -o "128Kx64x1" -a 0x0 0xfffff

 

cmdwin::fl::erase all

 

Beginning Operation ...   

 

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

 

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

 


Please, have you an idea?

0 Kudos
1 Solution
888 Views
arnogir
Senior Contributor II

Hello Adrian.

Thank for your answer. But I think your response answers the question I asked here K70 flexnvm used for program flash

Then I think I will transfert your answer in the other post.


To return to the subject of this post, my problem was a problem to program a basic program (in internal flash) following my try to program the external flash which had failed.

All simple programs like "hello" I tried failed in programing. Error message was presented in my first post.


My collegue found how to resolve my problem.

Just need to tick the following option at least one time. After that, the programing works again.


Resolve.png

View solution in original post

0 Kudos
4 Replies
888 Views
arnogir
Senior Contributor II

So If I well  understand, I had a target task like following:

TargetTask.png

and then in Debug Configuration\ Debugger I add the target task created.

I start the debug, but loading failed with following message in the console:

Executing download task: {----MyWorkspace---}\build-twrk70n1m-cw-mqx-d\cw10\Task_Flash_ExtNandFlash.tcl

cmdwin::fl::target -lc hellopeg twrk70f120m_IntFlash_DDRData

cmdwin::fl::target -b 0x1fff0000 0x20000

cmdwin::fl::target -v off -l off

cmdwin::fl::device -d mt29f2g16 -o 1024Mx16x1 -a 0x60000000 0x6fffffff

cmdwin::fl::image -f  {----MyWorkspace---}\build-twrk70n1m-cw-mqx-d\cw10\twrk70f120m_I

nt_Flash_DDRData_Debug\hellopeg.afx -t Auto Detect -re off -oe off

cmdwin::fl::erase image

Beginning Operation ... 

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

Auto-detection is successful. 

  File is of type Elf Format. 

Performing target initialization ... 

Downloading Flash Device Driver ... 

Reading flash ID ... 

Reading flash ID .... 

Reading flash ID ..... 

Reading flash ID ...... 

Reading flash ID ....... 

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

<e>Error: Getting flash ID failed </e>

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

And the following window:

FlashError.png

???

0 Kudos
888 Views
adriancano
NXP Employee
NXP Employee

Hi,

First of all you need to configure in the tcl file the NandFlashController to be able to communicate with the memory you are using.

If you decide to use a Flash device that is not supported by CodeWarrior you must make two things to have it usable.

1.Create a Flash Algorithm: CodeWarrior uses .elf files which describe Flash algorithms. Although some flash memories have the same physical characteristics, the program and erase time cycles may change from one memory to other (even if they are from the same manufacturer). This is why you must create a flash algorithm for the device you have selected. In your CodeWarrior installation path you can find a document which explains how to create an algorithm for a flash device.

2.Create the flash device description and add it to CodeWarrior: Once you have the appropriate algorithm for your flash memory you must create a device description. The device description is a bunch of parameters that you must add to a .xml file with the appropriate Syntax. This file contains all supported flash devices. You can generate this information by yourself or you can use a script to generate the info and just paste it in the .xml file.

You can find this process in the Application Note AN3859.

I hope this information can help you.

Regards,

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

Note: If this post answers your question, please click the Correct Answer button. It would be nice!

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

0 Kudos
888 Views
arnogir
Senior Contributor II

Hello Adrian

Then first, I must modify the tcl file like following (Is ti right?)

Change "reserved   0x60000000 0x6FFFFFFF"

by "range   0x60000000 0x6FFFFFFF 4 ReadWrite  // External Nand flash MT29F2G16"

Second "If you decide to use a Flash device that is not supported by CodeWarrior you must make two things to have it usable."

I use the standard K70 Tower which have an external nandflash linked on the FlexBus. The nandflash is an MT29F2G16.

It seems to me that my codewarrior have already needed file (C:\Freescale\CW MCU v10.3\MCU\bin\plugins\support\Products\ProductData\ARMFPDevices.mwpdb\FP\mt29f2g16.xml)

So, if I made steps done in my first post here: K70 flexnvm used for program flash and I modify the Tcl file, what I have to do to program my software which have data containing both  in Internal and external flash?

0 Kudos
889 Views
arnogir
Senior Contributor II

Hello Adrian.

Thank for your answer. But I think your response answers the question I asked here K70 flexnvm used for program flash

Then I think I will transfert your answer in the other post.


To return to the subject of this post, my problem was a problem to program a basic program (in internal flash) following my try to program the external flash which had failed.

All simple programs like "hello" I tried failed in programing. Error message was presented in my first post.


My collegue found how to resolve my problem.

Just need to tick the following option at least one time. After that, the programing works again.


Resolve.png

0 Kudos