Hi,
In my solution, I need IIC communication. Here is my circuit:
And I add 10Ω resistance for protecting circuit. But When I run software, IIC I/O always go wrong. It's like the I/O port totally doesn't work.
I know IIC port work in open-drain mode. But I don't know using 10Ω protection resistance.is ok or not.
And when I use oscillograph to detect signal, I/O port always break down, unless I detect through 1K protection resistance.
In communication, I find one possible problem that is START condition.
If I neet to read data from sensor, I should re-start without stop signal. And I don't know IIC API founction could achieve this operation or not.
By the way, I have communicated with sensor using stm32 in gpio imitation method. And it's a little difficult to do the same way in nhs3152, because I couldn't set timer precise and steady.
Until now, void I2C0_IRQHandler(void) function still doesn't work.
Thanks for your reply.
Sincerely,
Li.
Well, after I change pull-up resistance from 10MΩ to 4.7KΩ, IIC driver works.
Congratulation to myself.
Li