ESP8266 Reset because of gpio pin toggle?

Stational
Posts: 42
Joined: Sat Jul 02, 2016 10:54 pm

ESP8266 Reset because of gpio pin toggle?

Postby Stational » Fri Nov 25, 2016 5:35 am

Hi,

my esp8266 resets (probably) because i toggle some pins quite fast with this function:

Code: Select all

void pinHigh(uint32_t PIN){
   gpio_output_set(0,0,0,PIN);
}

void pinLow(uint32_t PIN){
   gpio_output_set(0,PIN,PIN,0);
}

void sendByte(uint8_t dataByte){
   uint8_t initBitCounter;
   for(initBitCounter = 7; initBitCounter >= 0; initBitCounter--){
      uint8_t bitToWrite = (dataByte >> initBitCounter) & 1;
      if(bitToWrite == 1){
         pinHigh(SDI);
      } else {
         pinLow(SDI);
      }
      pinHigh(SCK);
      os_delay_us(2);
      pinLow(SCK);
   }
}


I call the "sendByte" - function every second with a timer, the esp8266 resets every ~4 seconds. Why is that?

User avatar
pratik
Posts: 467
Joined: Wed Jun 29, 2016 7:17 pm
Location: India
Contact:

Re: ESP8266 Reset because of gpio pin toggle?

Postby pratik » Fri Nov 25, 2016 2:04 pm

What type of reset are you mentioning here? It would help to see the reset debug output log!
Regards,
Pratik Panda
Website: http://www.PratikPanda.com

Custom firmware, Knowledge base and freelancing (ESP8266/ESP32):
http://www.iot-bits.com

Stational
Posts: 42
Joined: Sat Jul 02, 2016 10:54 pm

Re: ESP8266 Reset because of gpio pin toggle?

Postby Stational » Fri Nov 25, 2016 3:32 pm

Thanks for your reply,

i don't know how this reset is called, it just stops working after ~4s and then i get this message on my serial monitor (74480 Baud):

SDK ver: 1.5.4(baaeaebb) compiled @ May 17 2016 19:23:54
phy ver: 972, pp ver: 10.1
mode : sta(5c:cf:7f:1c:0a:10)
¢@*r…Ä(±±Kít¥dmXK
nzAl
±#Nørf[112] : 03
rf[113] : 00
rf[114] : 01


Then it works again for 4 seconds...

User avatar
pratik
Posts: 467
Joined: Wed Jun 29, 2016 7:17 pm
Location: India
Contact:

Re: ESP8266 Reset because of gpio pin toggle?

Postby pratik » Sun Nov 27, 2016 1:23 pm

Can you please attach all the BIN files here... what you are trying to flash and it causes errors? I can take a look then!
Regards,
Pratik Panda
Website: http://www.PratikPanda.com

Custom firmware, Knowledge base and freelancing (ESP8266/ESP32):
http://www.iot-bits.com

Stational
Posts: 42
Joined: Sat Jul 02, 2016 10:54 pm

Re: ESP8266 Reset because of gpio pin toggle?

Postby Stational » Sat Dec 03, 2016 5:33 am

It looks like it is not allowed to attach .bin files in this forum. I uploaded the files to an external website:

http://workupload.com/archive/USnQLLh

Who is online

Users browsing this forum: Google [Bot], MSN [Bot] and 9 guests