Annex32 1.44.2 OPTION.CPUFREQ

Here we can discuss about the problem found
Post Reply
SteanX
Posts: 32
Joined: Sat Jun 19, 2021 10:33 pm
Has thanked: 16 times
Been thanked: 4 times

Annex32 1.44.2 OPTION.CPUFREQ

Post by SteanX »

I'm afraid I am experiencing some regression on Annex32 1.44.2 and setting a lower CPUFREQ

On 2 boards, the first being a generic ESP32 Dev board, and the second a DFRobot ESP32-WROOM, if I set the CPU Frequency to 80, the board loses connection to the Editor interface. I run the following little program:

option.cpufreq 80
for i = 0 to 10
wlog "Iteration " & str$(i) & ": " & str$(adc(36))
pause 1000
next i


On the serial monitor the following happens:
Number of program lines :5
Basic File Loaded: /program/adc.bas
Progra??ws[/ws][2] disconnect
Program Ended

This disconnects the editor and I have to reboot the board for it to get back (refreshing the page does not work)
Commenting the option.cpufreq 80 line cause no error, and, running it on Annex32 1.43 there is no problem.

Don't know whether this is something to do with the board(s) or perhaps something else?
SteanX
Posts: 32
Joined: Sat Jun 19, 2021 10:33 pm
Has thanked: 16 times
Been thanked: 4 times

Re: Annex32 1.44.2 OPTION.CPUFREQ

Post by SteanX »

A bit more info. If I amend the program as follows:

option.cpufreq 80
for i = 0 to 10
A$ = "Iteration " & str$(i) & ": " & str$(adc(36))
print A$
wlog A$
pause 1000
next i

Then from the serial monitor it's clear that the program continues running, but the wlog kills the web interface.
Hope that helps?
User avatar
cicciocb
Site Admin
Posts: 1889
Joined: Mon Feb 03, 2020 1:15 pm
Location: Toulouse
Has thanked: 405 times
Been thanked: 1260 times
Contact:

Re: Annex32 1.44.2 OPTION.CPUFREQ

Post by cicciocb »

Just tested with the ESP32 and I confirm the problem; it happens also when changing to 160MHz.
I'll check where the problem comes from.
Strangely this do not happens with the ESP32-S2 that I'm currently testing.
BeanieBots
Posts: 315
Joined: Tue Jun 21, 2022 2:17 pm
Location: South coast UK
Has thanked: 168 times
Been thanked: 102 times

Re: Annex32 1.44.2 OPTION.CPUFREQ

Post by BeanieBots »

FWIW, no issues with ESP8266.
User avatar
cicciocb
Site Admin
Posts: 1889
Joined: Mon Feb 03, 2020 1:15 pm
Location: Toulouse
Has thanked: 405 times
Been thanked: 1260 times
Contact:

Re: Annex32 1.44.2 OPTION.CPUFREQ

Post by cicciocb »

As I never changed this function (that simply calls the internal function setCpuFrequencyMhz() ), I suppose that the problem comes from the new SDK.
As I said, the same code works well on the ESP32-S2
Post Reply