Using fault pin with quaderature decoder BDM mode2

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

Using fault pin with quaderature decoder BDM mode2

904件の閲覧回数
harshpatel
Contributor IV

Hello Everyone

we have to use PAN and tilt motor in our application. We are using MKV10z128xxx7 for PWM and Quadrature decoder functionality.

while using fault pin and quadrature decoder with BDM mode 2 code goes to default ISR.

 

I have read  a NOTE in Reference manual of KV10:

"The BDMMODE[1:0] = 2’b00 must not be used with the Fault control. Even if the fault control is enabled and a fault condition exists, the channels outputs values are updated as above. "

So i want to conform that is it not possible to use both functionality simultaneously?

if yes than is there any way to use quadrature decoder BDM mode 2 and fault functionality simultaneously?

if explain reason then more appreciated...

Thanks & reagards

Harsh

Einfochips INDIA

ラベル(2)
3 返答(返信)

635件の閲覧回数
harshpatel
Contributor IV

Hello xiangjun.rong

Thank you for your response.

i have tried to understand whole things but  still some confusion. so please Can you elaborate this thing?

1] In KV10  when fault interrupt occurs?

2]  when fault int occurs then whats happen with FTM generated PWM signals?

3] How fault pin is related to Quadrature decoder?

Thanks & regards

Harsh

0 件の賞賛
返信

635件の閲覧回数
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi, Harsh,

Q1] In KV10  when fault interrupt occurs?1] In KV10  when fault interrupt occurs?

>>>>>>The Fault signal is an input signal from  FTM perspective, they are from the external,pin or on-chip Comparator. I copy from UM of KV10 for the fault signal.

3.9.1.5 FTM Fault Detection Inputs
The following fault detection input options for the FTM modules are selected via the
SIM_SOPT4 register in the SIM module. The external pin option is selected by default.
• FTM0 FAULT0 = FTM0_FLT0 pin or CMP0_OUT
• FTM0 FAULT1 = FTM0_FLT1 pin or CMP1_OUT
• FTM0 FAULT2 = FTM0_FLT2 pin
• FTM0 FAULT3 = FTM0_FLT3 pin
• FTM1 FAULT0 = FTM1_FLT0 pin or CMP0_OUT
• FTM1 FAULT1 = CMP1_OUT
• FTM2 FAULT0 = FTM2_FLT0 pin or CMP0_OUT
• FTM2 FAULT1 = CMP1_OUT

Q2]  when fault int occurs then whats happen with FTM generated PWM signals?

after proper configuration, When the fault signal appears, the FTM channel signals are disabled, and kept to a safe logic, which is defined in FTM_POL register. For example, if the POL0=0, when fault signals happen, the FTM_CH0 pin PWM signal is disabled, the FTM_CH0 pin is forced to become low logic. If the POL0=1, when fault signals happen, the FTM_CH0 pin PWM signal is disabled, the FTM_CH0 pin is forced to become high logic. After fault signals disappear, the PWM signals will recover automatically or manually.

Q3] How fault pin is related to Quadrature decoder?

>>>I do not think the fault signal takes effect on the Quadrature decoder.

Hope it can help you

BR

Xiangjun Rong

635件の閲覧回数
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi, Harsh,

From my understanding, the fault signal makes sense when you have FTM output PWM signals, the fault signal can disable PWM signal to protect system. If you use the FTM in quadrature mode, the fault signal does not make sense.

Regarding the note "The BDMMODE[1:0] = 2’b00 must not be used with the Fault control. Even if the fault control is enabled and a fault condition exists, the channels outputs values are updated as above.", i think it means that the fault signal can not disable the PWM signal when the fault signal appears even if the fault function is eanbled, when you set the BDMMODE[1:0] = 2’b00.

For the unexpected ISR, pls check the bit8:0 for the xpsr core register  in debugger, it contains the interrupt source. If the ISR index is the FTM, it means that the you enable fault interrupt, but does not provide the ISR.

Hope it can help you

BR

Xiangjun Rong