cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F769BIT custom board - Ethernet issue

Sayan
Associate II

Hi Team,

I made a custom board using STM32F769BIT microcontroller using with the DP83867 PHY in MII mode, but I am not able to ping it. What could be the possible reasons? 

I did Memory configurations for TxDecrip, RxDecrip, LwipHeap like this.

.lwip_sec (NOLOAD) :

. = ABSOLUTE(0x2007C000);

*(.RxDecripSection)

. = ABSOLUTE(0x2007C0A0);

*(.TxDecripSection)

. = ABSOLUTE(0x2007C140);

*(.LwIPHeap)

also my SRAM configuration is like this_

MEMORY

RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 496K

SRAM2 (xrw) : ORIGIN = 0x2007C000, LENGTH = 16K

FLASH (rx) : ORIGIN = 0x8000000, LENGTH = 2048K

I am using the 10pin STM32 debugger, but I am not able to see the stack usage there, when I press the debug button.

Is it due to code or due to the debugger? For this should I need the 20pin debugger?

 

Thanks,

Sayan Das

 

17 REPLIES 17

The board is not defective. All other functions are got tested, sir.


@Sayan wrote:

The board is not defective. .


How have you proved that?

 


@Sayan wrote:

All other functions are got tested.


Which doesn't mean that there's no issues with this function!

It's not uncommon for most of a board to work fine - and there to be an issue with just one part.

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.

@Sayan :

I am VERY happy to see that board is working perfect and code is perfect as well !

That means, all problems are solved; please mark as solved and the topics is closed.

Good luck.

Mike


@mbarg.1 wrote:

all problems are solved; please mark as solved and the topics is closed.


You do that - instructions here.

It would be helpful if you would describe what was actually wrong, and how you found it, and what was the fix.

 

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.
STackPointer64
ST Employee

Hello @Sayan, and welcome to the community!

Could you please answer the following questions to help me better understand the issue?

  • Are you sure that the static IP you assigned is not already in use elsewhere?
  • Did you correctly import your PHY drivers and modify the ethernetif.c source file to enable seamless communication with the PHY, including reading/writing registers and resetting the PHY when necessary?
  • Have you tried stepping through your code to check if the application hangs or returns any errors during execution?

The more details you provide about your debugging steps and investigations, the better I can assist you in resolving the issue.

Best regards,

To improve visibility of answered topics, please click 'Accept as Solution' on the reply that resolved your issue or answered your question.
Sayan
Associate II
  • Dear Sir, we tested with multiple static IPs, to confirm that it is not IP matching issue.
  • The ethernet.c is mostly generated automatically along with the configuration in the stmcube. I only used that file and the changes I did in memory configuration, sir, which I mentioned above.
  • How to do stepping in the code?

@Sayan wrote:
  • How to do stepping in the code?

See the documentation for whatever IDE you're using.

For STM32CubeIDE:

https://www.st.com/resource/en/user_manual/um2609-stm32cubeide-user-guide-stmicroelectronics.pdf

https://wiki.st.com/stm32mcu/wiki/Category:STM32CubeIDE#Videos_related_to_STM32CubeIDE - links to videos & tutorials.

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.
STackPointer64
ST Employee

Hello @Sayan,
Have you verified that the PHY is properly clocked? The PHY is sensitive to clock settings.

I suggest placing a breakpoint at line 307 in the ethernetif.c file and stepping through the code in debug mode to check which speed and duplex mode are selected. This will help rule out issues related to improper PHY clocking and initialization.

 

switch (PHYLinkState)

Also, ensure your MPU configuration prevents memory corruption, something similar to the figure below, and make the necessary adjustments to the linker file.

+----------------------+-------------------------------------------------+-------+
| 0x00000000 | Strongly Ordered Region (Not defined regions) | 4 GB |
| | Access Permission: No Access | |
| | Bufferable: No | |
| | Cacheable: No | |
| | Shareable: Yes | |
| | TEX Level: 0 | |
| | SubRegion Disable: 0x87 | |
| | Instruction Access: Disabled | |
+----------------------+-------------------------------------------------+-------+
| 0x20078000 | Ethernet Buffers | 16 KB |
| | Access Permission: Full Access | |
| | Bufferable: No | |
| | Cacheable: No | |
| | Shareable: No | |
| | TEX Level: 1 | |
| | SubRegion Disable: 0x00 | |
| | Instruction Access: Enabled | |
+----------------------+-------------------------------------------------+-------+
| 0x2007C000 | Ethernet Descriptors | 1 KB |
| | Access Permission: Full Access | |
| | Bufferable: Yes | |
| | Cacheable: No | |
| | Shareable: Yes | |
| | TEX Level: 0 | |
| | SubRegion Disable: 0x00 | |
| | Instruction Access: Enabled | |
+----------------------+-------------------------------------------------+-------+

Stepping through the MX_LWIP_INIT() function will help confirm whether LwIP initializes correctly or if the program halts during initialization. Please make sure you 

Please make sure to test the steps I mentioned and provide me with updates so we can proceed further.

Best regards,

To improve visibility of answered topics, please click 'Accept as Solution' on the reply that resolved your issue or answered your question.