Author Topic: STM32 Ethernet Problem  (Read 991 times)

0 Members and 1 Guest are viewing this topic.

Offline flowchartxTopic starter

  • Newbie
  • Posts: 3
  • Country: tr
STM32 Ethernet Problem
« on: February 07, 2023, 06:37:41 am »

Good work everyone,
I am communicating with the STM32F746 processor using the lwip library. I got the ethernet buffers in the special area of ​​the RAM and protected it with the MPU. Then I disabled the buffering feature. My code works as I want, but after 10-15 minutes communication is cut off. My grounding, my connections, everything looks good.
 

Offline paulca

  • Super Contributor
  • ***
  • Posts: 4055
  • Country: gb
Re: STM32 Ethernet Problem
« Reply #1 on: February 09, 2023, 12:49:29 pm »
Run it in the debugger.   Wait for it to fail.  Pause the execution and see where it's stuck.  Often you'll find it in an error handler loop.

Another common gotcha is forgetting to implement the Error call backs for peripherals.  If you are triggering on interrupts and an error occurs, the peripheral will stop.  You will need to recover and start it back up again in the Error callback.

In the debugger, sanity test things, make sure you are writing to the area you expect and you haven't used Byte length instead of word length.
"What could possibly go wrong?"
Current Open Projects:  STM32F411RE+ESP32+TFT for home IoT (NoT) projects.  Child's advent xmas countdown toy.  Digital audio routing board.
 

Offline peter-h

  • Super Contributor
  • ***
  • Posts: 3699
  • Country: gb
  • Doing electronics since the 1960s...
Re: STM32 Ethernet Problem
« Reply #2 on: February 09, 2023, 01:26:33 pm »
MPU? Is this a multi processor system?

I recall some posts on the ST forums about getting stuff to work. Seems very difficult, with various hacks like __DSB being needed.

I've spent months of my life getting a 32F417 working reliably with LWIP :)
https://www.eevblog.com/forum/microcontrollers/anyone-here-familiar-with-lwip/
Z80 Z180 Z280 Z8 S8 8031 8051 H8/300 H8/500 80x86 90S1200 32F417
 

Offline flowchartxTopic starter

  • Newbie
  • Posts: 3
  • Country: tr
Re: STM32 Ethernet Problem
« Reply #3 on: February 09, 2023, 02:19:20 pm »
Thank you for answers.

First of all, I debug. and communication is lost but I didn't get any error message then I close MPU, D-Cache, I-Cache.
Now, i trying all day. I didn't encounter any breakouts so it seems to be fixed

I wonder why this is so?

My system is not multi-processor
 

Offline eutectique

  • Frequent Contributor
  • **
  • Posts: 392
  • Country: be
Re: STM32 Ethernet Problem
« Reply #4 on: February 09, 2023, 03:21:19 pm »
MPU? Is this a multi processor system?

Memory Protection Unit
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf