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
------------------------------------------------------------------------------------------------------------------------------------------
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.
Kind regards,
SW MC Library team.
Is there a way to access the software file?
I get page not found when I try to get it.
Hello @Haitham_Ismail ,
The link was changed but there is an updated link on the following knowledge base document:
Regards,
Gustavo
thank you for the quick reply
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
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