RTOS 160MHz and Delay time
RTOS 160MHz and Delay time
Postby eyal » Thu Jan 21, 2016 2:09 pm
I find that when I set the CPU to 160MHz, a delay of 100ms takes only 50ms. This is unexpected, is it intentional?
Re: RTOS 160MHz and Delay time
Postby dsbaha » Sat Jan 23, 2016 2:28 pm
-
- Posts: 45
- Joined: Tue Jan 19, 2016 2:39 pm
Re: RTOS 160MHz and Delay time
Postby tobewinner » Sun Jun 12, 2016 8:00 pm
Re: RTOS 160MHz and Delay time
Postby zaltora » Mon Jun 13, 2016 3:20 am
I need to swap between task 10 more faster than now and FreeRTOS have option to do that ( TICK_RATE_HZ ). I think, it is not implemented so i want to know how change myself the tick timing if it is possible ( what timer used, interrupt and how configure it).
PS:
configCPU_CLOCK_HZ option is not implemented yet i think. It can be great for not doing (*2) on all delay (code portability).
Better option is that "system_update_cpu_freq" update frequency and delay calculation of FreeRTOS
-
- Posts: 45
- Joined: Tue Jan 19, 2016 2:39 pm
Re: RTOS 160MHz and Delay time
Postby tobewinner » Mon Jun 13, 2016 4:33 pm
Re: RTOS 160MHz and Delay time
Postby zaltora » Tue Jun 14, 2016 3:33 pm
Read buttons
Refresh SPI screen
Read i2c sensor
Read one_wire sensor
Wifi transmittion
Control a motor (pwm)
I use already FRC1and FRC2 timer for little periodic task.
I want reduce task time to read sensors more often. FreeRTOS is based on a timer to manage interruptions of these tick. I doubt that you can not configure it.
And maybe why not configure it for a 100 ms tick for a future project. I do not know what performance we lose or we win when we change these ticks.
-
- Posts: 45
- Joined: Tue Jan 19, 2016 2:39 pm
Re: RTOS 160MHz and Delay time
Postby tobewinner » Tue Jun 14, 2016 4:38 pm
zaltora wrote:Well i have many tasks:
Read buttons
Refresh SPI screen
Read i2c sensor
Read one_wire sensor
Wifi transmittion
Control a motor (pwm)
I use already FRC1and FRC2 timer for little periodic task.
I want reduce task time to read sensors more often. FreeRTOS is based on a timer to manage interruptions of these tick. I doubt that you can not configure it.
And maybe why not configure it for a 100 ms tick for a future project. I do not know what performance we lose or we win when we change these ticks.
For buttons you can use I/O interruption, besides you can switch task manually by calling taskYIELD() and some other ways. Even in Linux the HZ is often set to 100, to make the OS response more quickly, they use interrupts and some other ways (hrtimer is a good way, but may not supported by RTOS). I mean you may reach your demand by designing a proper architecture, not only by increasing the HZ(this will cost more CPU to do task switching).
If you really want to config HZ, you may need to rebuilt the libfreertos.a, party of the source is localed in RTOS_SDK/third_party.
becuase 8266_RTOS is not fully open-source, maybe it is not possible to configure the HZ.
Who is online
Users browsing this forum: No registered users and 290 guests
Login
Newbies Start Here
Are you new to ESP8266?
Unsure what to do?
Dunno where to start?
Start right here!
Latest SDK
Documentation
Complete listing of the official ESP8266 related documentation release by ESPRESSIF!
Must read here!
- All times are UTC+08:00
- Top
- Delete all board cookies
About Us
Espressif Systems is a fabless semiconductor company providing cutting-edge low power WiFi SoCs and wireless solutions for wireless communications and Internet of Things applications. We are the manufacturer of ESP8266EX.