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

nRF52832 I2C Testing & How to interface two nRF52 (Slaves) through I2C?

Hi,

I'm using nRF5_SDK_17.0.2_d674dde\examples\peripheral\twi_master_with_twis_slave\pca10040\blank\ses to check I2C as per infocenter TWI testing document.

I have done PuTTy settings as well, as stated in sheet & shorted P0.3 & P0.4 i.e. TWI_SCL_M & TWI_SDA_M. 

Compiled & flashed programmed & checking on terminal not getting welcome message.

Can somebody guide me here?

What's wrong I'm doing.TWI_Nordic Semiconductor Infocenter.pdf

/cfs-file/__key/communityserver-discussions-components-files/4/TWI_5F00_Nordic-Semiconductor-Infocenter.pdf

Also, one more thing is. After this testing I want to interface two board of nRF52 with I2C, how can I do that one?

Waiting for reply.

Regards,

Megha Choudhari

Parents
  • Hello Megha Choudhari,

    I'm using nRF5_SDK_17.0.2_d674dde\examples\peripheral\twi_master_with_twis_slave\pca10040\blank\ses to check I2C as per infocenter TWI testing document.

    Could you confirm for me whether you have many any modifications at all to the example project? Could you also confirm for me whether you are using an nRF52 DK or a custom board?

    Compiled & flashed programmed & checking on terminal not getting welcome message.

    Are you seeing anything at all on the Serial monitor? How is your device connected to your PC?

    Also, one more thing is. After this testing I want to interface two board of nRF52 with I2C, how can I do that one?

    If one of the boards are configured as a TWI master, and the other is configured as a TWI slave, then the TWI Master can initiate transfers between the two, like shown in the example.

    Best regards,
    Karl

  • Hi,

    Please find below my replies

    Q. Could you confirm for me whether you have many any modifications at all to the example project? Could you also confirm for me whether you are using an nRF52 DK or a custom board?

    Ans >> I have not done any modification in example. I'm using nRF52832 DK board. As per mentioned in nordic infocenter (infocenter.nordicsemi.com/index.jsp config.h for TWI_SCL & TWI_SDA, I have shorted P0.03 & P0.04

    Q. Are you seeing anything at all on the Serial monitor? How is your device connected to your PC?

    Ans >> I have checked TWI_Scanner & Sensor example in that case I can view welcome messages on PuTTY. But in this case I have not seen anything. I have connected the DK board to PC via USB.

    If one of the boards are configured as a TWI master, and the other is configured as a TWI slave, then the TWI Master can initiate transfers between the two, like shown in the example.

    Please find above reference scenario: Modbus Module is my master & BLE is slaves.

    Regards,

    Megha Choudhari

Reply
  • Hi,

    Please find below my replies

    Q. Could you confirm for me whether you have many any modifications at all to the example project? Could you also confirm for me whether you are using an nRF52 DK or a custom board?

    Ans >> I have not done any modification in example. I'm using nRF52832 DK board. As per mentioned in nordic infocenter (infocenter.nordicsemi.com/index.jsp config.h for TWI_SCL & TWI_SDA, I have shorted P0.03 & P0.04

    Q. Are you seeing anything at all on the Serial monitor? How is your device connected to your PC?

    Ans >> I have checked TWI_Scanner & Sensor example in that case I can view welcome messages on PuTTY. But in this case I have not seen anything. I have connected the DK board to PC via USB.

    If one of the boards are configured as a TWI master, and the other is configured as a TWI slave, then the TWI Master can initiate transfers between the two, like shown in the example.

    Please find above reference scenario: Modbus Module is my master & BLE is slaves.

    Regards,

    Megha Choudhari

Children
  • Hello again Megha Choudhari,

    MeghaC said:
    I have not done any modification in example. I'm using nRF52832 DK board. As per mentioned in nordic infocenter (infocenter.nordicsemi.com/index.jsp config.h for TWI_SCL & TWI_SDA, I have shorted P0.03 & P0.04

    I have tested gone through the same test for the example here on my end (without the shorting of TWI_SCL and _SDA), and I am always seeing the welcome message in my serial terminal. It is strange that you are not seeing it for this particular example only. Could you download a new instance of the SDK, and try again with the example from it? This would rule out the possibility that something has been changed inadvertently.
    Please do this, and let me know if it resolves the issue.

    MeghaC said:
    I have checked TWI_Scanner & Sensor example in that case I can view welcome messages on PuTTY. But in this case I have not seen anything. I have connected the DK board to PC via USB.

    Thank you for confirming this.

    MeghaC said:
    Please find above reference scenario: Modbus Module is my master & BLE is slaves.

    Thank you for elaborating on this, and providing the diagram - I now understand that you would like the nRF to be the TWI Slave, and that the Modbus should be the TWI master.
    That mean that you should look in the eeprom_simulator.c file of the example, to see how you may initialize and use the TWIS driver.

    Best regards,
    Karl

  • Hi,

    As per your suggestion get new instance of SDK & tried. Thankfully issue resolved.

    Please find below screenshot for your reference.

    Also, thanks for the direction given to develop TWIS.

    Regards,

    Megha Choudhari

Related