Hello,
I created a TCP server on the base of the NUCLEO-H743ZI2 board and STM32_Nucleo_H723ZG_FreeRTOS_TCP project. It is worked well till I found necessity to enable Cache. I can’t connect to my board any more with SCB_EnableDCache(); command in the main.c.
I have googled and found few topics in which similar problems reported. So I have implemented all recommendations from the \FreeRTOS-Plus-TCP\source\portable\NetworkInterface\STM32Hxx\readme.md file, but this doesn’t help - I still can’t connect. In the putty window I see next output:
Calling FreeRTOS_IPInit…
FreeRTOS_AddEndPoint: MAC: 78-90 IPv4: 192.168.0.200
PHY ID 7C130
xPhyReset: phyBMCR_RESET 0 ready
+TCP: advertise: 01E1 config 3100
prvEthernetUpdateConfig: LS mask 00 Force 1
Autonego ready: 00000004: full duplex 100 mbit high status
Network buffers: 56 lowest 56
Queue space: lowest 69
Link Status is high
IP-address : 192.168.0.200
End-point : up = yes method static
Net mask : 255.255.255.0
GW : 192.168.0.1
DNS-0 : 192.168.0.255
Broadcast : 192.168.0.255
MAC address: 00-12-34-56-78-90
@aggarg
Thank you! I saw this page already. But I do not understand how to use it in my project as this page is about LWIP library and I use TCP+ library.
I have bad experience with LWIP stability and speed, so for this project I decided to use TCP+.
And since I’m not an STM32H7xx expert, I ran into a lot of problems…
Which buffer allocation scheme are you using in the project? (BufferAllocation_1.c or BufferAllocation_2.c)
Also currently there are 2 network interfaces for STM32, if you are on older version of FreeRTOS+TCP then you might be using the legacy H7 network interface, is that the case?
@tony-josi-aws
I can’t answer about buffer allocation scheme. Unfortunately I did not find how to distinguish the used scheme in my project - I use STM32_Nucleo_H723ZG_FreeRTOS_TCP project as an initial one. Please give some advise how to find answer to your question.
As for the versions of NetworkInterface.c and related files used - all of them dated by 16/07/2024. So I used FreeRTOS-plus-TCP V4.2.2
And your references are to the FreeRTOS-plus-TCP V4.3.1
So I deleted the FreeRTOS-plus-TCP folder in my project (I use STM32CubeIDE) and inserted a new one. And now I have to find a way how to build my project - compiler complains that it couldn’t find stm32h7xx_hal_eth.h. It seems that folder structure has been changed.
There are two such files:
NetworkInterface\STM32\Drivers\H7\stm32h7xx_hal_eth.h 92174 bytes
NetworkInterface\STM32\Legacy\STM32Hxx\stm32h7xx_hal_eth.h 185 bytes
Which one I have to use?
@htibosch
Thank you Hein!
But if I follow your link and open main.c I see:
/* Enable I-Cache */
SCB_EnableICache();
/* Enable D-Cache */
/* _HT_ This project has not been tested with data cache enabled.
Changes will be necessary in the network driver to make it work. */
// SCB_EnableDCache();
In your piece of code in the post most interesting for me now is this part:
/* Make the AXI memory non-cacheable */
MPU_Config();
Can you show the MPU settings in your project?
Thank you in advance!
@htibosch
Thank you! I copied content of your MPU_Config( void ) to my project - and now I can connect to my server even with DCache enabled.
Now I have to configure my project’s ioc file according to your settings.