-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
arch/arm/stm32/: Fix I2C to support STM32G4 devices. #15420
Conversation
[Experimental Bot, please feedback here] Fill In The Commit Message: This PR contains a Commit with an Empty Commit Message. Please fill in the Commit Message with the PR Summary. This PR description does not fully meet the NuttX requirements. Here's a breakdown of why and how to improve it: Missing/Insufficient Information:
Recommendations for Improvement:
By addressing these points, you will significantly improve the quality of your PR and increase its chances of being accepted. A clear, well-documented PR makes the reviewer's job much easier and demonstrates your understanding of the codebase and the impact of your changes. |
f812b62
to
128a492
Compare
I can't find the reason CI is failling on (Build / Linux (arm-12) (pull_request)). |
@daniel-p-carvalho please rebase to the latest master. CI should be fixed with ae26129 |
e29f3c3
to
cbe694d
Compare
I did the rebase twice but the CI error persist. |
now I see there are other problems. Unfortunately our CI is not very useful after we had to severely limit its resources and it can't catch most error before merge PR :( |
@daniel-p-carvalho please try rebase again. The current CI error should be fixed with 4e563e3 |
no, CI is still broken for stm32f429i-disco/systemview ... @hujun260 hi, could you look at this this CI failure: https://github.com/apache/nuttx/actions/runs/12651153856/job/35251277261?pr=15420#step:7:526 |
cbe694d
to
5fa29a2
Compare
fix here: #15441. but let's merge this simple patch. |
ok |
Note: Please adhere to Contributing Guidelines.
Summary
According to the documentation of the file arch/arm/src/stm32/stm32_i2c_v2.c, the driver supports, as a clock source, only STM32_HSI_FREQUENCY = 16 MHz. In fact, the function stm32_i2c_setclock adjusts the STM32_I2C1_TIMINGR register considering fI2CCLK at 16 MHz. However, the function stm32_i2cbus_initialize returns NULL if STM32_HSI_FREQUENCY != 8000000. Thus, in my understanding, the function stm32_i2c_setclock is not adjusting the bus frequency correctly. Furthermore, no clock source verification is performed.
This patch modifies the I2C driver to allow devices in the STM32G4 family to function correctly. The driver's behavior has not been modified for devices in the STM32_STM32F30XX, STM32_STM32F33XX, and STM32_STM32F37XX families, although I believe the driver is not functioning properly.
Impact
No impact is expected
Testing
This changes was tested on STM32G474.