Showing results for 
Search instead for 
Did you mean: 

Issue with mbedTLS Handshake Failure When Using HyperRAM for FreeRTOS Heap

Associate II

Hello ST Community,

I'm currently working on a project using an STM32 microcontroller and encountering a critical issue related to mbedTLS during SSL handshake processes. I’m seeking insights or solutions based on your experience with similar hardware configurations.

Overview of the Setup:

  • Microcontroller: STM32H735DK
  • RTOS: FreeRTOS
  • External Memory: HyperRAM

Problem Description: The system functions perfectly with the FreeRTOS heap allocated in the internal memory—mbedTLS successfully completes the SSL handshake without any issues. However, when I configure the FreeRTOS heap to utilize external HyperRAM, the SSL handshake fails every time.

Error Encountered: The specific error encountered during the SSL handshake is MBEDTLS_ERR_SSL_INTERNAL_ERROR with an error code of -0x6C00. This error occurs precisely during the mbedtls_ssl_setup, which configures the SSL context based on the given parameters.

Steps Taken:

  • HyperRAM Testing: I have confirmed that the HyperRAM is functional; other components such as ethernet_data operate correctly when hosted on it.
  • Configuration Review: Standard mbedtls_config.h and memory management routines are employed, which function as expected when using internal memory.

Questions for the Forum:

  1. Has anyone experienced similar issues when integrating mbedTLS with external memory, particularly HyperRAM, on STM32 platforms?
  2. Are there known compatibility issues with mbedTLS or specific configurations that need to be adjusted for HyperRAM usage?
  3. Could there be any specific memory alignment or timing considerations that need to be addressed when using HyperRAM for SSL operations?

I would greatly appreciate any insights, shared experiences, or debugging tips you might have. It’s crucial for progressing with the security aspects of the project, and any help would be invaluable.

Thank you for your time and assistance.

Best regards, Emo