BDMMODE in Quad Decodeing

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

BDMMODE in Quad Decodeing

1,129件の閲覧回数
henninjw
Contributor II


I am trying to implement quad decoder on the FTM module to count on the FTM counter whenever a rising or falling edge happens on either channel A or B.  I have read that I need to set the BDM Mode in order to use the FTM counter.  I believe I have set this properly however my counter always reads 0 and view the registers during debug it appears that the BDM is still set to 0.  Below is my code for reference.

 

Thanks

 

146833_146833.pngpastedImage_1.png

146844_146844.pngpastedImage_4.png

ラベル(1)
0 件の賞賛
返信
3 返答(返信)

1,024件の閲覧回数
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Jake,

Which chip do you used ?

And how about these functions ""FTM_Init() , they are write by yourself or from which lib?

And have you enable the FTM clock, also check whether start the FTM .

BR

Alice

0 件の賞賛
返信

1,024件の閲覧回数
henninjw
Contributor II

Hi Alice,

Thanks for the reply. I am using a TWR-K65F180M and SDKv2.0. The FTM_Init() comes from the SDK library and should enable to FTM clock.  I have added the FTM_StartTimer function to start the timer and the counter reads 77.

Jake

0 件の賞賛
返信

1,024件の閲覧回数
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Jake,

I only test the BDM mode , when i configure it , i check the register FTM2_CONF -> BDMMODE,

it is 3 , on you side , does it 0?

pastedImage_0.png

On our first information , you said "my counter always reads 0" , while last information , you said"the counter reads 77"

So i have some confused , could you please send the main file not the screenshot , and also take a screenshot

about the error register ,  what the right data is should be ? I will debug it on my side .

BR

ALice

0 件の賞賛
返信