feat(stm32h7): poll the LAN8740A link state and fix SDRAM2 heap overlap - #392
Open
3181619934 wants to merge 1 commit into
Open
3181619934 wants to merge 1 commit into
3181619934 wants to merge 1 commit into
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.