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

Use of twi_manager with Ant

I am using the TWI manager to schedule transactions with a number of sensors, over two seprate twi instances, and then sending that data over Ant.

The twi manager scheduling is done on timer which fires every 10ms,  We are sending data over Ant at 80Hz.

The problem is that at this rate of data acquisition I am getting a large drop-out rate, of around 10%, i.e. my receiver only receives 90% of the transmitted packets.  If I remove the twi scheduling then this goes down to less than 2% drop-out rate.

Therefore I think the twi manager is somehow interfering with the ant events.  I have tried different settings of the .intterupt_priority property of the nrf_drv_twi_config_t object I am using but without any change in dropout rate.

Can anyone tell me how to avoid interference between the twi manager and ant?

Is there another way that I should be going about this?

Parents Reply
  • Hi Kenneth,

    No, I am not (as far as I am aware) disabling interrupts.  

    Does the TWI read take place entirely in hardware when using the twi manager schedule method?  Is there any way it can block if reading is happening at the same time as ant radio?

    Range makes no difference - whether it is right next to the receiver or 1m away I get the same drop rate.

    Many thanks

Children
Related