According to the STM32-Primer-Manual, once an application is run (usually through a menu selection), CircleOS will first call an initialization routine for the application, then will repeatedly call the application handler at the Systick frequency until it returns a MENU_LEAVE value. When CPU is running at 36 MHz, the Systick frequency is about 1.5 KHz (36MHz / 24000). The Application_Handler( ) function should be called repeatedly at 1500 times per second. However, I found the Application_Handler( ) calling frequency is much slower than the documented rate. I wrote a simple application handler function as following:
enum MENU_code Application_Handler ( void )
{
static int count = 0;
if((count % 10) == 0 )
{
char msg[16];
UTIL_uint2str(msg, count, 8, 0);
DRAW_DisplayString(5, 20, msg, sizeof(msg));
}
++count;
}
The count is reported at 10 times slower than the Systick frequency. Can someone tell me what frequency is the application handler function being called?
Thank you,
Jingxi