Device Initialization generate incorrect code for FlexTimer of Kinetis?

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

Device Initialization generate incorrect code for FlexTimer of Kinetis?

ソリューションへジャンプ
2,878件の閲覧回数
jilingshu
Contributor I

hi all,

I create a new project with MCU is K60 in CodeWarrior and I choose Device Initialization at final step of that wizard. Then I configure FTM0 to generate PWM in Processor Expert and generated MCUInit.c and MCUInit.h. However, there are no PWM generated, and I read this code snip in MCUInit.c:

SIM_SCGC6 |= 0x01000000UL;                                 /* FTM0_C0SC: ELSB=1 */FTM0_C0SC |= 0x08UL;                                 /* FTM0_C0V: VAL=0x07D0 */FTM0_C0V = 0x07D0UL;                            /* FTM0_FILTER: CH0FVAL=0 */FTM0_FILTER &= (unsigned long int)~0x0FUL;             /* FTM0_MOD: MOD|=0x0FA0 */FTM0_MOD |= 0x0FA0UL;                /* FTM0_SC: CPWMS=1,CLKS|=1 */FTM0_SC |= 0x28UL;

 In fact, FTM0_SC have to be setted BEFORE FTM0_C0SC, or PWM will not be generated.

Is this a bug? Thanks.

ラベル(1)
タグ(1)
0 件の賞賛
返信
1 解決策
2,472件の閲覧回数
ProcessorExpert
Senior Contributor III

Hello,

CW V10.x has been published on FSL web. You can use the link below to download it:

http://cache.freescale.com/lgfiles/devsuites/MCU/CW_MCU_v10.6_SE_Offline.exe?fpsp=1&WT_TYPE=IDE%20-%...

best regards
Vojtech Filip
Processor Expert Support Team

元の投稿で解決策を見る

0 件の賞賛
返信
3 返答(返信)
2,472件の閲覧回数
ProcessorExpert
Senior Contributor III

Hello,

 

yes, you are right, this is know issue in CW V10.1. It has been already fix for CW V10.2. Would be sufficient for you to use the FINAL version of CW V10.2 that should be published within the next week?

 

best regards
Vojtech Filip
Processor Expert Support Team


2,472件の閲覧回数
jilingshu
Contributor I

Thx for ur help :smileyhappy:

0 件の賞賛
返信
2,473件の閲覧回数
ProcessorExpert
Senior Contributor III

Hello,

CW V10.x has been published on FSL web. You can use the link below to download it:

http://cache.freescale.com/lgfiles/devsuites/MCU/CW_MCU_v10.6_SE_Offline.exe?fpsp=1&WT_TYPE=IDE%20-%...

best regards
Vojtech Filip
Processor Expert Support Team

0 件の賞賛
返信