S32K144 FTM CLOCK can not set as SYS_CLK

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

S32K144 FTM CLOCK can not set as SYS_CLK

747 Views
zhenglai
Contributor I

Hi,

   I want to config FTM clock source,according this figure,I choose SYS_CLK as FTM clock.

FTM colck choose

In my codes,I config register so that work,

FTM0->MODE |= FTM_MODE_WPDIS_MASK;

FTM0->SC |= 0x00030008;

But when I use S32DS Debug find this register value Not equal to I write,

s32ds

I refer  <<S32K1xx Series Reference Manual, Rev. 7, 04/2018>> ,it describes these bits :

S32K1xx Series Reference Manual

so why s32k144 was force to set CLKS as 11b?  Is setting CLKS as 01b forbidden?

0 Kudos
2 Replies

643 Views
razva_tilimpea
NXP Employee
NXP Employee

Hi,

Are you sure that the value of SC is 0 before calling: FTM0->SC |= 0x00030008;?

Try to replate |= with =.

SC register is not buffered and it is not affected by synchronization mechanism, so SC value must match the value configured by you.

Razvan

0 Kudos

643 Views
zhenglai
Contributor I

Hi,

   Sorry,I have find where is problem,register is ok,my code bug! Thank you very much!

0 Kudos