How burn program on Kinetis MCU, like K40X256?

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

How burn program on Kinetis MCU, like K40X256?

Jump to solution
2,423 Views
Magnetron
Contributor III

Hi, all!

 

How can I burn program on K40X256 MCU?

I download and run my program via IAR (Download and Debug button), but after restart the default demo program running :-(

How can I burn my program forever?

0 Kudos
1 Solution
1,100 Views
anthony_huereca
NXP Employee
NXP Employee

Are you using the Flash taget? See Section A.6 Step 5 in the Kinetis Quick Reference Guide: http://cache.freescale.com/files/32bit/doc/quick_ref_guide/KQRUG.pdf

 

 

View solution in original post

0 Kudos
7 Replies
1,100 Views
GerasinIvan
Contributor II

Hello,

I'm using CW 10.2 and work with microcontrollers at the first time. My program work correctly (tested in debug), but how burn progrgam to MC, so i can disconnect it from CW, and program works after reset? I'm programing in flash/

Thx for answering and sorry for my english)

0 Kudos
1,100 Views
Sören
Contributor I

Hey,

 

I use the CW 10...

 

My program runs perfectly in RAM-MODE, but if compile the program for the FLASH and download it, it doesn't work?!

If i try to debug it, it is unable to start properly. During the startup, especially while setting the MCG-register the program try to jump at some suspicious addresses like 0x00203128.

Despaired, i generate a project with the processor expert... and download it to the flash ... and it works!

But if i select the internal core clock with 96 Mhz, the program generated with PE, is unable to run in FLASH-MODE...

 

Could anybody please help me out?

 

Best regards

0 Kudos
1,100 Views
ProcessorExpert
Senior Contributor III

 

Hello,

 

could you please post here the PE project that leads you to getting the problem? Please provide also chip mask.

 

best regards
Vojtech Filip
Processor Expert Support Team

0 Kudos
1,101 Views
anthony_huereca
NXP Employee
NXP Employee

Are you using the Flash taget? See Section A.6 Step 5 in the Kinetis Quick Reference Guide: http://cache.freescale.com/files/32bit/doc/quick_ref_guide/KQRUG.pdf

 

 

0 Kudos
1,100 Views
Magnetron
Contributor III

Thx!!!

0 Kudos
1,100 Views
JTech
Contributor III

This is one of the most common "gotchas" when one moves over from 8/16 bit machines to 32 bit machines where programs are run from RAM, rather than the FLASH, during debugging.
The reasons for this are quite good though, I guess it makes setting breakpoints easier for a start, and speeds up the whole execution of a debugging session. I also must mention that bootloaders are standard in this environment.

0 Kudos
1,100 Views
RobertSignum
Contributor I

Hi,

 

If you have good, fast JTAG emulator you do not  see a difference when your code is being programmed into the flash or loaded into RAM. Certainly program needs to be linked differently and has propert vectors, but it is different story.

 

Cortex-M4 has several HW breakpoints (and our debugger utilize them all), so this is not big issue either.

 

See here for supported Freescale CPUs:

 

http://www.signum.com/freescale.htm

 

Regards,

Robert

 

0 Kudos