TCP examples with STM32Fxx HAL

kat123 wrote on Monday, March 05, 2018:

Hi,

Are there any avalible examples with FreeRTOS+TCP using the STM32Fxx HAL generated with STM32CubeMX?

I included FreeRTOS in the STM32CubeMX project and then added in the FreeRTOS+TCP files after generating the code but I’m not sure where to go from here.

heinbali01 wrote on Monday, March 05, 2018:

As a quick answer, have a look at the download in freertos.org/tcp for a demo project using STM32F4
For the FreeRTOS+TCP library, you better take the latest from AWS github
I’m currently working on a combined driver for STM32F4 and F7.
Here is an earlier version of that driver:.

Right now I have little time, but I will publish the latest driver once it is well tested. With a few days time.

heinbali01 wrote on Monday, March 05, 2018:

Hi Kathryn, which part are you using exactly? An STM32F ???

heinbali01 wrote on Monday, March 05, 2018:

Find attached the latest release of a FreeRTOS+TCP driver for STM32F4 and STM32F7.

heinbali01 wrote on Monday, March 05, 2018:

The driver that I attached won’t compile without the patch that I wrote about here:
https://sourceforge.net/p/freertos/discussion/382005/thread/760109c4/?limit=250#8a99
Please find attached ‘FreeRTOS_ARP.7z’, which contains the changes to FreeRTOS_ARP.c.

The changes allow the device to connect and ping to itself.

kat123 wrote on Tuesday, March 06, 2018:

I found this demo while looking at the FreeRTOS+TCP site.

I’m using a STM3240G-EVAL board. I was using IAR but I’ve downloaded TrueSTUDIO to try and run the demo. I followed the set up instructions and updated the IP, Gateway and Mask however I have been unable to connect to the board and see the UDP logging or find the board on the network.

I will take a look at the drivers you provided and see if I can get anything going - thank you very much.

kat123 wrote on Tuesday, March 06, 2018:

The link to UDPTerm on the STM3240G demo page is also broken. I have been trying to find another program to do the same thing but I haven’t found a replacement yet.

kat123 wrote on Tuesday, March 06, 2018:

The link to UDPTerm on the STM3240G demo page is also broken. I have been trying to find another program to do the same thing but I haven’t found a replacement yet.

rtel wrote on Tuesday, March 06, 2018:

Quick Google for UDPterm shows this page:
http://www.midi-and-more.de/more/udpterm.htm

You may also like to look at YAT, which you will find on SourceForge.

heinbali01 wrote on Tuesday, March 06, 2018:

Hi Kathryn, unfortunately the Ethernet port of my STM3240G-EVAL has broken. I still have a STM32F4 Disco board that works well.

For the EVAL board, you will have to define ipconfigUSE_RMII=0.

A Discovery board has a Reduced Media Independent Interface, and ipconfigUSE_RMII is defined as 1.

The demo was written for a STM3240G-EVAL, so the port settings and CPU clocks should be OK.

Can you check if in the module phyHandling.c the PHY can be accessed? Can de ID be established?
Does the auto negotiation work out OK? Do you see a Link Status?

Ones the Link Status is high, the IP-stack will start sending gratuitous ARP packets, can you see those packets in WireShark?

If you can not get it running, please tell here.

kat123 wrote on Wednesday, March 07, 2018:

Hi,

I’ve tried running the demo with ipconfigUSE_RMII definied as 0.

I added breakpoints to phyHandling.c - at the start of

BaseType_t xPhyDiscover( EthernetPhy_t *pxPhyObject )

however this is never reached .

The LEDs on both the RJ45 port on the board and on the Netgear switch I’m using suggest that a link has been established but there is no data being sent. I can’t see any ARP packets in Wireshark.

heinbali01 wrote on Wednesday, March 07, 2018:

We’re getting into many details now that are possibly not too interesting for this forum.
Would you mind to drop an email to h tibosch freertos org
and we’ll get it working