These are chat archives for esp8266/Arduino

1st
Jul 2016
Stavros Korokithakis
@skorokithakis
Jul 01 2016 00:53 UTC
@MarcoMengoli it just worked for me
Marco Mengoli
@MarcoMengoli
Jul 01 2016 07:36 UTC
@skorokithakis maybe could it be the SPI frequency? My connections are right (followed more than on guide)
Marco Mengoli
@MarcoMengoli
Jul 01 2016 09:54 UTC
From the RC522 datasheet, its SPI connection works up to 10MHz, MSB first, clock idle when low and sample the data on the rising edge.
SPI.begin(); //works on Arduino, not on my Sparkfun ESP8266 shield
SPI.begin(); SPI.setClockDivider(SPI_CLOCK_DIV8); //works on Arduino, not on my Sparkfun ESP8266 shield
SPI.beginTransaction(SPISettings(10000000, MSBFIRST, SPI_MODE0)); does not work on both Arduino and ESP
Me No Dev
@me-no-dev
Jul 01 2016 09:58 UTC
SPI_CLOCK_DIV8 == 2000000 Hz not 10MHz
aneek231
@aneek231
Jul 01 2016 10:11 UTC

Hi, I am getting this error for my sketch on ESP

If someone knows the cause of it the please share it with me.

<\r>
<\n>Panic .pioenvs\esp12e\FrameworkArduino\core_esp8266_main.cpp:131 loop_task<\r>
<\n><\r>
<\n>ctx: sys <\r>
<\n>sp: 3ffffe00 end: 3fffffb0 offset: 01a0<\r>
<\n>

Me No Dev
@me-no-dev
Jul 01 2016 10:11 UTC
maybe tell us about your sketch?
the error menas that you are calling delay or yield inside ticker or async network callback
@igrr or is this some other context panic?
Ivan Grokhotkov
@igrr
Jul 01 2016 10:19 UTC
This message was deleted
scratch that
this is stack overflow check
once in a while (after setup or loop completes) we check if there was stack overflow
check your stack usage, total stack available to the sketch is 4096 bytes.
large arrays allocated on the stack are primary candidates
also check if you accidentally use VLAs somewhere
aneek231
@aneek231
Jul 01 2016 10:23 UTC
what are VLA's ?
aneek231
@aneek231
Jul 01 2016 10:46 UTC
I got the free stack where my program crashes by "ESP.getFreeHeap() " and I got it "25360".
Ivan Grokhotkov
@igrr
Jul 01 2016 11:05 UTC
Free stack? The function is called getFreeHeap, how is that related to stack?
it returns exactly what its name implies, that is free heap.
aneek231
@aneek231
Jul 01 2016 11:07 UTC
Then how could I get the free stack ?
Ivan Grokhotkov
@igrr
Jul 01 2016 11:15 UTC
let me see
something like this:
extern "C" {
#include "cont.h" 
extern cont_t g_cont;
}
loop() {
  size_t free = cont_get_free_stack(&g_cont);
  // etc
}
but, the point is, it only tells you how much you have at the point of the call. but then next function you call can request a lot of space on the stack and overflow it.
actually it would be much easier if you would post your sketch.
or better, a link to it
aneek231
@aneek231
Jul 01 2016 11:26 UTC
I put it at the point of crash and I got now free stack of 32.
So it means stack overflow would be a reason?
How much it should be ?
Ivan Grokhotkov
@igrr
Jul 01 2016 11:44 UTC
Total stack is 4096
So if you have 32 bytes left it means that you have used pretty much all of it.
Mehrdad K
@mkeyno
Jul 01 2016 20:44 UTC
can anyone tell what meaning of following debug report is , after download the file my connection lost and try reconnect to modem

reconnect
state: 2 -> 0 (0)
f r0, scandone
state: 0 -> 2 (b0)
state: 2 -> 3 (0)
state: 3 -> 5 (10)
add 0
aid 1
cnt

connected with myModem, channel 1
dhcp client start...
ip:192.168.1.87,mask:255.255.255.0,gw:192.168.1.1
pm open,type:2 0