Author: yesha98
Creation date:
Evaluation Type: Development Boards & Tools
Did you receive all parts the manufacturer stated would be included in the package?: True
What other parts do you consider comparable to this product?: A PEmicro or any other compatible debugger
What were the biggest problems encountered?: Documentation & Out-of-box demo: There is no datasheet & pinout for the motors supplied with the kit. The out-of-box demo application is not programmed with the board, hence one has to find all the packages with the right versions installed in the exact location in the C drive to build the SW & flash the reference application. This also means you can spin the motors only if you can successfully build the SW, contrary to out-of-box demos which come pre-programmed in the MCU.
Detailed Review:

Background
I work in the Automotive Industry, and I'm aware of the AUTOSAR architecture. Hence I decided to apply for this RT. Initially, I received the board with the three PMSMs. However, I could not use the board, after debugging this with the manufacturer we found the board was defective, link to the ticket. To summarize the issue, the MCU's_reset LED (D7) was glowing continuously after the board was powered ON, this explains why the debugger could not halt the core. I'm unsure if the issue is with the MCU or the board. The debugger was able to connect with the new board. I used a SEGGER J-LInk debugger.

Thanks to rscasny for arranging the replacement for this board. I was able to work with the new board & got the motors to spin.
Introduction
Unboxing and on-board features
The board is rich in interfaces for the user, such as UART for FreeMASTER, CAN, and LIN interface. The triple PMSM motor operation is based on sensorless application, hence we need to connect only the phase wires of the motors. The board uses three GD3000 3Ph motor pre-driver ICs. The board can also be used to control a DC motor. One of the interesting applications for this design is the Integrated Thermal Management Unit used in automobiles.


Yet, it lacks a user GPIO. I was trying to profile the FOC loop SW and figured there is no user GPIO on this board. However, I managed to do it by using LED4 as GPIO and connecting the logic analyzer probe to the test point on the boar
Out-of-Box Demo
As mentioned above, the out-of-box demo is not pre-programmed with the board. I assume the flash is erased after testing the board before shipping. One can follow this link to get all the required SW, starting from the S32 Design studio to all the other SW packages such as Inter platform communication SW, Real-Time Drivers, etc. But one thing to note here is, that you must give the default install location in C:\ drive while installing the SW packages since the source files are referenced using the absolute path, and if the packages are installed in D: or E: drive, the SW will not build with the reference projects that was imported into the IDE.
Given below is the debugger configuration that was used to flash the application into the MCU.


Since this is a sensorless application, the code uses a SW algorithm that tracks rotor position using the back EMF produced by the motors.
Here's a video on getting the SW built and using the SW3 and FreeMASTER Tool to run the motors:
Hardware Setup
Power Supply
I used a Desktop SMPS to power the board. The power output was 12V, 24A Max. (288W) which I think is sufficient to power the board & motors.
Motors Mount
I used cable ties and acrylic sheets to mount the motors. So the only way to identify the three phases of the motors was by using a continuity tester & also by the fact that the phase wires need to carry more current than the sensor wires. Hence the phase wires are thicker than the sensor wires. All three phase wires will show continuity with each other while the sensor wires don't. The reason to take this approach is because there's no documentation on the motor wires pinout.

Debugger
I used a SEGGER J-Link debugger to flash the code.
GUI Demo
Setup

The GUI Demo uses the onboard CAN interface & an STM32F746 Discovery Kit. The GUI application is developed using TouchGFX, the code used for this demo can be found here.
I felt the details on the data fields in the CAN interface provided in the getting started page could be more detailed - even though I used the obvious approach and it worked.
SW and Profiling

The RTD (Real-Time Drivers) supports the AUTOSAR environment which ensures easy integration while developing for automotive applications. The FOC calculations that involve Park/Clark transformation are done using the Automotive Math and Motor Control Library Set (AMMCLib). It also provides functions for observing the back EMF, as used in this sensorless application. The IPCF is used for communication between the cores which also provides freedom from interference and a zero-copy approach for optimal performance. The PMSM control comes as part of the application layer, where one can also write applications for DC motor control. The FreeMASTER tool on the host machine uses JavaScript for the UI.
This section describes the profiling of the FOC loop in SW using the LED4 GPIO.

Here we can see that the time taken for the FOC loop is much less, and the three spikes show the FOC loop being run for three PMSMs. The interval between the consecutive FOC loops for the same motor remains 1ms irrespective of the RPM set.

Summary
The S32K324 MCU used in this board is rich in peripherals and has 2 cores. The reference application demonstrates FOC loop and FreeMASTER control running in Core0 and CAN communication running on Core1 at 160MHz. The performance of the MCU for this SW is quite impressive, given the cores run complex algorithms that are math-intensive. The TCM (tightly coupled memory) used in this MCU is essential for optimal performance of the SW. The user guides provided explain most of the things that are needed to get started with the out-of-the-box demo application. The FreeMASTER tool is very intuitive and the UI is clean. It would've been better if the out-of-the-box example was also provided as binaries that one could program without the need to set up the build environment which does take quite some time to correctly set up.
The CAN communication interface used in this demo is also very easy to use. The MCU starts sending the status of the motors every 100ms once it receives the first data from the CAN master. The RTD being AUTOSAR compliant will facilitate seamless integration in the ECU software. While there are some hiccups in the initial setup, the development is easy once all these one-time tasks are done. The S32 design studio supports dual-core debugging which is very essential for debugging applications on the S32K324 MCU.