Issue on FreeRTOS+TCP STM32F4xx driver

Hi there,

while porting an existing code base to FreeRTOS+TCP, I found that in networkinterface.c,

#define ETH_DMA_ALL_INTS …

appears to be missing the ETH_DMA_IT_AIS bit. According to ST docs, this is a sticky bit that must be cleared explicitly. In my tests, I came across a situation in which this bit was set, and failing to clear it appeared to halt the network.

About the process: Should we first discuss this here, or should I submit an issue or a PR right away?

Thanks RAc

Had a look into my STM32F4 ETH driver and I’m also taking care about ETH_DMA_IT_AIS.
So I guess it should be handled :wink: Even though it never occurred in practice…
IMO you can submit a PR.

Hi @RAc,
Thank you for bringing this to our attention. Please make a PR for the team to review.

Hi Jason,

unfortunately, GitHub won’t allow me to push my commit from my machine to my GitHub fork ( GitHub - RAc-GIT/FreeRTOS-Plus-TCP: FreeRTOS-Plus-TCP library repository. +TCP files only. Submoduled into https://github.com/FreeRTOS/FreeRTOS and various other repos. ) due to authentication issues; thus I can’t issue a PR. Please use attached the diff so that someone else may work that into the repo.

Thanks!

 portable/NetworkInterface/STM32Fxx/NetworkInterface.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/portable/NetworkInterface/STM32Fxx/NetworkInterface.c b/portable/NetworkInterface/STM32Fxx/NetworkInterface.c
index 1dfdb50..d3fa7cc 100644
--- a/portable/NetworkInterface/STM32Fxx/NetworkInterface.c
+++ b/portable/NetworkInterface/STM32Fxx/NetworkInterface.c
@@ -74,7 +74,7 @@
 #define EMAC_IF_ALL_EVENT    ( EMAC_IF_RX_EVENT | EMAC_IF_TX_EVENT | EMAC_IF_ERR_EVENT )
 
 #define ETH_DMA_ALL_INTS                                                                  \
-    ( ETH_DMA_IT_TST | ETH_DMA_IT_PMT | ETH_DMA_IT_MMC | ETH_DMA_IT_NIS | ETH_DMA_IT_ER | \
+    ( ETH_DMA_IT_TST | ETH_DMA_IT_PMT | ETH_DMA_IT_MMC | ETH_DMA_IT_NIS | ETH_DMA_IT_AIS | ETH_DMA_IT_ER | \
       ETH_DMA_IT_FBE | ETH_DMA_IT_RWT | ETH_DMA_IT_RPS | ETH_DMA_IT_RBU | ETH_DMA_IT_R |  \
       ETH_DMA_IT_TU | ETH_DMA_IT_RO | ETH_DMA_IT_TJT | ETH_DMA_IT_TPS | ETH_DMA_IT_T )

Thank you @RAc for reporting this.

I had never come across this bit. Probably using an older HAL.

The same change should be made to the IPv6 version here.

I don’t mind creating the PR’s

Thanks

well I seem to have been able to create a PR for the IPv4 base:

Amended ETH_DMA_IT_xxx flags in ETH_DMA_ALL_INTS by RAc-GIT · Pull Request #402 · FreeRTOS/FreeRTOS-Plus-TCP · GitHub

Please baer with me, this is my first PR ever, an IFR flight with no instructor in the cockpit - I probably goofed it all up. Please let me know if it worked that way…

Thanks!

Thanks for the PR,
I edited it to fix the formatting as Uncrusify was complaining about it, it is now passing.