ESP32 instruction Fetch Prohibited while doing printf

-2

I'm working on a project in which we are developing a packet sniffer. I tried using ESP32 WROOM starting with GitHub template and everything went smoothly. I was able to receive the packets and send them through a TCP server but now it gives me some strange error. When I tried to receive a timestamp from the server and write a printf to print the timestamp gives me the InstrFetchProhibited. I tried different things such as sending the timestamp and saving into two uint32_t, or sending into a uint64_t and writing a function to print but nothing worked. Now when I try to print any line of code from my main gives me the error but when I comment the line with the printf("received some timestamp\n") in the main it goes working. I don't really understand why and I don't know how to solve it. The error that raises is

rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0018,len:4
load:0x3fff001c,len:4684
load:0x40078000,len:0
load:0x40078000,len:13636
entry 0x40078578
I (223) cpu_start: Pro cpu up.
I (223) cpu_start: Single core mode
I (223) heap_init: Initializing. RAM available for dynamic allocation:
I (227) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM
I (233) heap_init: At 3FFB8580 len 00027A80 (158 KiB): DRAM
I (239) heap_init: At 3FFE0440 len 00003BC0 (14 KiB): D/IRAM
I (245) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM
I (252) heap_init: At 4008EDFC len 00011204 (68 KiB): IRAM
I (258) cpu_start: Pro cpu start user code
Guru Meditation Error: Core  0 panic'ed (InstrFetchProhibited)
. Exception was unhandled.
Core 0 register dump:
PC      : 0xffffffff  PS      : 0x00060f30  A0      : 0x80080d93  A1      : 0x3ffe3c90  
A2      : 0x3f41000c  A3      : 0x002514e5  A4      : 0x3ffe3bff  A5      : 0x00000038  
A6      : 0x00000000  A7      : 0x3ffe3c04  A8      : 0x800d0bb2  A9      : 0x3ffe3c70  
A10     : 0x3ffafc10  A11     : 0x00000000  A12     : 0x3ffafc00  A13     : 0x00000000  
A14     : 0x00000016  A15     : 0x00000000  SAR     : 0x0000001d  EXCCAUSE: 0x00000014  
EXCVADDR: 0xfffffffc  LBEG    : 0x4000c2e0  LEND    : 0x4000c2f6  LCOUNT  : 0xffffffff  

Backtrace: 0x7fffffff:0x3ffe3c90 0x40080d90:0x3ffe3cb0 0x40080ee3:0x3ffe3ce0 0x40078eae:0x3ffe3d20 0x40078f61:0x3ffe3d50 0x40079205:0x3ffe3d90 0x4007858b:0x3ffe3db0 0x40007c31:0x3ffe3eb0 0x4000073d:0x3ffe3f20
0x40080d90: start_cpu0_default at /Users/matteocultrera/esp/esp-idf/components/esp32/cpu_start.c:339

0x40080ee3: call_start_cpu0 at /Users/matteocultrera/esp/esp-idf/components/esp32/cpu_start.c:212 (discriminator 1)


Rebooting...
ets Jun  8 2016 00:22:57
c
tcp
fetch
esp32
uint64
asked on Stack Overflow Nov 17, 2018 by Matteo Cultrera • edited Nov 17, 2018 by Matteo Cultrera

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0