These are chat archives for esp8266/Arduino

22nd
Jul 2016
ZaPpInG
@lrmoreno007
Jul 22 2016 01:06
Conect GND between FTDI and ESP
Ivan Grokhotkov
@igrr
Jul 22 2016 02:55
@me-no-dev @martinayotte the issue described in the post linked above happens because spiffs_hal doesn't disable SPI interrupts when writing to flash
Consider the case when flash r/w operation is in progress and SPI interrupt happens. ISR is in IRAM, so no problem here. But it calls user-provided callbacks which are not in IRAM. Flash cache is disabled while r/w operation is in progress, so cache HW can not load instruction for the CPU, causing exception 0.
I have tried masking SPI interrupts in spiffs_hal, but this doesn't work for some reason. Maybe we need to revisit this.
Alternatively, SPISlave should check if the cache is disabled and skip calling user-provided callback if it is not in IRAM.
Me No Dev
@me-no-dev
Jul 22 2016 05:42
how would SPISLave check if cache is disabled and callbacks are in iram?
Ivan Grokhotkov
@igrr
Jul 22 2016 06:38
first can be done by checking e.g. if *((uint32_t*) 0x40200000) == 0
i.e. if cache is disabled, this address will read as 0
for the callbacks, scratch that, there is no reliable way to check
just assume that ISR shouldn't be forwarded to subscribers if flash cache is not up, i guess
Me No Dev
@me-no-dev
Jul 22 2016 06:43
I'm trying to think of a way to implement some sort of buffering to overcome this in a way
incomming data is not a problem, but outgoing needs to be preloaded prior to the master reading
maybe buffer if cache is off and callback with all when it is not
sticilface
@sticilface
Jul 22 2016 12:10
has anyone found a method for saving the stack trace for viewing after reboot? is this possible? i remember some chat about it a while ago?
Helio Machado
@crushedice2000
Jul 22 2016 12:19

@me-no-dev @igrr: Thanks to both! And sorry for the very late reply. I was extremely busy these days.

About the digitalRead, maybe the problem is that I have a LED between the GPIO and VCC (because the GPIO is the pin 2, and connecting normally the LED would ruin the boot).

About the raw packet capture, I'll see later. This sounds very interesting.

About the MAC address...

Using the RF_PRE_INIT() in the C++ part, it worked perfectly!

Richard P
@richard-p
Jul 22 2016 12:53
This message was deleted
@lrmoreno007 Yes I also have the grounds connected.
Mehrdad K
@mkeyno
Jul 22 2016 13:11
hi all , I intend to send the same package to group of selective IP address with UDP multicast , does any one have clue? thanks
Vicne
@vicnevicne
Jul 22 2016 13:20
@igrr @me-no-dev Thanks for looking into my HSPI interrupt issue. If I read correctly, the issue wouldn't happen if my callback was in IRAM. I am not familiar with cache vs ram code management but by looking at me-no-dev's code, I guess this is achieved with a ICACHE_RAM_ATTR in my callback declaration, right ? (I would test if I were at home but it won't be till tomorrow). Can't we just make it part of the specifications for the callbacks ?
Ivan Grokhotkov
@igrr
Jul 22 2016 13:38
IRAM space is very limited, so i don't think this is something which should be imposed by default.
Mehrdad K
@mkeyno
Jul 22 2016 13:44
@igrr do you have any suggestion , to send the same package to couple of selective devices in same network
Vicne
@vicnevicne
Jul 22 2016 13:47
@igrr I see.... Well, I guess code should be limited in any case for timing reasons as it's all executed synchronously from the interrupt handler routine and you don't want to miss interrupts. In my case at least, it's just a matter of quickly testing the first byte of the messages and storing the rest for defferred processing, so I think it should work.
Richard P
@richard-p
Jul 22 2016 14:21
How do you know if your esp's serial is working?
cb88
@cb88
Jul 22 2016 14:22
letters come out ;-)
Richard P
@richard-p
Jul 22 2016 14:23
so them imgoing to go ahead and say my serial isnt working...
cb88
@cb88
Jul 22 2016 14:23
in all seriousness though serial is simple... double check wiring, and that the baud rate is correct and it should work
even if the baud rate is incorrect you'll likely see some garbage if your program is printing something
if your program is not printing anything I doubt you would see anything (except on the debug serial port the wifi part of the code prints debug info there I think)
Richard P
@richard-p
Jul 22 2016 14:27
well thats the thing im getting nothing, ive switched the wires, checked all connections and nothing, i have my multimeter hooked up and i checked all connections (all good) and i just checked the voltage coming off Tx and its 0v but Rx is at 3v3. When i try and upload with my ftdi only its red light blinks and not the green.
cb88
@cb88
Jul 22 2016 14:48
the other thing is the ESP8266 is not 5v tolerant so if you hookup 5v anywhere or if your serial converter is not set to 3.3v it will blow up that pin etc...
Holger Lembke
@holgerlembke
Jul 22 2016 14:53
@richard-p nodemcu and wemo hardware is a way more easy way to work with. or those very cheap adapters for the esp-01...
@igrr Moin moin. Do you have an estimation when the esp32 will be ready for playing around with? like getting them from ebay?
Richard P
@richard-p
Jul 22 2016 16:32
@cb88 @holgerlembke Yeah i took special precaution with that but i guess it mightve slipped by somewhere. And I need to use Arduino IDE because this is for my job and we're working with a teensy etc.
Holger Lembke
@holgerlembke
Jul 22 2016 16:39
@richard-p nodemcu/wemo is only hardware. works perfectly with Arduino IDE.
Richard P
@richard-p
Jul 22 2016 18:45
@holgerlembke Oh i thought nodeMCU was software to flash an esp?
Holger Lembke
@holgerlembke
Jul 22 2016 18:46
@richard-p ebay 331807171489 321989574625
Richard P
@richard-p
Jul 22 2016 18:55
@holgerlembke OH, well we have adafruits huzzah but we needed just the 12e because smaller form. Also i figured out what the problem was, at some point the Tx pin did get fried because i hooked up 2 more and they both work correctly.
Holger Lembke
@holgerlembke
Jul 22 2016 19:14
@richard-p the wemos might be sized like the huzzah. has usb on board and for $4 its a steal...
Richard P
@richard-p
Jul 22 2016 20:08
@holgerlembke no i get that i meant that the huzzahs are too big, so we wanted just the esp-12e. Also the huzzahs were programmed fine it was just the one 12e giving problems