How burn program on Kinetis MCU, like K40X256?

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

How burn program on Kinetis MCU, like K40X256?

ソリューションへジャンプ
4,029件の閲覧回数
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 件の賞賛
返信
1 解決策
2,706件の閲覧回数
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 件の賞賛
返信
7 返答(返信)
2,706件の閲覧回数
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 件の賞賛
返信
2,706件の閲覧回数
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 件の賞賛
返信
2,706件の閲覧回数
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 件の賞賛
返信
2,707件の閲覧回数
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 件の賞賛
返信
2,706件の閲覧回数
Magnetron
Contributor III

Thx!!!

0 件の賞賛
返信
2,706件の閲覧回数
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 件の賞賛
返信
2,706件の閲覧回数
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 件の賞賛
返信