Problem in Working of K60DN512Z LED blinking code

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

Problem in Working of K60DN512Z LED blinking code

853 Views
Embionics
Contributor III

Hello,

 

I am working with K60DN512Z controller using CW 10.3.

I gone through the example code generated by processor expert.

There I observed that the generator configuration is Internal_FLASH or Internal_RAM.

 

But when I tried new code generated by PE then the generator configuration is FLASH or RAM.

Will it make any difference?

 

Also I am using multilink to download the LED blinking code.

It is not getting connected to the MCU . Then I disable Flash configuration from cpu setting and now it is getting programmed into the MCU.

But my code is not working(LED is not blinking).

 

I am not getting what is the reason that the  disabling the Flash configuration code is getting programmed.

 

Also I tried with JTAG connector(20 pin connector) from multilink.But this is also not working.

I have attached my code for reference.

Please guide me where i am getting wrong.

 

-Amreen

Original Attachment has been moved to: K60_LED-blink.7z.zip

Labels (1)
0 Kudos
5 Replies

644 Views
Kan_Li
NXP TechSupport
NXP TechSupport

Hi Amreen Sayyed,

Actually there is no difference between the configuration of "Internal_FLASH or Internal_RAM" and "FLASH or RAM", they are just the same, I mean Internal_FLASH is FLASH, and same for Internal_RAM and RAM. so if I understand correctly, you may download the example code generated  by PE while met failure when you tried to download a custom PE project, right? The platform is the same, and so for multilink, right? Please also kindly let me know how you disabled Flash configuration from cpu setting. Thanks for your patience!


Have a great day,
Kan

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

0 Kudos

644 Views
Embionics
Contributor III

Hello,

I am able to programmed the chip using J-Link as well as U-Multilink. Actually there was some software up-gradation problem with old multilink. Some how it has not done automatically.

But still my problem of running code has not been solved. I did debug the code too. It is getting halt in "__init_hardware " function at

while((MCG_S & 0x0CU) != 0x08U) {    /* Wait until external reference clock is selected as MCG output */

  }

  while((MCG_S & MCG_S_LOCK_MASK) == 0x00U) { /* Wait until locked */

  }

I guess I have not done some of the CPU setting correctly or completely.

To answer your question Ken I have disabled the "Flash configuration Field" from CPU (component) setting- Internal peripherals. But it does not make difference to run the code as per my observation.

Request you to suggest if I missed to do critical CPU configuration setting to run the code.  You can check my code attached to previous post.

Thanks,

Amreen

0 Kudos

644 Views
DavidS
NXP Employee
NXP Employee

Hi Amreen,

In addition to Kan advice, please note that their are two silicon revisions for the K60.

The K60Z is the older Revision 1.x silicon.

The K60 (without Z) is the newer Revision 2.x silicon.

There are minor silicon changes and some of them specifically affect the clock startup code.  Choosing the incorrect CPU component will cause this kind of error.

Please look at following AppNote to help:

http://cache.freescale.com/files/32bit/doc/app_note/AN4445.pdf

Regards,

David

644 Views
Embionics
Contributor III

Hello Kan,

Yes I am working on TWR-K60N512 platform. I will check those examples for CPU settings. Sorry I mis-spelled your name in my earlier post.

Hi David,

You have provided me with crucial information. I am thankful to you for that. I will check that application note.

Thanks,

Amreen

0 Kudos

644 Views
Kan_Li
NXP TechSupport
NXP TechSupport

Hi Amreen,

Which platform you are using? is it TWR-K60N512? if so , I think you may firstly start with PE examples for that platform. You could find them in the folder of CW 10.x, for example, C:\Freescale\CW MCU v10.6\MCU\CodeWarrior_Examples\Processor_Expert\Kinetis\TWR-K60N512.

Hope that helps,


Have a great day,
Kan

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