ESP8266 Developer Zone The Official ESP8266 Forum 2018-02-23T16:55:16+08:00 https://bbs.espressif.com:443/feed.php?f=7&t=889 2018-02-23T16:55:16+08:00 2018-02-23T16:55:16+08:00 https://bbs.espressif.com:443/viewtopic.php?t=889&p=19436#p19436 <![CDATA[Re: Running at 160MHz]]> Great devices BTW

Apart from increased power requirement, why would I not run at 160Mhz, or conversely, why should I run at 80Mhz?
Other than power consumption, what are the trade-offs?

-----

Regarding UART speed etc. mentioned above.
It would make no sense to have UART speeds change with processor speeds! These are controlled by onboard counters and dividers; and of course you will see a correlation between clock-speeds and available counters & dividers (note the power of 2 increase in speed, so a simple divide by (another) 2 will get things back on course). bit-banged UARTs would of course allow for greater diversity. This is evidenced above by the attempt to use the UART to check processor speed. Consider the mayhem that this would cause if this were not the case. :?

Kind regards
0

Statistics: Posted by 0AlphaOmega — Fri Feb 23, 2018 4:55 pm


]]>
2016-01-17T08:54:10+08:00 2016-01-17T08:54:10+08:00 https://bbs.espressif.com:443/viewtopic.php?t=889&p=5392#p5392 <![CDATA[Re: Running at 160MHz]]>
Doing

Code:

system_update_cpu_freq(160);

I see that

Code:

uint32 t = system_get_time();
vTaskDelay(100 / portTICK_RATE_MS);
printf ("%d\n", system_get_time()-t);

now shows only 50ms. It was 100ms (as expected) when running at 80MHz (see example below).

Either vTaskDelay() is wrong or system_get_time() is. Or maybe I need to do more that this to set the CPU speed

Code:

REG_SET_BIT(0x3ff00014, BIT(0));
system_update_cpu_freq(160);


Here is an example from my actual app looping. 'before' is time from loop start, 'after' is time of just the 'vTaskDelay', should show a value around 100000.

Running at 80MHz:

Code:

8 696053 before
8 99940 after
9 796051 before
9 99944 after
10 896050 before
10 100055 after
11 996168 before
11 99828 after


Running at 160MHz:

Code:

1 3 before
1 47981 after
2 48030 before
2 49924 after
3 97982 before
3 50013 after
4 148027 before
4 49934 after

Statistics: Posted by eyal — Sun Jan 17, 2016 8:54 am


]]>
2015-08-27T18:01:01+08:00 2015-08-27T18:01:01+08:00 https://bbs.espressif.com:443/viewtopic.php?t=889&p=3460#p3460 <![CDATA[Re: Running at 160MHz]]> Statistics: Posted by skywave — Thu Aug 27, 2015 6:01 pm


]]>
2015-08-21T04:50:10+08:00 2015-08-21T04:50:10+08:00 https://bbs.espressif.com:443/viewtopic.php?t=889&p=3339#p3339 <![CDATA[Re: Running at 160MHz]]> Statistics: Posted by eriksl — Fri Aug 21, 2015 4:50 am


]]>
2015-08-20T02:33:40+08:00 2015-08-20T02:33:40+08:00 https://bbs.espressif.com:443/viewtopic.php?t=889&p=3322#p3322 <![CDATA[Re: Running at 160MHz]]> Statistics: Posted by skywave — Thu Aug 20, 2015 2:33 am


]]>
2015-08-13T10:30:37+08:00 2015-08-13T10:30:37+08:00 https://bbs.espressif.com:443/viewtopic.php?t=889&p=3188#p3188 <![CDATA[Re: Running at 160MHz]]>
So sorry that UART clock confused you~ we will revise it in next version of SDK.

Thanks for your interest in ESP8266 !

Statistics: Posted by ESP_Faye — Thu Aug 13, 2015 10:30 am


]]>
2015-08-09T22:33:51+08:00 2015-08-09T22:33:51+08:00 https://bbs.espressif.com:443/viewtopic.php?t=889&p=3105#p3105 <![CDATA[Re: Running at 160MHz]]>

Note:
System bus frequency is 80MHz, will not be affected by CPU frequency. The
frequency of UART, SPI, or other peripheral devices, are divided from system
bus frequency, so they will not be affected by CPU frequency either.

Statistics: Posted by dkinzer — Sun Aug 09, 2015 10:33 pm


]]>
2015-08-09T04:00:00+08:00 2015-08-09T04:00:00+08:00 https://bbs.espressif.com:443/viewtopic.php?t=889&p=3099#p3099 <![CDATA[Re: Running at 160MHz]]>
It's also a mode of operation that's very easy to use that way, with little side-effects, that's nice.

All of this should have been in the documention of the relevant api function of course ;)

Statistics: Posted by eriksl — Sun Aug 09, 2015 4:00 am


]]>
2015-08-08T02:42:31+08:00 2015-08-08T02:42:31+08:00 https://bbs.espressif.com:443/viewtopic.php?t=889&p=3083#p3083 <![CDATA[Re: Running at 160MHz]]>
eriksl wrote:
The defines in the include files suggest the cup clock is directly as uart clock.
I agree that the defines in the include file are misleading. I've done some additional testing and this is what I've found:
    o It appears not to be necessary to use REG_SET_BIT() or REG_CLR_BIT() to change the speed. Simply calling system_update_cpu_freq() with a parameter of 80 or 160 effects the desired speed. Alternately, one can set/clear the register bit instead of calling system_update_cpu_freq(). In other words, using either alone appears to have the same effect and using both together does not appear to have any additional effect.

    o Specifying a CPU speed of 160 does, in fact, change the execution speed to 160MHz. I confirmed this using an app that toggled an output several times and observed with a logic analyzer that the period was about one-half of that measured when operating at 80MHz.

    o The UART baud rate is not affected by the CPU speed setting. A given divisor produces the same baud rate with both speed settings.

    o The timers of the RTC are not affected by the CPU speed setting. A given timer divisor produces the same rate of change of the RTC timer's COUNT register with both speed settings.

Statistics: Posted by dkinzer — Sat Aug 08, 2015 2:42 am


]]>
2015-08-05T15:21:34+08:00 2015-08-05T15:21:34+08:00 https://bbs.espressif.com:443/viewtopic.php?t=889&p=3055#p3055 <![CDATA[Re: Running at 160MHz]]> Statistics: Posted by eriksl — Wed Aug 05, 2015 3:21 pm


]]>
2015-08-05T13:30:44+08:00 2015-08-05T13:30:44+08:00 https://bbs.espressif.com:443/viewtopic.php?t=889&p=3050#p3050 <![CDATA[Re: Running at 160MHz]]>
CPU changes to 160MHz would not have effect on the clock for UART.

So UART baudrate will not change.

Thanks for your interest in Espressif Systems and ESP8266 !

Statistics: Posted by ESP_Faye — Wed Aug 05, 2015 1:30 pm


]]>
2015-08-02T23:07:06+08:00 2015-08-02T23:07:06+08:00 https://bbs.espressif.com:443/viewtopic.php?t=889&p=3007#p3007 <![CDATA[Re: Running at 160MHz]]>
blubb wrote:
system_update_cpu_freq(160);
Thanks. There is a prototype in the v1.2.0 SDK for that function but still no joy. After setting the frequency to 160MHz a UART divisor of 694 yields 115200 baud rather than 230400 as it should thus indicating the the CPU is still running at 80MHz.

Statistics: Posted by dkinzer — Sun Aug 02, 2015 11:07 pm


]]>
2015-08-02T05:34:53+08:00 2015-08-02T05:34:53+08:00 https://bbs.espressif.com:443/viewtopic.php?t=889&p=3001#p3001 <![CDATA[Re: Running at 160MHz]]>
system_update_cpu_freq(160);

Statistics: Posted by blubb — Sun Aug 02, 2015 5:34 am


]]>
2015-08-02T04:01:21+08:00 2015-08-02T04:01:21+08:00 https://bbs.espressif.com:443/viewtopic.php?t=889&p=2998#p2998 <![CDATA[Running at 160MHz]]>
Has anyone else been able to get this to work reliably?

Statistics: Posted by dkinzer — Sun Aug 02, 2015 4:01 am


]]>