Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RBU error because of bug in stm32h7xx_hal_eth.c #307

Open
nrg83 opened this issue Jan 23, 2025 · 1 comment
Open

RBU error because of bug in stm32h7xx_hal_eth.c #307

nrg83 opened this issue Jan 23, 2025 · 1 comment
Assignees
Labels
bug Something isn't working eth Ethernet hal HAL-LL driver-related issue or pull-request.

Comments

@nrg83
Copy link

nrg83 commented Jan 23, 2025

The problem is this line of code in stm32h7xx_hal_eth.c i think.
tailidx = (descidx + 1U) % ETH_RX_DESC_CNT;

The descriptor list is organized as a ring buffer, e.g. desc[0], desc[1], desc[2], desc[3], desc[4], desc[5]

The tail pointer must set "behind" the current descriptor, not in front of it. E.g. current descriptor index = 2, tail pointer must be set to 1, and not 3!

RBU occurs when ETH_DMACRXDTPR = ETH_DMACCARXDR

You can try this fix maybe.

Image

You can also check this comment. Are you sure you save the index here?

Image

@ALABSTM ALABSTM added bug Something isn't working hal HAL-LL driver-related issue or pull-request. eth Ethernet labels Jan 24, 2025
@ASEHSTM
Copy link

ASEHSTM commented Jan 27, 2025

Hello @nrg83,

Thank you for your report. This bug has been fixed in commit ceda3ce by correcting the calculation of the tail pointer so that it points to the last updated descriptor.

With Regards,

@ASEHSTM ASEHSTM moved this from To do to Analyzed in stm32cube-mcu-fw-dashboard Jan 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working eth Ethernet hal HAL-LL driver-related issue or pull-request.
Projects
Development

No branches or pull requests

3 participants