Skip to content

feat(stm32h7): poll the LAN8740A link state and fix SDRAM2 heap overlap - #392

Open
3181619934 wants to merge 1 commit into
open-vela:dev-ai-contest-2026from
3181619934:contest2026-008-ethernet-phy-poll
Open

3181619934 wants to merge 1 commit into
open-vela:dev-ai-contest-2026from
3181619934:contest2026-008-ethernet-phy-poll

Conversation

@3181619934

Copy link
Copy Markdown

No description provided.

The STM32H750B-DK has no PHY interrupt wired to the MCU, so the driver
never published carrier state and a cable plugged in after boot was never
detected.  Add a BOARD_ETH_PHY_POLL option that samples the LAN8740A
BMSR from LPWORK every 500 ms, debounces two matching samples before
publishing the state, and reports an MDIO failure only once.

Also stop registering SDRAM bank 2 as heap.  The LTDC framebuffers live
at the start of that bank (0xd0000000), so arm_addregion() put the
allocator's own metadata at the framebuffer addresses: a display refresh
corrupted the heap, and any traversal of it (mallinfo(), and therefore
free/mb) tripped the consistency check in mm_foreach().  Leaving
BOARD_SDRAM2_SIZE undefined keeps the bank for the framebuffer alone;
DTCM, SRAM1-3, SRAM4 and AXI SRAM (~940 KB) remain as heap.

The board init scripts mount procfs/tmpfs/devfs and back /data with a
RAM disk, which is where the agent keeps its configuration and session
state until a persistent filesystem is available.

Signed-off-by: 3181619934 <3181619938@qq.com>
@3181619934
3181619934 requested review from a team as code owners September 19, 2026 11:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant