cancel
Showing results for 
Search instead for 
Did you mean: 

MCP code

shane mattner
Senior

Has anyone been able to implement the MCP in python or C code?  I've been trying to figure it out in Python for a while now.  It's really disappointing ST doesn't provide a .c/.h file for this protocol as I've wasted a ton of time trying to re-implement what Motor Pilot does.  This is really low quality support from ST to say "go read the documentation and re-implement this complex protocol".

 

Here's a link to a post I made previously with some other good links and info:
https://community.st.com/t5/stm32-mcus-motor-control/aspep-mcp-protocol-implementation/m-p/727572#M10997

2 REPLIES 2
Dougle
Associate

Sorry to reply to such an old post.  I am in the same boat where I need a library to be able to communicate w/ the ST eval board I'm using to automate some testing and Python is my preferred language for this task.  Some of the links in your old post are dead, so there isn't much info available anymore.

 

Were you able to implement something that was working and if so is it posted any place for general usage?  As you were researching, did you come across this (https://github.com/ajitbasarur/STM32-Motor-Control-Interface-) library and if so, what was your experience w/ it?

shane mattner
Senior

Thanks @Dougle , I did not know about that repo.

 

I packaged up all the python code and work I did with the STM32 MCSDK in this repo:

https://github.com/shanemmattner/stm32_motor_control_protocol

I'll release it as a PyPi project if I can get it working well enough.

 

I also made a branch to implement the STM32-Motor-Control-Interface adaption because it's much better than what I got kinda-sorta working.  I'll see if I can get to test it this week.

https://github.com/shanemmattner/stm32_motor_control_protocol/tree/feature/registry-service-implementation

 

Message me if you have questions, share any work you make progress on please!