jvpernis / esp32-ps3

Control your ESP32 projects with a PS3 controller!
309 stars 84 forks source link

"ps3Init" Error: Guru Meditation Error: Core 0 panic'ed (LoadProhibited). Exception was unhandled. #73

Closed Juanigrandinetti closed 4 months ago

Juanigrandinetti commented 4 months ago

Hi! I'm trying to pair my ps3 joystick with esp32 but the program fails when flashing the code. It seems that the problems occurs when calling ps3Init() function, more specifically in this line "ESP_BLUEDROID_STATUS_CHECK(ESP_BLUEDROID_STATUS_ENABLED);" (below is the code of the function that contains this line). On the other hand, i followed the configuration instructions so i guess its not a configuration issue. Also, i attached an image of the error and the mapping of the propagation of it through the functions.

`esp_err_t esp_spp_enhanced_init(const esp_spp_cfg_t *cfg) { btc_msg_t msg; btc_spp_args_t arg; ESP_BLUEDROID_STATUS_CHECK(ESP_BLUEDROID_STATUS_ENABLED); printf("[ESP_SPP_ENHANCED_INIT] CFG->MODE %d\n", cfg->mode); printf("[ESP_SPP_ENHANCED_INIT CFG->TX_BUFFER_SIZE] %d\n", cfg->tx_buffer_size); if (cfg->mode == ESP_SPP_MODE_VFS && (cfg->tx_buffer_size < ESP_SPP_MIN_TX_BUFFER_SIZE || cfg->tx_buffer_size > ESP_SPP_MAX_TX_BUFFER_SIZE)) { LOG_WARN("Invalid tx buffer size"); return ESP_ERR_INVALID_ARG; }

msg.sig = BTC_SIG_API_CALL;
msg.pid = BTC_PID_SPP;
msg.act = BTC_SPP_ACT_INIT;

arg.init.mode = cfg->mode;
arg.init.enable_l2cap_ertm = cfg->enable_l2cap_ertm;
arg.init.tx_buffer_size = cfg->tx_buffer_size;

return (btc_transfer_context(&msg, &arg, sizeof(btc_spp_args_t), NULL, NULL) == BT_STATUS_SUCCESS ? ESP_OK : ESP_FAIL);

}`

Thanks for the support.

image