This example demonstrates the usage of all four cores by TMU. Additionally, the example also implements Park and Inverse Park Transform which has use cases in high performance drive architectures related to permanent magnet synchronous and asynchronous machines. The implementation of this transform is as follows:
Park Transform:
Isd = Ialpha*cos(theta) + Ibeta*sin(theta) Isq = -Ialpha*sin(theta) + Ibeta*cos(theta)
Inverse Park Transform
Ialpha = Isd*cos(theta) - Isq*sin(theta) Ibeta = Isd*sin(theta) + Iq*cos(theta)
Ialpha = Stationary d-axis stator current
Ibeta = Stationary q-axis stator current
Isd = Rotating d-axis stator current
Isq = Rotating q-axis stator current
theta = Rotating angle in per unit
To implement the trigonometric function calls, TMU specific operations have been put into use as TMU have better performance in comparison to the C mathlib supported trigonometric function calls. This example can be run parallely on all four cores supported by the chip, due to it's multi-core functionality
In AM263Px, the writes to TMU (TMU instance of core 1, in each cluster) corrupt the TCMA of the respective cores. That is, the writes TMU registers offset from 0x40 to 0x3A0 of TMU, will be reflected on the TCMA offsets 0x40 to 0x3A0.
The code / data present in the TCMA of these cores will be corrupted upon using these TMUs. Hence the following workaround is proposed: If the TMUs of Cores 1 are being used, their respective TCMAs should be blocked from 0x40 to 0x3A0. This workaround is implemented in the example TMU 4 Cores Support. Please refer Memory sections of the example's syscfg.
| Parameter | Value |
|---|---|
| CPU + OS | r5fss0-0 nortos |
| r5fss0-1 nortos | |
| r5fss1-0 nortos | |
| r5fss1-1 nortos | |
| Toolchain | ti-arm-clang |
| Board | am263px-cc, am263px-lp |
| Example folder | examples/drivers/tmu/tmu_cores_support/ |
Shown below is a sample output when the application is run,