Can I use a S32K Model-Based Design Toolbox for S32K1xx Automotive MCU v3.0.0 to control servo motors with multi-turn ABS encoders?
Yes, you can. The only think that you need to handle by yourself is the Encoder signal read-outs. For that Model-Based Design Toolbox provides 2 options:
Hope this helps!
The S32K microprocessor has a dedicated peripheral that can be used to implement any kind of protocol. The peripheral is called FlexIO.
The FlexIO is a highly configurable module providing a wide range of functionality including:
For documentation you can check the https://www.nxp.com/docs/en/reference-manual/S32K-RM.pdf chapter 51
The NXP Model Based Design Toolbox for S32K1xx implements I2C/SPI and UART protocols over FlexIO by calling dedicated drivers from SDK.
In your case, since your encoder support a slightly different communication protocol you will have to configure the FlexIO peripheral in a slightly different manner.
For that you will need too implement standard Simulink S-Function Builder block or to use the Simulink Coder to call your custom code. You can check this as a starting point: https://community.nxp.com/thread/449904#comment-901737 on how to call your own C-code from Simulink models.
In general for custom code you should consult the MATLAB documentation since it is a standard feature.
Dear Sirs,First, read the S32K-RM and check it.Then, refer to the block of SPI or I 2 C, and confirm whether it is somehow.After the sensorless lecture is over, the encoder servo controlAre there any lecture plans?I'm looking forward to it.Best regards
Retrieving data ...