0

TWI Stuck Bus Recovery

dbeckwith gravatar image

asked 2017-04-21 01:56:38 +0200

What is the best method for attempting to recover from a stuck TWI bus after init?

I am currently initializing the TWI instance with .clear_bus_init=true but this only happens once during the init.

For example in the past we have had some issues with EMI inducing signals on the TWI bus which caused some devices to hold the bus in a read operation. In the past we used a 'General Call Reset' after a specific number of read failures.

So again I ask my question What is the best method for attempting to recover from a stuck TWI bus after init? using the SDK.

Thanks, Darren

edit retag flag offensive close delete report spam

1 answer

Sort by » oldest newest most voted
1
bjorn-spockeli gravatar image

answered 2017-04-21 13:02:27 +0200

updated 2017-04-21 13:03:15 +0200

Hi Darren,

I discussed this with the developers and their recommendation was to reinitialize the TWI driver.

However, there is an internal twi_clear_busfunction in nrf_drv_twi.c that you could expose and use, but I would recommend the first solution, i.e. reinitialization of the driver.

Best regards

Bjørn

edit flag offensive delete publish link more

Comments

Bjorn,

Thanks for talking with the developers on this. I had come to the same conclusion but I wanted to make sure that I wasn't missing something.

As always the support at Nordic is awesome!

Thanks, Darren

Darren Beckwith ( 2017-04-21 18:52:48 +0200 )editconvert to answer

No problem and thanks :)

Bjørn Spockeli ( 2017-04-24 08:10:50 +0200 )editconvert to answer

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer. Do not ask a new question or reply to an answer here.

[hide preview]

User menu

    or sign up

Recent questions

Question Tools

1 follower

Stats

Asked: 2017-04-21 01:56:38 +0200

Seen: 51 times

Last updated: Apr 21