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

TWI example twi_master_with_twis_slave

Hello,

I'm using the TWI example mentioned in the subject line and I'm trying to get the TWI signals out of my demo board (Rigado BMD-350 Evaluation board).

Am I right that in this example the signals don't come out of the hardware pins because it's a simulated EEEPROM? How can I change the example to bring out the signals, so I can measure these?

Thanks in advance for any help!!!

Kind regards

Sascha Schmidt

Parents
  • Hi Sascha,

     

    There are a couple of more examples for TWI usage. You have the "twi_master_using_nrf_twi_mngr" which uses the TWI manager, then you have the "twi_scanner" and "twi_sensor" which accesses the nrf_drv_twi driver directly.

    The GPIOs used for TWI can be altered in twi_init(), where the default is "ARDUINO_SCL_PIN" (GPIO 27) and "ARDUINO_SDA_PIN" (GPIO 26)

    Examples enable the internal pull up resistor (13 kOhm nominal), which restricts the maximum bus speed to 100 kHz. If you need 400 kHz, then stronger external pull up resistors are required (3.3 kOhm for instance).

    Kind regards,

    Håkon

  • Hi,

    I now debugged the code with j-link debugger. Before first transmission in the function 'twi_tx_start_transfer' is a call to nrf_twi_event_check(p_twi, NRF_TWI_EVENT_ERROR), which sets the ERRORSRC register to 0x02. Can you guess why that is?

    I'm using gcc compiler, if that helps in a way Slight smile

    Thanks for your support in advance!!

    Kind regards

    Sascha

Reply Children
No Data
Related