Device Initialization generate incorrect code for FlexTimer of Kinetis?

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

Device Initialization generate incorrect code for FlexTimer of Kinetis?

Jump to solution
1,799 Views
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.

Labels (1)
Tags (1)
0 Kudos
1 Solution
1,393 Views
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

View solution in original post

0 Kudos
3 Replies
1,393 Views
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


1,393 Views
jilingshu
Contributor I

Thx for ur help :smileyhappy:

0 Kudos
1,394 Views
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 Kudos