cnlohr / colorchord

Chromatic Sound to Light Conversion System

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unrecoverable crash when setting gAMP_1_IIR_BITS to 0

Fireflaker opened this issue · comments

When I played around with the parameters, setting gAMP_1_IIR_BITS to 0 crashed the program embedded on ESP8266 and need to be reflashed.

Interesting. Not sure why that would cause a crash. I am not in a situation where I can easily work on this ATM... Can you do any more leg work?

got it
I re-flashed the board and made sure it works without any problems. I connect the board on and log the serial. Then I changed gAMP_1_IIR_BITS to 0. This is what I get

ets Jan 8 2013,rst cause:2, boot mode:(3,6)
74800*
load 0x40100000, len 32596, room 16
tail 4
chksum 0x0c
load 0x3ffe8000, len 884, room 4
tail 0
chksum 0x69
load 0x3ffe8380, len 3784, room 8
tail 0
chksum 0xc8
csum 0xc8
rf cal sector: 1019
74800*

115200*
ColorChord
Opmode: 2
Default SoftAP mode: "ESP_3A2B8D":""
Loading Settings: af / 0 / 69 / 69
Settings Loaded: ESP_3A2B8D / Default
IGMP Joining: 0104a8c0 fb0000e0
IP: 192.168.4.1
115200*

gAMP_1_IIR_BITS set to 0*
MFS Not found at regular address (ffffffff).
MFS Found at: 00010000

ets Jan 8 2013,rst cause:2, boot mode:(3,6)

load 0x40100000, len 32596, room 16
tail 4
chksum 0x0c
load 0x3ffe8000, len 884, room 4
tail 0
chksum 0x69
load 0x3ffe8380, len 3784, room 8
tail 0
chksum 0xc8
csum 0xc8
⸮⸮�⸮�⸮n⸮r⸮⸮n|⸮ l lll`�⸮⸮r⸮l⸮j
ColorChord
Opmode: 2
Default SoftAP mode: "ESP_3A2B8D":""
Loading Settings: af / 0 / 69 / 69
Settings Loaded: ESP_3A2B8D / Default
IGMP Joining: 0104a8c0 fb0000e0
IP: 192.168.4.1

ets Jan 8 2013,rst cause:2, boot mode:(3,6)

load 0x40100000, len 32596, room 16
tail 4
chksum 0x0c
load 0x3ffe8000, len 884, room 4
tail 0
chksum 0x69
load 0x3ffe8380, len 3784, room 8
tail 0
chksum 0xc8
csum 0xc8
⸮⸮�⸮�⸮n⸮r⸮⸮n|⸮ l lll`�⸮⸮r⸮l⸮j
ColorChord
Opmode: 2
Default SoftAP mode: "ESP_3A2B8D":""
Loading Settings: af / 0 / 69 / 69
Settings Loaded: ESP_3A2B8D / Default
IGMP Joining: 0104a8c0 fb0000e0

ets Jan 8 2013,rst cause:2, boot mode:(3,6)

load 0x40100000, len 32596, room 16
tail 4
chksum 0x0c
load 0x3ffe8000, len 884, room 4
tail 0
chksum 0x69
load 0x3ffe8380, len 3784, room 8
tail 0
chksum 0xc8
csum 0xc8
⸮⸮�⸮�⸮n⸮r⸮⸮n|⸮ l lll`�⸮⸮r⸮l⸮j
ColorChord
Opmode: 2
Default SoftAP mode: "ESP_3A2B8D":""
Loading Settings: af / 0 / 69 / 69
Settings Loaded: ESP_3A2B8D / Default
IGMP Joining: 0104a8c0 fb0000e0

ets Jan 8 2013,rst cause:2, boot mode:(3,6)

gAMP_1_IIR_BITS set to 0*
(it just restarts)

The instant I set gAMP_1_IIR_BITS to 0 all lights turns off and the webpage freezes.

Thanks for your effort.

Would it be nice to clock the ESP8266 at 160MHz

You actually can operate at 160MHz! We did that on a commercial project. I don't remember what the change was, I actually think it JustWorked™.

So, I really don't see why setting AMP_1_IIR_BITS in the code would cause an issue, and I'm still not near anything I could examine it further with at the moment. It looks like perhaps there could be an overflow of sorts. There is some suspicious logic around

		note_peak_amps[i] -= note_peak_amps[i]>>AMP_1_IIR_BITS;

So, a possible solution would be to if( !AMP_1_IIR_BITS) it out. That said, I don't actually understand the purpose of why you would want to set it to 0. It would make the output schizophrenic.

My ESP8266 version is working perfectly now. Thank you so much for all your help.

Any idea what the actual issue was? Should we patch the code?