/var/www/restricted/ssh/stm32/www/stm32circle/ STM CircleOS forum / How to make delay in circle OS?

Username:     
Password:     
             

Forum

# 1   2010-11-05 14:44:08 How to make delay in circle OS?

rajkumarbtvm
New member
Registered: 2010-09-24
Posts: 2

How to make delay in circle OS?

Is there any delay function in circle OS? otherwise , how can we able to create a new function?

Thankyou all

Offline

 

# 2   2010-11-05 15:13:02 How to make delay in circle OS?

yrt
Administrator
From: Grenoble-France
Registered: 2008-06-11
Posts: 520
Website

Re: How to make delay in circle OS?

Sorry, no delay function is implemented in CircleOs yet.

If you do not want to block the system with a loop, you have to increment a counter at each call of the Application handler, and check it.
Your application is called by the OS every 100 Systicks.The Systick period is depending on the CPU frequency choosen (aproximatively 1 ms at 24MHz, 0,33 ms at 72MHz). You can modify this frequency thanks to the API function "MENU_SetAppliDivider  (divider_t  divider) ", wherer divider is the number of systicks between two calls.

Offline

 

# 3   2013-05-14 06:08:07 How to make delay in circle OS?

softy
Member
Registered: 2012-12-03
Posts: 68

Re: How to make delay in circle OS?

If you do not want to block the system with a loop, you have to increment a counter at each call of the Application handler, and check it.
Your application is called by the OS every 100 Systicks.The Systick period is depending on the CPU frequency choosen (aproximatively 1 ms at 24MHz, 0,33 ms at 72MHz). You can modify this frequency thanks to the API function "MENU_SetAppliDivider  (divider_t  divider) ", wherer divider is the number of systicks between two calls.

So you mean the application handler will be called at 10Hz and so will be the rate at which the LCD will be refreshed(if we are putting a code of displaying the data on the LCd in the application handler), and if we want say X Hz as the LCD refresh rate we have to put 100/X as a parameter in the MENU_SetAppliDivider ().Is this understanding correct??

Kindly let me know !
Rgds,
Softy


" Pain is temporary, Quitting Lasts for ever"

Offline

 

Board footer