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

S140 + TWI working together - problems

hi Forum.
I'm working on a project with nrf52840 + S140 + TWI (SDK v16). Got all working separatly on my custom board, i.e. softdevice alone works fine and TWI also works with different SDK examples (also I can adapt them to my needs...). The problem is when I join them together...TWI doesn't work properly any more.

Example: I can get Scanner example working before starting softdevice, but if I insert any "nrf_drv_twi_tx" or "nrf_drv_twi_rx" I get stuked  on "while (m_xfer_done == false)"; it never jumps to twi_handler, even after confirming (with I2C signal analyser) that the command is sent to my I2C device . I already loose several days trying to fix this, but can't get it work.

Also, can you advice correct way to get TWI work with S140? from what I've been here in forum it's the TWI HW way, correct? but I got somehow confused with the SDK v16 examples.

Thanks to all for reading.

Parents Reply
  • thanks Torbjørn.
    I've been reading the page you sent me, and related links but still haven't figure out this iussue yet.
    my sdk_config.h has all TWI...IRW_PRIORITY set to 6

    in this case, which priority level should be TWI on? 2/3 or 5/6/7


    also I'm still confused on different TWI examples (SDK v16) - which one is the example for HW TWI? twi_sensor/twi_scanner/twi_master_using_nrf_twi_mngr/twi_master_with_twis_slave?

    best regards.

Children
Related