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 again,

    sorry my former description of the error was not completly correct:

    the function nrf_twi_task_trigger(p_twi, NRF_TWI_TASK_STARTTX); set the ERRORSRC register in the controller in the function 'twi_tx_start_transfer', and than afterwards the 'twi_transfer' function abords the transmission.

    As far as I understood the description in the info center the function nrf_twi_task_trigger should set the NRF_TWI_TASK_STARTTX bit in the hardware register? Is that correct?

    If yes how can I correct that?

    Kind regards

    Sascha

Reply
  • Hi again,

    sorry my former description of the error was not completly correct:

    the function nrf_twi_task_trigger(p_twi, NRF_TWI_TASK_STARTTX); set the ERRORSRC register in the controller in the function 'twi_tx_start_transfer', and than afterwards the 'twi_transfer' function abords the transmission.

    As far as I understood the description in the info center the function nrf_twi_task_trigger should set the NRF_TWI_TASK_STARTTX bit in the hardware register? Is that correct?

    If yes how can I correct that?

    Kind regards

    Sascha

Children
Related