Skip to main content
JRS
Associate III
October 21, 2021
Question

stm32h7xx_hal_eth.c V1.9.0 interrupt handling in polling mode

  • October 21, 2021
  • 1 reply
  • 577 views

Even in case of not using interrupts the Function ETH_Prepare_Tx_Descriptors() line 2993 of stm32h7xx_hal_eth.c does globally enable interrupts before it exits.

I would suggest using a conditional interrupt handling there (check if enabled e.g. if needed ta all). Since it is within a HAL Driver any change there will be overwritten with the next code-generation.

The interrupt handling was not needed in previous version e.g. v1.7.0

Since it only protects one line of code (which could be shortened to one register access), I would really like to know the reason for it.

How does the BuffersInUse work anyway? I only see it in that one place.

This topic has been closed for replies.

1 reply

TDK
October 21, 2021

It appears to be code that was lazily introduced in the latest library version in order to make access to BuffersInUse atomic.

However, I can't see anywhere else where BuffersInUse is modified or even read.

https://github.com/STMicroelectronics/STM32CubeH7/search?q=BuffersInUse

"If you feel a post has answered your question, please click ""Accept as Solution""."