FreeRTOS based PMSM Sensorless Control application available

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

FreeRTOS based PMSM Sensorless Control application available

3,991 Views
pavelsustek
NXP Employee
NXP Employee

Dear all,

 

Let me inform you that new application note AN5309 Sensorless PMSM Field-Oriented Control on Kinetis KV31 with FreeRTOS & eGUI is fully available on NXP web pages including application software AN5309SW.

 

 

AN5309SW V1.0.0

------------------------------------------------------------------------------------------------------------------------------------------

  • Supported HW platform: FRDM-MC-LVPMSM + FRDM-KV31F + Arduino™ R3-compatible LCD TFT
  • Supported MCUs: KV31
  • Main fetaures:
    • Sensorless field-oriented control of PMSM
    • FreeRTOS integration to time-critical  motor control application
    • Interrupt management of motor control and RTOS tasks
    • RTOS task scheduling
    • LCD TFT controlled using eGUI

 

The application is based on PMSM reference project and can be easily ported among supported MCU platforms.

Supported IAR and KDS IDEs

 

Please let us know if you need more details about the AN5309.

160021_160021.pngpastedImage_2.png

 

Kind regards,

 

SW MC Library team.

Labels (1)
0 Kudos
5 Replies

1,453 Views
Haitham_Ismail
Contributor III

Is there a way to access the software file? 
I get page not found when I try to get it.

0 Kudos

1,437 Views
gusarambula
NXP TechSupport
NXP TechSupport

Hello @Haitham_Ismail ,

The link was changed but there is an updated link on the following knowledge base document:

https://community.nxp.com/t5/NXP-Designs-Knowledge-Base/3-Phase-Hall-Sensor-for-Massage-Chair/ta-p/1...

Regards,
Gustavo

0 Kudos

1,412 Views
Haitham_Ismail
Contributor III

thank you for the quick reply

0 Kudos

2,901 Views
pavelsustek
NXP Employee
NXP Employee

Hello @gusarambula

the CPU load in this example has been measured the most probably using Systick timer and macros.

Following code is taken from MCUX SDK Motor control examples.

/*****************************************************************************/

/* CPU load measurement using Systick*/
uint32_t g_ui32NumberOfCycles = 0;
uint32_t g_ui32MaxNumberOfCycles = 0;

/* CPU load measurement SysTick START / STOP macros */
#define SYSTICK_START_COUNT() (SysTick->VAL = SysTick->LOAD)
#define SYSTICK_STOP_COUNT(par1) uint32_t val = SysTick->VAL; uint32_t load = SysTick->LOAD; par1 = load - val

/*!
*@brief SysTick initialization for CPU cycle measurement
*
*@param none
*
*@return none
*/
void BOARD_InitSysTick(void)
{
/* Initialize SysTick core timer to run free */
/* Set period to maximum value 2^24*/
SysTick->LOAD = 0xFFFFFF;

/*Clock source - System Clock*/
SysTick->CTRL |= SysTick_CTRL_CLKSOURCE_Msk;

/*Start Sys Timer*/
SysTick->CTRL |= SysTick_CTRL_ENABLE_Msk;
}

 

/* Start CPU tick number couting */
SYSTICK_START_COUNT();

/* sw routines to be measures */

/* stop CPU tick number couting and store actual and maximum ticks */
SYSTICK_STOP_COUNT(g_ui32NumberOfCycles);
g_ui32MaxNumberOfCycles = g_ui32NumberOfCycles>g_ui32MaxNumberOfCycles ? g_ui32NumberOfCycles : g_ui32MaxNumberOfCycles;

 

Regards,

Pavel

 

2,931 Views
gusarambula
NXP TechSupport
NXP TechSupport

Hello @pavelsustek,

We have a customer asking if there are more details available on how the CPU was measured for AN5309.

It was my understanding from other AN that IAR was used to calculate the CPU Usage. Is that correct? Would you please provide more information on how to replicate the measurements using the available SW for AN5309? Any insights on how these CPU usage data will be very much appreciated.

Regards,
Gustavo

0 Kudos