# MQTT with TLS

**URL:** <https://forums.freertos.org/t/mqtt-with-tls/10644>\
**Category:** Libraries\
**Created:** [September 9, 2020, 8:43pm UTC](https://forums.freertos.org/t/mqtt-with-tls/10644 "2020-09-09T20:43:07Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![manu](https://avatars.discourse-cdn.com/v4/letter/m/7c8e57/32.png) [@manu](https://forums.freertos.org/u/manu)\
**Post date:** [September 9, 2020, 8:43pm UTC](https://forums.freertos.org/t/mqtt-with-tls/10644/1 "2020-09-09T20:43:07Z")

</div>

Hi,

I’ve been trying to read documentation into the subject; But I see people using it with a Visual Studio based simulator.

Does this work on a MCU such as the STM32H7 ?

Thanks,

Manu

---

<div class="post-metadata">

**Author:** ![rtel](https://d3iykfbgfh8zhg.cloudfront.net/user_avatar/forums.freertos.org/rtel/32/31_2.png) [@rtel](https://forums.freertos.org/u/rtel)\
**Post date:** [September 9, 2020, 10:33pm UTC](https://forums.freertos.org/t/mqtt-with-tls/10644/2 "2020-09-09T22:33:01Z")

</div>

FreeRTOS is designed specifically for use on microcontrollers such as the STM32H7. The Visual Studio port is purely used for convenience as the tools are free, powerful, and do not require users to have any particular hardware in order to use a demo. Everything that we present in Visual Studio is actually designed to run on a microcontroller.

---

<div class="post-metadata">

**Author:** ![manu](https://avatars.discourse-cdn.com/v4/letter/m/7c8e57/32.png) [@manu](https://forums.freertos.org/u/manu)\
**Post date:** [September 10, 2020, 7:55am UTC](https://forums.freertos.org/t/mqtt-with-tls/10644/3 "2020-09-10T07:55:34Z")

</div>

Hi Richard,

Thanks for the clarification. I was a bit confused, but it is clear now. Can you recommend a link, where to get started up on the topic ?

Thanks,

Manu

---

<div class="post-metadata">

**Author:** ![htibosch](https://d3iykfbgfh8zhg.cloudfront.net/user_avatar/forums.freertos.org/htibosch/32/62_2.png) [@htibosch](https://forums.freertos.org/u/htibosch)\
**Post date:** [September 10, 2020, 7:58am UTC](https://forums.freertos.org/t/mqtt-with-tls/10644/4 "2020-09-10T07:58:42Z")

</div>

> [@rtel](#):
>
> FreeRTOS is designed specifically for use on microcontrollers such as the STM32H7

In case you want to use FreeRTOS+TCP, you can use a new driver that was just sumitted on [Github](https://github.com/FreeRTOS/FreeRTOS/pull/256).

As for now, you can find the source in this [branch](https://github.com/htibosch/FreeRTOS/tree/FreeRTOS%2BTCP_Network_interface_STM32H7xx/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/STM32Hxx).

---

<div class="post-metadata">

**Author:** ![manu](https://avatars.discourse-cdn.com/v4/letter/m/7c8e57/32.png) [@manu](https://forums.freertos.org/u/manu)\
**Post date:** [September 10, 2020, 8:21am UTC](https://forums.freertos.org/t/mqtt-with-tls/10644/5 "2020-09-10T08:21:25Z")

</div>

Hi Hein,

Just what the patient wanted and what the doctor ordered. 🙂 Please do see my other post on the H7 Ethernet.

Any other pointers you have for me, before I adorn the scuba gear ?

Much appreciated.

Thanks,  
Manu

---

<div class="post-metadata">

**Author:** ![htibosch](https://d3iykfbgfh8zhg.cloudfront.net/user_avatar/forums.freertos.org/htibosch/32/62_2.png) [@htibosch](https://forums.freertos.org/u/htibosch)\
**Post date:** [September 10, 2020, 8:29am UTC](https://forums.freertos.org/t/mqtt-with-tls/10644/6 "2020-09-10T08:29:09Z")

</div>

That’s it, just dive into it.

Here is the FreeRTOSIPConfig.h file that I used while testing: [stm32h7\_example\_settings.zip](https://forums.freertos.org/uploads/short-url/kJhlCM7gD06CIpc7ueRQ4RY2AqX.zip) (16.7 KB)

Please also have a look in the [readme.md](https://github.com/htibosch/FreeRTOS/blob/FreeRTOS%2BTCP_Network_interface_STM32H7xx/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/NetworkInterface/STM32Hxx/readme.md), that accompanies the NetworkInterface.

Do you already have a working FreeRTOS project for your board? Which board do you have?

---

<div class="post-metadata">

**Author:** ![manu](https://avatars.discourse-cdn.com/v4/letter/m/7c8e57/32.png) [@manu](https://forums.freertos.org/u/manu)\
**Post date:** [September 10, 2020, 8:36am UTC](https://forums.freertos.org/t/mqtt-with-tls/10644/7 "2020-09-10T08:36:16Z")

</div>

I have a STM32H743ZI2 (MB1364C) Nucleo-144 board at my end.

Previously tried some small tests with FreeRTOS on my board.  
Have not tried out FreRTOS+TCP yet. I was searching around on that  
part.

Thanks,

Manu

---

<div class="post-metadata">

**Author:** ![htibosch](https://d3iykfbgfh8zhg.cloudfront.net/user_avatar/forums.freertos.org/htibosch/32/62_2.png) [@htibosch](https://forums.freertos.org/u/htibosch)\
**Post date:** [September 10, 2020, 8:58am UTC](https://forums.freertos.org/t/mqtt-with-tls/10644/8 "2020-09-10T08:58:18Z")

</div>

Hello Manu,

> I have a STM32H743ZI2 (MB1364C) Nucleo-144 board at my end.

I had an STM32H747 DISC0 to develop and test the driver. The memory layout might differ a bit.

My board needed soldering to disable the display and to enable the Ethernet. Also I had to solder wires to lift up the BOOT0 pen. Using jumpers would have been easier.

Like I wrote, you will have to change the linker script to add an entry for RAM3. Here is my linker file: [STM32H747XIHX\_FLASH.ld.zip](https://forums.freertos.org/uploads/short-url/29STDMO8uooxWZd0nGucs2aIULi.zip) (1.8 KB), but it might not work for a STM32H743.

> Previously tried some small tests with FreeRTOS on my board.  
> Have not tried out FreRTOS+TCP yet. I was searching around on that  
> part.

There is a lot of documentation about that. If you want I can send you a copy of my testing project.

When developing, remember to use stacks that are big enough, a large heap, activate the application hooks for stack overflow and heap failures. Enable `configASSERT` etc etc.

Some part of my RAM will only work when the compiler uses optimisation (`-Os`). Without optimisation, the memory seems unreliable. I haven’t figured out yet what happened.

Just to be sure: I run the IP-task on the CM7 core, which runs on 400 MHz.

---

<div class="post-metadata">

**Author:** ![manu](https://avatars.discourse-cdn.com/v4/letter/m/7c8e57/32.png) [@manu](https://forums.freertos.org/u/manu)\
**Post date:** [September 11, 2020, 9:10am UTC](https://forums.freertos.org/t/mqtt-with-tls/10644/9 "2020-09-11T09:10:10Z")

</div>

Hi Hein,

Would be great to have a copy of your test setup.

Regarding the RAM, did you mean the SRAM on the MCU, or the SDRAM chip soldered on the board ?

H743 and H747 both have single CM7 cores looking at the datasheets.

I was initially running at 400MHz, but in between tried 480Mhz as well. Switching to 400MHz does not seem to be a stumbling block.

Thanks,

Manu
