Edzelf / ESP32-Radio

Internet radio based on ESP32, VS1053 and a TFT screen.
GNU General Public License v3.0
979 stars 229 forks source link

Can't run on new firmware version #68

Open svins01 opened 6 years ago

svins01 commented 6 years ago

Can't run on new firmware version

ets Jun  8 2016 00:22:57

rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
ets Jun  8 2016 00:22:57

rst:0x10 (RTCWDT_RTC_RESET),boot:0x17 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0x00
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0008,len:8
load:0x3fff0010,len:160
load:0x40078000,len:10632
load:0x40080000,len:252
entry 0x40080034

D: Include file config_html has the wrong version number!  Replace header file.
D: Starting ESP32-radio running on CPU 1 at 240 MHz.  Version Wed, 13 Dec 2017 12:10:00 GMT.  Free memory 180864
D: Partition nvs found, 20480 bytes
D: Read 40 keys from NVS
D: pin_ir pin set to -1
D: pin_enc_clk pin set to -1
D: pin_enc_dt pin set to -1
D: pin_enc_sw pin set to -1
D: pin_tft_cs pin set to 15
D: pin_tft_dc pin set to 2
D: pin_sd_cs pin set to 21
D: pin_vs_cs pin set to 5
D: pin_vs_dcs pin set to 16
D: pin_vs_dreq pin set to 4
D: pin_shutdown pin set to -1
D: pin_spi_sck pin set to 18
D: pin_spi_miso pin set to 19
D: pin_spi_mosi pin set to 23
D: GPIO0 is HIGH
D: GPIO2 is LOW, probably no PULL-UP
D: GPIO4 is HIGH
D: GPIO5 is HIGH
D: GPIO12 is HIGH
D: GPIO13 is HIGH
D: GPIO14 is HIGH
D: GPIO15 is HIGH
D: GPIO16 is HIGH
D: GPIO17 is HIGH
D: GPIO18 is HIGH
D: GPIO19 is HIGH
D: GPIO21 is HIGH
D: GPIO22 is HIGH
D: GPIO23 is HIGH
D: GPIO25 is HIGH
D: GPIO26 is HIGH
D: GPIO27 is HIGH
D: GPIO32 is HIGH
D: GPIO33 is HIGH
D: GPIO34 is LOW, probably no PULL-UP
D: GPIO35 is LOW, probably no PULL-UP
D: gpio_00 will execute uppreset = 1
D: gpio_12 will execute upvolume = 2
D: gpio_13 will execute downvolume = 2
D: Start TFT
Guru Meditation Error of type LoadStoreError occurred on core  1. Exception was unhandled.
Register dump:
PC      : 0x40001277  PS      : 0x00060930  A0      : 0x800ec800  A1      : 0x3ffd32e0  
A2      : 0x40080e70  A3      : 0x3f40223e  A4      : 0x00000004  A5      : 0x3ffcf7ac  
A6      : 0x44530064  A7      : 0x44530064  A8      : 0x80000000  A9      : 0x3ffd3300  
A10     : 0x3ffcf7a8  A11     : 0x00000002  A12     : 0x00000000  A13     : 0x00000000  
A14     : 0x00000000  A15     : 0x3ffd24e0  SAR     : 0x00000010  EXCCAUSE: 0x00000003  
EXCVADDR: 0x40080e70  LBEG    : 0x4000c349  LEND    : 0x4000c36b  LCOUNT  : 0xffffffff  

Backtrace: 0x40001277:0x3ffd32e0 0x400ec800:0x3ffd32f0 0x400ec819:0x3ffd3310 0x400da1ff:0x3ffd3380 0x400d9643:0x3ffd33b0 0x400d60b7:0x3ffd33e0 0x4012730a:0x3ffd3450

CPU halted.

from 13-11-2017 everything works

Edzelf commented 6 years ago

Notice the first debug line. You have to replace "config_html.h". If that does not help, use the "ESP exception decoder" of the IDE to narrow down the cause of the crash. It looks like the TFT_ILI9163C library crashes on initialize. Try to check it with a separate sketch.

svins01 commented 6 years ago

the crash occurs if I connect a LCD or SD config_html.h explain in more English is not my native language

Edzelf commented 6 years ago

Hold on, I can reproduce it here. I will try to fix it.

Edzelf commented 6 years ago

Download config_html.h from the github code page.

Edzelf commented 6 years ago

The problem is probably a weak power supply. I can reproduce the error if I add an extra device to the powersupply. The LCD display starts normally when I use a good power supply. Try to run the radio on a powerbank.

svins01 commented 6 years ago

Thanks, tonight will try the voltage is unlikely. on old firmware everything works fine.

svins01 commented 6 years ago

if Esp32_radio_init not add preferences.putString ( "vs_cs", "5" ) | preferences.putString ( "vs_dcs", "16" ) | preferences.putString ( "vs_dreq", "4" ) | do not start

svins01 commented 6 years ago

did not help all the same

svins01 commented 6 years ago

what we found out

  1. download Esp32_radio_init.ino
    
    //********************************************************************************************
    // Initialize the preferences op ESP32-radio.  They can be edited later by the webinterface. *
    //********************************************************************************************
    // 27-04-2017, ES: First set-up, derived from preferences example sketch.                    *
    //********************************************************************************************

include

// Note: Namespace name is limited to 15 chars. Same name must be used in ESP32-radio.

define NAME "ESP32Radio"

// Adjust size of buffer to the longest expected string for nvsgetstr

define NVSBUFSIZE 150

Preferences preferences ; // Instance of Preferences

//** // S E T U P * //** void setup() { String str ;

Serial.begin ( 115200 ) ; Serial.println() ; preferences.begin ( NAME, false ) ; // Open for read/write preferences.clear() ; // Remove all preferences under opened namespace // Store the preferences for ESP32-radio

preferences.putString ( "mqttbroker", "none" ) | preferences.putString ( "mqttport", "1883" ) | preferences.putString ( "mqttuser", "none" ) | preferences.putString ( "mqttpasswd", "none" ) | preferences.putString ( "mqtttpreset", "none" ) | // preferences.putString ( "wifi_00", "HOME/12344321" ) | preferences.putString ( "wifi_01", "Gargoyle/" ) | // preferences.putString ( "volume", "72" ) | preferences.putString ( "toneha", "0" ) | preferences.putString ( "tonehf", "0" ) | preferences.putString ( "tonela", "0" ) | preferences.putString ( "tonelf", "0" ) | preferences.putString ( "vs_cs", "5" ) | preferences.putString ( "vs_dcs", "16" ) | preferences.putString ( "vs_dreq", "4" ) | preferences.putString ( "enc_clk", "25" ) | preferences.putString ( "enc_dt", "26" ) | preferences.putString ( "enc_sw", "27" ) | // preferences.putString ( "preset", "00" ) | preferences.putString ( "preset_00", "ep256.hostingradio.ru:8052/europaplus256.mp3 #Europa +" ) ; // preferences.putString ( "clk_server", "pool.ntp.org" ) ; // Setting for Time Of Day clock on TFT preferences.putString ( "clk_offset", "3" ) ; preferences.putString ( "clk_dst", "0" ) ; preferences.end() ; delay ( 1000 ) ; }

//** // L O O P * //** void loop() { Serial.println ( "ESP32_radio_init completed..." ) ; delay ( 10000 ) ; }


 2. download - Esp32_radio.ino
**radio works**
if Esp32_radio_init.ino to add a line to the - preferences.putString ( "sd_cs", "21" ) |- then there is a collapse
Also if the collapse happens in the web browser tab, and manually add pin_sd_cs = 21
Edzelf commented 6 years ago

I do not understand it completely, but in the preferences the pinnames are changed. New names are:

svins01 commented 6 years ago

explain what I'm doing wrong? I Add pin_sd_cs = 21 to activate SD and all at once collapse

Edzelf commented 6 years ago

Please show me the preferences on the config page, so I can try to reproduce the error. Are you sure GPIO21 is connected correctly?

svins01 commented 6 years ago

I managed to download your latest firmware, but the error not found, I only added my settings in your config by default

the GPIO21 connected correct

clk_dst = 0                                          # Offset during daylight saving time (hours)
#
clk_offset = 3                                       # Offset with respect to UTC in hours
clk_server = pool.ntp.org                            # Time server to be used
#
gpio_00 = uppreset = 1
gpio_12 = upvolume = 2
gpio_13 = downvolume = 2
gpio_14 = stop
gpio_17 = downpreset = 1
gpio_21 = station = icecast.omroep.nl:80/radio1-bb-mp3
gpio_22 = mp3track=0
#
ir_40BF = upvolume = 2
ir_C03F = downvolume = 2
#
mqqprefix = none
mqttbroker = none
mqttpasswd = *******
mqttport = 1883
mqttuser = none
#
pin_enc_clk = 25                                     # GPIO Pin number for rotary encoder "CLK"
pin_enc_dt = 26                                      # GPIO Pin number for rotary encoder "DT"
pin_enc_sw = 27                                      # GPIO Pin number for rotary encoder "SW"
pin_ir = 35                                          # GPIO Pin number for IR receiver VS1838B
pin_sd_cs = 21                                           # GPIO Pin number for SD card "CS"
pin_tft_cs = 15                                      # GPIO Pin number for TFT "CS"
pin_tft_dc = 2                                       # GPIO Pin number for TFT "DC"
pin_vs_cs = 5                                        # GPIO Pin number for VS1053 "CS"
pin_vs_dcs = 16                                      # GPIO Pin number for VS1053 "DCS"
pin_vs_dreq = 4                                      # GPIO Pin number for VS1053 "DREQ"
#
preset = 21
preset_00 = air.radiorecord.ru:805/dc_320           #Record Dancecore
preset_01 = air.radiorecord.ru:805/club_320         #Record Club Radio
preset_02 = air.radiorecord.ru:805/gold_320         #Gold
preset_03 = air.radiorecord.ru:805/fut_320          #Record MEGAMIX
preset_04 = air.radiorecord.ru:805/mix_320          #Record Goa
preset_05 = ic2.101.ru:8000/c6_2                #90's Gold
preset_06 = air.radiorecord.ru:805/sd90_320         #Superdiskoteka_90
preset_07 = 212.98.181.84:8000/novoeradio_128           #NovoeRadio
preset_08 = ic2.101.ru:8000/v3_1                #Auto radio
preset_09 = nostalgia.fm:8000/nostalgiafm.mp3           #Nostalgia
preset_10 = air.radiorecord.ru:805/rock_320         #Rock Radio
preset_11 = air.radiorecord.ru:805/rr_320               #Radio Record
preset_12 = chanson.hostingradio.ru:8041/chanson256.mp3     #Chanson
preset_13 = air.radiorecord.ru:8102/sd90_320            #Discoteka80
preset_14 = pioner.hostingradio.ru:8008/ppr_HD.mp3      #Pioner FM
preset_15 = retroserver.streamr.ru:8043/retro256.mp3        #Retro
preset_16 = air.radiorecord.ru:805/rus_320                  #Record Russian Mix
preset_17 = online.carnivalfm.ru:8000/stream            #Karnaval
preset_18 = online-kissfm.tavrmedia.ua:80/KissFM        #Kiss FM
preset_19 = ep256.hostingradio.ru:8052/europaplus256.mp3    #Europa +
preset_20 = 93.189.147.116:8000/light_stream256.mp3     #Imagine Radio FM (Rock/Blues)
preset_21 = air.radiorecord.ru:805/gop_320                  #GOP FM
preset_22 = 93.189.147.116:8000/full_stream256.mp3      #Imagine Radio FM
preset_23 = air.radiorecord.ru:805/deep_320                 #Record Deep Radio
#
toneha = 0
tonehf = 0
tonela = 0
tonelf = 0
#
volume = 88
#
wifi_00 = HOME/*******
wifi_01 = Gargoyle/*******

P/S/ if I start to remove the excess. for example pin_ir = 35 # GPIO Pin number for IR receiver VS1838B and associated with this parameter from crash

Edzelf commented 6 years ago

There is a conflict: gpio_21 = station = icecast.omroep.nl:80/radio1-bb-mp3 and: pin_sd_cs = 21

Please remove "gpio_21 = station = icecast.omroep.nl:80/radio1-bb-mp3" if you want to use pin 21 for SD.