AnsweredAssumed Answered

Input edge capture problems, doesn't detect edges

Question asked by Mikel Godoy on May 16, 2017
Latest reply on May 18, 2017 by dumitru-daniel.popa

Hi,


I'm developing a motor control program with Simulink using the Motor Contol Toolbox. I am currently using the following boards:

- TWR-KV31F120M

- TWR-MC-LV3PH

 

And the controlled motor is a BLDC type: Linix 45ZWN24-40.

 

I need to read the hall sensors signal to know the rotor position and make a trapezoidal control, so I have configured PTB18, PTB19 and PTA13 pins in Input Edge Capture blocks connected to FTM2_CH0, FTM2_CH1 and FTM1_CH1, as it says in user manual, then I could read the pin logic via GPIO to know the motor position.

 

When I try to read the signal logic via GPIO input, I can see that FTM1_CH1 is the only one that detects rising and falling edges. FTM2_CH0 and FTM2_CH1 detect nothing. Am I doing something wrong? Does FTM need to be initialized in some way to work in capture mode? Why is FTM1 working and FTM2 not?

 

Thank you all.

Outcomes