Update STM32H5 HAL driver, fix some DMA bugs #344
Merged
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.
Summary of changes
This MR fixes some test failures that we have been seeing with STM32H5 processors on the spi-basic DMA abort test. Unfortunately, it seems like this isn't a scenario that STMicro tests when releasing their HAL, because I found two different issues with it.
Issue number 1 was that, in one of the DMA callbacks, it was concluding that the channel didn't abort successfully because a certain register flag (
DMA_CCR_EN
) was still set after aborting the channel.I'm not entirely 100% sure why that flag was still set, but it seems like checking it was in error, because in the latest release of the HAL, they removed the code that does the check!
Unfortunately, updating the HAL introduced a different issue, where aborting the transfer would fail to correctly abort the Rx DMA channel. After some time going back and forth, I was finally able to work out what was going on. I filed a bug with STMicro here.
This MR updates Mbed to use the latest release (commit 7e8c7d8e) of the STM32H5 HAL driver, plus the patch mentioned in the issue above.
Impact of changes
Migration actions required
Documentation
None
Pull request type
Test results
New test results for STM32H5 pushed here: https://mbed-ce.github.io/mbed-ce-test-tools/tests/index.html