Hi,
I am working on an MQTT round-trip test and I want to improve my performance, I tried enabling the D-Cache and the times improve with TCP port but when I tried with TLS the connection is lost, I read about the coherency problem, so I moved the mbedtls library into a non-cacheable region but the problem still present.
Regards,
Thanks for the reply, I did the following changes in the code and the linker file to place mbedTLS into non-cached memory.
Thanks,
Karen
Hello Karen,
The OCRAM is handled differently than the DTCM and ITCM memories. What happens if you place the mbedTLS into either the DTCM or ITCM?
Regards,
Victor
Hi Victor,
I already solved the issue by moving the lwip library into the non-cacheable region as shown in the following image:
I tested with the mbedtls library in the non-cacheable region and outside of it. In both cases, it works, but if I put mbedtls in the non-cacheable region, the round trip using TLS is a bit slower than if I just leave lwip in the non-cacheable region.
Thanks for the support,
Karen
Hello Karen,
In which memory specifically are you placing the mbedtls library? To work with mbedTLS, you need to place the mbedTLS heap allocator in a non-cached memory that can be accessed by the DCP.
Also, you might find useful the following application note:
Using the i.MXRT L1 Cache (nxp.com)
Regards,
Victor