Hello Forum,
I've been working on an ESP32 application for months, the application has a lot of code, so I was generating the different modules separately and testing them.
Apparently all the modules work correctly separately but now when joining them in an application I see that every certain random time, 10 or 15 minutes, the ESP32 restarts with this error message:
I start to eliminate modules and each time the problem appears in another area of the program without meaning, but it is always where there are SELECT CASE instructions, for example in this program block:
This piece of code has several SELECT CASE chained inside each other, but the error is not always generated in this module, it is a continuous module but I shorten it.
If I cancel this piece of code the error continues in other code that contains the SELECT CASE statement. it's a random thing.
I can't find an explanation for the malfunction of the code.
Someone is suffering the same problem.
Thank you so much
I've been working on an ESP32 application for months, the application has a lot of code, so I was generating the different modules separately and testing them.
Apparently all the modules work correctly separately but now when joining them in an application I see that every certain random time, 10 or 15 minutes, the ESP32 restarts with this error message:
Guru Meditation Error: Core 1 panic'ed (LoadProhibited). Exception was unhandled.
I start to eliminate modules and each time the problem appears in another area of the program without meaning, but it is always where there are SELECT CASE instructions, for example in this program block:
'+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
'
' Gestion del Menu 100 al 199
'
Private Sub Gestion_del_Menu_100_199
Private M1 As Byte ' Memoria Inicial del Menu de Display
Private M2 As Byte ' Memoria Inicial del SubMenu de Display
' Memoriza el Numero de menu
M1 = DISPLAY.Menu_Display
' Memoriza el SubMenu
M2 = DISPLAY.SubMenu_Display
' Segun en la Pantalla que Esta Asi actuan las Teclas
Select Case DISPLAY.Menu_Display
Case 100 ' Inicio Menu Tecnico
If F_T_Mas = True Then
DISPLAY.SubMenu_Display = DISPLAY.SubMenu_Display + 1
End If
If F_T_Menos = True Then
DISPLAY.SubMenu_Display = DISPLAY.SubMenu_Display - 1
End If
' Si Se Pulsa Enter
If F_T_Enter = True Then
' Segun el Sub Menu Seleccionado Asi Actual
Select Case DISPLAY.SubMenu_Display
Case 0 ' Pruebas
DISPLAY.SubMenu_Display = 0
DISPLAY.Menu_Display = 103
Case 1 ' Parametros VF
DISPLAY.SubMenu_Display = 0
DISPLAY.Menu_Display = 113
Case 2 ' PLC
DISPLAY.SubMenu_Display = 0
DISPLAY.Menu_Display = 111
Case 3 ' Mas
Case 4 ' Atras
DISPLAY.SubMenu_Display = 0
DISPLAY.Menu_Display = 3
End Select
End If
Case 104 ' Menu Principal de Pruebas
If F_T_Mas = True Then
DISPLAY.SubMenu_Display = DISPLAY.SubMenu_Display + 1
End If
If F_T_Menos = True Then
DISPLAY.SubMenu_Display = DISPLAY.SubMenu_Display - 1
End If
' Si Se Pulsa Enter
If F_T_Enter = True Then
' Segun el Sub Menu Seleccionado Asi Actual
Select Case DISPLAY.SubMenu_Display
Case 0 ' Pruebas Salidas Digitales
DISPLAY.Aux_BY = 0
DISPLAY.Aux_Bi = 0
DISPLAY.Aux_V = False
DISPLAY.Menu_Display = 107
Case 1 ' Pruebas Salida Analogica 1
DISPLAY.Aux_By = 1
DISPLAY.Menu_Display = 109
Case 2 ' Pruebas Salida Analogica 2
DISPLAY.Aux_By = 2
DISPLAY.Menu_Display = 109
Case 3 ' Mas
'DISPLAY.Aux_BY = 1
'DISPLAY.SubMenu_Display = 0
'DISPLAY.Menu_Display = 21
DISPLAY.SubMenu_Display = 0
DISPLAY.Menu_Display = 121
Case 4 ' Atras
DISPLAY.SubMenu_Display = 0
DISPLAY.Menu_Display = 99
End Select
End If
Case 108 ' Pruebas Salidas Digitales
This piece of code has several SELECT CASE chained inside each other, but the error is not always generated in this module, it is a continuous module but I shorten it.
If I cancel this piece of code the error continues in other code that contains the SELECT CASE statement. it's a random thing.
I can't find an explanation for the malfunction of the code.
Someone is suffering the same problem.
Thank you so much