Page 1 of 1
ESP32 Failed to allocate RSA interrupt 261
Posted: Mon Apr 15, 2024 9:48 am
by fanmen1
I'm trying to implement a MQTT broker connection with my ESP32-S3, the connection was working fine when I was just trying to establish the initial connection. But now, after I've created a data packets to be sent over, the connection fails with the following error "Failed to allocate RSA interrupt 261", there is quite a lot a memory available and I'm also making use of SPIRAM. I'm also using the default esp_crt_bundle, which is sufficient for the connection.
Please suggest a work around for this certification issue.
Re: ESP32 Failed to allocate RSA interrupt 261
Posted: Tue Apr 16, 2024 1:51 am
by ESP_Sprite
You're probably running out of interrupts, and the encryption mqtt wants to do indirectly initializes the hardware RSA peripheral, which needs an interrupt to work. You can free up interrupts by marking them as shared (use the correct flag when initializing peripherals for that) or you can disable hardware encryption in menuconfig.
Re: ESP32 Failed to allocate RSA interrupt 261
Posted: Wed Apr 24, 2024 1:07 pm
by fanmen1
can you please provide more info on disabling hardware encryption?
Re: ESP32 Failed to allocate RSA interrupt 261
Posted: Thu Apr 25, 2024 2:33 am
by ESP_Sprite
Not sure exactly where, but I'm pretty sure it's a menuconfig option.
Re: ESP32 Failed to allocate RSA interrupt 261
Posted: Thu Apr 25, 2024 7:35 am
by fanmen1
I disabled the following option in menuconfig: Enable hardware MPI (bignum) acceleration which seems to have stopped the system crashes and the interrupt error. But now the server handshake is failing with the following error even after certificate verification success.
Re: ESP32 Failed to allocate RSA interrupt 261
Posted: Fri Apr 26, 2024 9:09 am
by fanmen1
If anyone is facing the same issue, here are some insights to overcome this.
1. Go to SSL Labs Server Test online and check all the cipher-suites that is supported by the server.
2. you can either disable the hardware MPI (bignum) acceleration in the menuconfig or move some ISR to a different core, either option works as expected.
3. depending on the cipher-suites of the server, enable the same in the menuconfig under TLS key exchange methods.
Hope this helps.