2024-04-04 09:38 AM
Hi,
Can anyone point me in the direction of some more information about the custom timing under the I2C parameter settings?
Are we modifying a specific register? or something else? Do each of the 8 bits do something different?
2024-04-11 01:09 AM
The ADG715 is potentially a little fussy. My bit banging functions and careful applications of delays (having the SDA start slightly before and end slightly after the clock pulse) results in everything working fine the speed is terrible but completely non-critical in our application. By fine I mean that the ADG pulls the SDA line done for the ack.
It even works in our production generator (which is currently in a real Frankenstein state, some of it is still running at 5 volts and all of the stuff hanging off the STM32 is now 3.3v with level shifters everywhere, it's only intended as a proof of concept for the next generation generator)
2024-04-11 01:19 AM
I really wouldn't worry about it, what we have is satisfactory. It's just a shame that the I2C timing for the STM32 HAL is so opaque.
The STM32 HAL couldn't cope with the ADG715 being directly wired to the relevant pins (in combination with a breadboard for the pull-up resistors and test points) and a suitable surface mounting for the ADG715. But bit banging got it to work, I am inclined to use a different serial bus in the next version of the generator given how difficult we found this to debug (being constantly unsure of whether the problem was the master or slave/hardware or software) but it's been a good education.
2024-04-11 01:42 AM - edited 2024-04-11 01:42 AM
@MEde.1 wrote:The ADG715 is potentially a little fussy.
So have you contacted AD about that?
What timing difference(s) do you see between your working bit-bang code, and the non-working HAL code?
Does it work wit other microcontroller brands using their hardware I2C?
ST Application note AN2824, STM32F10xxx I2C optimized examples described controlling the I2C hardware manually - without HAL:
2024-04-11 01:48 AM
I haven't contacted AD simply because our application is a product on the market that works, the engineer who created it and the software to run it no longer works here, He used a bit-banging approach with the PIC18F so potentially there is weirdness in our setup.
Thank you for the application note, I hadn't found that, super helpful!
2024-04-11 11:35 AM - edited 2024-04-11 11:35 AM
Breadboard?
Post photo.
And post waveforms.
JW
2024-06-11 06:31 AM
Dear Pavel A.
Thanks to introduce my project.
This program intend to calcuate I2C timing-value for F0,F3,F7,H7,H5,G0,C0 and U0.
And very early stage,not guarantee accuracy.
But I believe to be little help for other people.