what all are the changes to be made while porting code from TWR-K22F120M to TWR-K20D72M

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

what all are the changes to be made while porting code from TWR-K22F120M to TWR-K20D72M

1,620 次查看
josephxavier
Contributor III

i need to write project(using cpp) on TWR-K20D72M using MQX , but since it no available  using KDS_2.0.0 and KSDK_1.1.0 ,I decided to create a project using  TWR-K22F120M and port it to TWR-K20D72M.what are the steps to be done .can anyone explain in detail.

0 项奖励
回复
6 回复数

1,392 次查看
ivadorazinova
NXP Employee
NXP Employee

Hello Joseph,

The differences between these two MCUs you find out from datasheets.

You can try it by this way.

Choose the closest BSP to your device (last page at MQX_BSP_Porting_Guide.pdf) and clone it and modify it for your MCU.

mqx.png

You can start with

  • MQX_BSP_Porting_Example_User_Guide.pdf
  • MQX_BSP_Porting_Guide.pdf

located in MQX folder C:\Freescale\Freescale_MQX_4_1\doc\mqx

and MQX_BSP_Cloning_Wizard_Getting_Started.pdf

located at C:\Freescale\Freescale_MQX_4_1\doc\tools

Creating new BSP is very discussed topic at Community, you can find a lot of similar problems like yours.

You can look at similar thread here Re: Creating a New BSP

very useful thread could be Re: Port BSP or go bare metal with PE?

Best Regards,

Iva

0 项奖励
回复

1,392 次查看
mjbcswitzerland
Specialist V

Hi Joseph

The K22 and K20D72 are different generations of Kinetis and so you may do better to start from a K20 (100 or 50MHz) reference instead.

Regards

Mark

Kinetis: µTasker Kinetis support

K20: µTasker Kinetis TWR-K20D72M support / µTasker Kinetis FRDM-K20D50M support / µTasker Kinetis TWR-K20D50M support / µTasker Teensy3.1 support

K22: µTasker Kinetis FRDM-K22F support / µTasker Kinetis TWR-K22F120M support

For the complete "out-of-the-box" Kinetis experience and faster time to market

0 项奖励
回复

1,392 次查看
josephxavier
Contributor III

But K20 is not available as a platform option while using KDS_2.0.0 and KSDK_1.1.0

0 项奖励
回复

1,392 次查看
mjbcswitzerland
Specialist V

Hi

The K20 is better supported with the older CodeWarrior tools.

If you need to use KDS it is probably best to choose a processor that it supports rather than using an older K20.

The Arduino people do still use the K20D72 a lot - see Teensy USB Development Board but it is more for hobby usage since they don't use debuggers.

Regards

Mark

Kinetis: µTasker Kinetis support

K20: µTasker Kinetis TWR-K20D72M support / µTasker Kinetis FRDM-K20D50M support / µTasker Kinetis TWR-K20D50M support / µTasker Teensy3.1 support

K22: µTasker Kinetis FRDM-K22F support / µTasker Kinetis TWR-K22F120M support

For the complete "out-of-the-box" Kinetis experience and faster time to market

0 项奖励
回复

1,392 次查看
josephxavier
Contributor III

what all are the changes to be made while porting code from TWR-K22F120M to TWR-K20D72M<https://community.freescale.com/message/512266?et=watches.email.thread#512266> I just need to do a basic operation for example a ‘0’ through a GPIO

0 项奖励
回复

1,392 次查看
mjbcswitzerland
Specialist V

Hi

Here is a short list of things that may be important.

- K20 has max operating speed of 72MHz and the K22 120MHz

- K22 has FPU and K20 doesn't

- K22 has IRC48M and K20 doesn't

- K22 has LPUARTs and the K20 doesn't

- Some crossbar master switch settings (eg. for USB) are different

- Some DMA peripheral channels are different

- K22 is a second generation device so has a few differences due to this but mostly not things that cause it to not work.

- K22 and K20 interrupt vectors are not compatible

If you can't use a ready workig solution and need to use KDS and MQX you will need to work through all points (and maybe some more that will crop up) or you may be able to purchase support from MQX if it is urgent and you don't manage it yourself.

Regards

Mark

Kinetis: µTasker Kinetis support

K20: µTasker Kinetis TWR-K20D72M support / µTasker Kinetis FRDM-K20D50M support / µTasker Kinetis TWR-K20D50M support / µTasker Teensy3.1 support

K22: µTasker Kinetis FRDM-K22F support / µTasker Kinetis TWR-K22F120M support

For the complete "out-of-the-box" Kinetis experience and faster time to market

0 项奖励
回复