BDMMODE in Quad Decodeing

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

BDMMODE in Quad Decodeing

509 Views
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

Labels (1)
0 Kudos
3 Replies

404 Views
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 Kudos

404 Views
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 Kudos

404 Views
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 Kudos