cancel
Showing results for 
Search instead for 
Did you mean: 

STM32 with TCP/IP

Koceila Hami
Associate II
Posted on June 05, 2018 at 10:42

Hello,

I'm working on a project that aims to develop a program for compliance with the TS13 149 (

http://itxpt.org/en/home

) standard of passenger counting systems for public transit vehicles produced by the company in which I am doing my work. traineeship. The purpose of the project is to introduce network management protocols based on a

TCP / IP (Ethernet) link. To do this, the standard requires a service-oriented architecture (SOA) and the following protocols:

SOA:the project must meet a service-oriented architecture

FTP: For file transfer

SSH (Secure Shell): To make secure (encrypted) connections between a client and a server and to have control over a remote terminal.

HTTP: Used for data triggered by an event

mDNS: Simplifies name resolution and enables dynamic scalability and evolution in a local network.

TCP: For data transport

DHCP: For automatic configuration of IP parameters of a station or machine

IP (IPv4, IPv6): For the address space

Ethernet: For the link

My questions are then:

  • Does the STM microcontroller support the TCP / IP stack?
  • If so, what kind of microcontroller should I use? (according to my research, STM32 could do the trick !)
  • Is the TCP / IP stack that is made for this microcontroller supports all the protocols mentioned?
  • Where to download thisstack?
  • Which programming environment uses these microcontrollers?

If the STM microcontrollers support all these protocols, our company is committed to carry out this project with this type of microcontrollers

Thank you all

#stm32

Note: this post was migrated and contained many threaded conversations, some content may be missing.
10 REPLIES 10
Koceila Hami
Associate II
Posted on June 07, 2018 at 09:15

After several searches, I came across STMCube ™ (STM32Cube MCU Package for STM32F4), see this site (

http://www.st.com/en/embedded-software/stm32cubef4.html

 ) which proposes a TCP / IP solution.

We only have to install this application STMCube ™ on our microcontroller, or there are development steps to follow?

AvaTar
Lead
Posted on June 07, 2018 at 09:43

My suggestion - save yourself the hassle, and go for a Cortex A.

Posted on June 07, 2018 at 09:55

Hello AvaTar,

What criterion do you propose to me Cortex-A? The TCP/IP stack is supported by this tool? send me documentation links when you have time, thank you

I li on my research that it is possible to install free software which are graphic tools of software configuration allowing to generate initialization code C using graphic assistants! it's possible?

Posted on June 07, 2018 at 10:15

What criterion do you propose to me Cortex-A? The TCP/IP stack is supported by this tool?

Cortex A (all variants I know) have a proper ethernet phy / peripheral and plenty of performance to keep up with the network traffic, aside from the normal application.

They can run a proper OS (Linux, VxWorks, Qnx, etc.), and use to come with all the required drivers.

In regard to ethernet + TCP/IP, you can port any stack/application available for your OS, many freely available. The same goes for GUI design tool, Qt comes to my mind.

Not to forget, cross development is much easier. You can develop and test most of your application on the host, or even on the target itself.

Posted on June 07, 2018 at 10:36

Hi AvaTar, thanks for your reply

I do not understand everything you say, I already realized this Ethernet link with the protocols mentioned (which are required) on a PIC, and its by downloading a TCP / IP stack and then creating a project by adding the libraries of protocols required, I then proceeded to the realization of this link on a Raspberry PI3 and that just with configuration in command lines, now I would like to realize this connection with these different protocols on a STM, and I do not know where to start nor how to proceed, I do not know anything about this microcontroller.

From what I read, it is possible to proceed as the Raspberry Pi by configuring these protocols? or should I follow the same approach as the PIC?

The Cortex-A you propose me, so you mean a STM that relies on a Cortex-A microprocessor? if so, what type of STM and card should I use?

Posted on June 07, 2018 at 10:53

The Cortex-A you propose me, so you mean a STM that relies on a Cortex-A microprocessor? if so, what type of STM and card should I use?

At the moment, ST does not have any Cortex A.

Not sure what the STM32 controller should actually run. Working Ethernet + TCP/IP implementations exist (mostly LWIP). But these are the requirements you mentioned:

SOA: the project must meet a service-oriented architecture

FTP: For file transfer

SSH (Secure Shell): To make secure (encrypted) connections between a client and a server ...

HTTP: Used for data triggered by an event

mDNS: Simplifies name resolution and enables dynamic scalability and evolution in a local network.

TCP: For data transport

DHCP: For automatic configuration of IP parameters of a station or machine

Trying to implement those on a Cortex M (STM32) or a PIC, you will quickly find out that you run into trouble - both performance-wise and code size wise.

Posted on June 07, 2018 at 11:25

thanks again,

As you had suggested, I also think working on a STM32 Cortex M.

Regarding the PIC, we could develop the code with CCS C Compiler, the link walk without error, I tested by reading the frames sent and received on Wireshark, if I transfer a file, the FTP protocol is requested, when I connect to the network, an IP address is automatically assigned to me, with DHCP .... so my goal, and realized the same thing on a STM Microcontroller? but what disturbs me is the applications on the site, which offers any type of link like this one that fits my project perfectly! (

http://www.st.com/content/st_com/en/products/embedded-software/mcus-embedded-software/stm32-embedded-software/stm32-3rd-party-embedded-software/seg-tcp.html

 )
Posted on June 07, 2018 at 12:24

I'm still not quite sure what are the requirements for your MCU, being it the STM32 or the PIC.

Or, with other words, what code it actually needs to run.

Regarding the PIC, we could develop the code with CCS C Compiler ...

This suggests a PIC16/18, or a PIC24/dsPIC.

A STM32 is surely more than a match for a PIC's performance.

The MIPS-based PIC32 would have roughly equivalent performance. But beside of being almost proprietary, Microchip was not able to deliver them with competitive clock frequencies the last time I checked.

but what disturbs me is the applications on the site, which offers any type of link like this one that fits my project perfectly! (

/external-link.jspa?url=http%3A%2F%2Fwww.st.com%2Fcontent%2Fst_com%2Fen%2Fproducts%2Fembedded-software%2Fmcus-embedded-software%2Fstm32-embedded-software%2Fstm32-3rd-party-embedded-software%2Fseg-tcp.html

)

Pretty sure the Segger stack is better then LWIP, but it is not free.

Posted on June 07, 2018 at 15:49

In fact, after the implementation of these protocols, we will have to make a serial link with our counting device (RS232) in order to allow our vehicle counting device this data which comes from camera cells (which counts the travelers), in according to this new and specific link according to the TS13149 standard, so in summary, my goal is to make a study on whether the STM microcontroller TCP / IP stack can support all these cited protocols, which programming environment used (of after my research it's System Workbench for STM32 based on Eclipse), and also see the input-output compatibility between our counting device (based on a PIC18) and the STM32, also their UART compatibility.

So before I started programming, I should first do a study to find out what kind of STM32 used with which type of card, and the programming environment, all of it taking the least expensive solution.

We know that the PIC32 TCP / IP stack can support all the protocols listed, but not being available in stock, unlike the STM32, we are doing a study to determine compatibility to determine which one is used and if can meet our requirements.