(DAVE 4) XMC 2Go - I2C APP - Requesting data from sensor

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
lock attach
Attachments are accessible only for community members.
User13817
Level 3
Level 3
Hello guys,

I'm trying to get information from a Infineon magnetic sensor using a XMC 2Go and DAVE 4.
The I2C Transmitt function is working (reggarding the bug mentioned at the topic: https://www.infineonforums.com/threads/5379-XMC-2Go) and now I'm trying to find a way to use the Receive function because it's not exactly as I need.
To receive data from this specific sensor (also a Infineon sensor), I should send the sensor address, desired register address and then the master is ready to receive data. I can do it using an Arduino by a bit bang i2C communication as shown in the picture:
2815.attach

When I try to receive data using DAVE 4 and XMC 2Go, I can't send the second information (desired register address) and then I start receiving data since the sensor address is sent, as shown in the picture:
2816.attach

I searched for a function to do that and tried to combine transmitt and receive functions but I'm not having success on it. The main code is attached.

Does anybody have any idea on how can I do it?
0 Likes
0 Replies