K82 FTM2 Quad decoder is inaccurate

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

K82 FTM2 Quad decoder is inaccurate

ソリューションへジャンプ
524件の閲覧回数
Danger
Contributor II

I'm working with a K82 MCU and a magnetic encoder attached to a motor.  The encoder has 512 counts per rotation; with my targeted motor speed, the encoder output should be around 10KHz.  I've configured FTM2 as a quad decoder.  The clock is 60MHz and has a prescaler of 16.  I am not using semi-hosting for debugging.

The quad decoder is not working properly - it might be losing counts, but that's hard to say because the bigger issue is that the direction is unreliable.  When hand turning the motor, if I pause for a moment, then resume turning, there is a high probability that the direction will flip.  I've been at this for a while; changing clock frequencies, adding filters, etc. to no avail.  Scope captures of the encoder show a very clean signal.  What could be causing this?

タグ(3)
0 件の賞賛
1 解決策
488件の閲覧回数
Danger
Contributor II

It turns out that the problem was an assembly defect - one of the MCU pins was not soldered down to its pad.  Firmware debugging is always an adventure.

元の投稿で解決策を見る

3 返答(返信)
492件の閲覧回数
Danger
Contributor II

Thanks for the reply.  I'll have to dig up a freedom board and investigate.  I'm currently working with custom hardware that has the encoder routed to PTB18 and PTB19, so FTM2 is all I have at my immediate disposal.

0 件の賞賛
489件の閲覧回数
Danger
Contributor II

It turns out that the problem was an assembly defect - one of the MCU pins was not soldered down to its pad.  Firmware debugging is always an adventure.

497件の閲覧回数
_Leo_
NXP TechSupport
NXP TechSupport

Hi,

Thank you so much for your interest in our products and for using our community.

The frdmk82f_ftm_quad_decoder_peripheral SDK example use the FTM1, Does the same thing happen to you with the latter?

Have a nice day!

0 件の賞賛