This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

TWI Interface Problem using TLV493 magnetic sensor

Hi,

I work with nRF52832 module. i want to interface two i2c functions.

1. EEPROM - SCL - P0.06 SDA - P0.07 -> i check with this separately its working.

2. TLV493D - SCL - P0.29 SDA - P0.30 -> Now ,i want to try this.

i have tested with TWI Scanner Example and i got below response. Device address is correct.

<info> app: TWI scanner started.
<info> app: TWI device detected at address 0x5E.

After that i can't get the actual data. Also, i don't know the continuous read function.

Give related examples for this.

Regards

Senthilkumar

Parents
  • Hello Senthilkumar,

    2. TLV493D - SCL - P0.29 SDA - P0.30 -> Now ,i want to try this.

    Please check the Pin Assignment before assigning pins to your peripherals. As you can see, pin 30 is used for the Antenna.
    When it comes to using the pins on your nRF-52 DK I recommend taking a look a the Connector Interface documentation. 

    After that i can't get the actual data. Also, i don't know the continuous read function.

    Give related examples for this.



    The TWI Scanner will only scan for devices, it will not perform any read / write operations.

    For a general example on how you can interface TWI Sensors, you should see the TWI Sensor example. You might also be interested in using the TWI Sensor library directly.

    I do not have such an example for the TLV493 sensor specifically at the ready, but I am sure a driver for the sensors TWI interface already exists publicly available.

    I do not know if this is the sensor module you have, but a brief search on github yielded this repository, which might be helpful to have a look at.
    If this is not the sensor module you currently have, then I would suggest finding or implementing a driver based on the TWI interface described in its datasheet.

    Please let me know if anything still should be unclear,

    Best regards,
    Karl

  • Hi,

    Sorry, i m not using the Development kit. 

    Please check the Pin Assignment before assigning pins to your peripherals. As you can see, pin 30 is used for the Antenna.
    When it comes to using the pins on your nRF-52 DK I recommend taking a look a the Connector Interface documentation. 

    The pin out is not an issue.  I used P0.30, but uou mentioned that module pin number.

    I have tested with another board with same functionalities its working. Some of the only its hanged.

    in that new board i have soldered only i2c device.

    This is the value i'm getting now.

    <info> app: TEMP:23.10
    <info> app: X:18.62
    <info> app: Y:-13.72
    <info> app: Z:-9.80

    Also, i try with old board (two i2c device) some times its hanged and some times shows Fatal Error.

    Kindly give solution for, multiple i2c activating and Fatal error.

    Regards,

    Senthilkumar

Reply
  • Hi,

    Sorry, i m not using the Development kit. 

    Please check the Pin Assignment before assigning pins to your peripherals. As you can see, pin 30 is used for the Antenna.
    When it comes to using the pins on your nRF-52 DK I recommend taking a look a the Connector Interface documentation. 

    The pin out is not an issue.  I used P0.30, but uou mentioned that module pin number.

    I have tested with another board with same functionalities its working. Some of the only its hanged.

    in that new board i have soldered only i2c device.

    This is the value i'm getting now.

    <info> app: TEMP:23.10
    <info> app: X:18.62
    <info> app: Y:-13.72
    <info> app: Z:-9.80

    Also, i try with old board (two i2c device) some times its hanged and some times shows Fatal Error.

    Kindly give solution for, multiple i2c activating and Fatal error.

    Regards,

    Senthilkumar

Children
  • Hello Senthilkumar,

    Ask313 said:
    Sorry, i m not using the Development kit. 

    I understand. Which module are you working with?

    Ask313 said:
    The pin out is not an issue.  I used P0.30, but uou mentioned that module pin number.

    My mistake, I seem to have glanced too quickly at your description, sorry.
    Using those pins is indeed fine for TWI.

    Ask313 said:

    in that new board i have soldered only i2c device.

    This is the value i'm getting now.

    <info> app: TEMP:23.10
    <info> app: X:18.62
    <info> app: Y:-13.72
    <info> app: Z:-9.80

    Also, i try with old board (two i2c device) some times its hanged and some times shows Fatal Error.

    Do I understand you correctly that you have tested your code on a board with only the TLV493D sensor device connected via TWI, and this is working as expected - but when you run the same code on your board with two TWI devices, you the application hangs or crashes with Fatal Error?
    Do you have access to a development kit for testing of the code, or an external debugger? - This would make it a lot easier to pinpoint where the application fails.
    Do you have any notion of where in the code the application the error is generated, or where it hangs?

    Multiple TWI devices is not a problem, since you are addressing them differently. However, could it be that your device gets stuck in a waiting loop(waiting for a transfer to finish), that the sensor does not acknowledge or respond to? In this case, you could add a timer that will start of each transfer, and abort the transfer if it times out.

    Best regards,
    Karl

  • Hi,

    Thanks for your reply.

    now i'm working with "EByte"  e73-2g4m04s1b.

    i just follows these procedure then will update the status.

    Thanks & Regards,

    Senthilkumar

  • Hello,

    Ask313 said:
    Thanks for your reply.

    No problem at all, I am happy to help!

    Ask313 said:
    i just follows these procedure then will update the status.

    Great. I look forward to hearing your update on this, and to resolve this issue together.

    Best regards,
    Karl

Related