2021-10-21 06:42 AM
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.
2021-10-21 07:56 AM
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