I'm developing a motor control program with simulink using the Motor Contol Toolbox. I am currently using the following boards:
And the controlled motor is a BLDC type: Linix 45ZWN24-40.
I need to read the hall sensors signal to make a trapezoidal control, so I configure them in input edge capture blocks connected to FTM2_CH0 (PTB18),FTM2_CH1 (PTB19),FTM1_CH1 (PTA13) pins, as it says in user manual, then I read the pin logic via GPIO to know the motor position.
But 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 so is toggled. The other two channels detect nothing. One of them is always on while the other is off. Am I doing something wrong? Does FTM need to be initialized in some way to work in capture mode?
Thank you all.