cancel
Showing results for 
Search instead for 
Did you mean: 

How to control stepper motor using STM32MP157?

GreatPaul
Associate

Hello,

I want to to know how to control the Acceleration and deceleration of stepping motor using stm32mp157, I think It needs config the TIM2(for example) to one pulse mode and update the new period and enable when interrupt occurs (MOTOR_PUL_IRQHandler), but I can not find the interrupt callback function in  Kernel PWM API. is it possible to do the accurate control in core A7? or the part should be done in Core-M?

if in Core-M, how to get the motor position counter in A7? that is may be another topic about the communication between core A and core M?

thanks in advance.

1 REPLY 1
Olivier GALLIEN
ST Employee

Hi @GreatPaul​ ,

Sorry to come so late on this post.

Control from Linux or M4 will depend on your need and constraint.

from 100Hz to 1KHz a generic linux could be fine in term of latency and jitter

Above you would need either a Linux RT or offload to M4.

Second solution is the one recommended on STM32MP15.

You will likely benefit of motor control ecosystem of MCU like STM32F4.

Olivier

Olivier GALLIEN
In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.