kywwilson11 opened a new pull request, #14769:
URL: https://github.com/apache/nuttx/pull/14769

   ## Summary
   
   Added I2C driver for the STM32H5. This driver uses the STM32H7 I2C driver as 
a base. The primary difference is setclock dynamically sets the I2C TIMINGR 
register instead of using hard coded values like the H7. This allows the I2C 
peripherals to use any of the input clocks and set to any speed 0 Hz to 1 MHz. 
Additionally, Kconfig options were made available to set the Digital Noise 
Filter (DNF), Analog Noise Filter, I2C Clock source (i2c_ker_ck), as well as 
set i2c rise/fall times that are crucial to timing. Care must be taken when 
setting the clock source and filters, as not all settings are compatible with 
all i2c clock frequencies.
   
   ## Impact
   
   This change will only impact the STM32H5 family. 
   
   ## Testing
   
   The setting of I2C TIMINGR was tested with numerous input clocks, filter 
settings, and rise/fall times. All these options are configurable in 
menuconfig. When rise/fall times are not provided, minimum values are assumed 
which will result in slower than expected i2c frequencies, but that is better 
than faster which could potentially violate i2c specs. I2C timing was confirmed 
using an oscilloscope and through monitoring of the TIMINGR register using a 
debugger. 
   
   After testing of TIMINGR was complete, i2c tool was used to communicate with 
a ano rotary device. I was able to detect, read, and write successfully with 
this rotary device. Again, proper operation was confirmed with an oscilloscope 
and with i2c tool. 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to