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

TWI manager interference with ANT

I am using the NRF52832 chip on a D52M M8 module, and SDK 15.2.

I have a number of sensors that I am communicating with over TWI using the TWI Manager on two separate channels.  The read transfers are scheduled on a timer running at a period of 240/32768.

Meanwhile I have an ANT broadcast master channel running at a period of 4096/32768.

Running ANTWare in scan mode it skips 1-2 messages exactly once every 15 ANT cycles (every 1.89s).  This is very consistent so I believe the ANT message is not being sent.  The ANT ovserver callback function is running when I would expect though so the message is queued, just not sent.

For testing I am sending the time in microseconds in a test ANT packet, and so i can compare the ANT data with logs i create on the unit, in which i also log the twi status.  The attached excel shows this data.  Hopefully clear what everything means.  

This proves that when the ANT event coincides with a TWI transfer (i.e. in the period where a TWI transaction has been scheduled, but the callback hasn't returned yet) I still get log messages from my ANT callback, but no data is received in ANTWare.  I therefore believe the message is just not getting sent.

For the TWI channels i am using pins 2,3,4,5

From my previous support request ("Use of TWI manager with ANT") I understand that it should be possible to send ANT messages whilst a TWI transfer is in progress.  

I have followed the design guidelines in the module spec sheet.

Debugging I have gone as far as I think I am able to as I cannot look inside the softdevice to see what is going on.  Are there any suggestions on how to debug further, and/or ideas on what I might be doing wrong - sdk_config.h options etc?  

Parents
  • Hello,

    There was no attachment in this case, maybe you can upload again so I can take a look.

    In general what you describe should not be a problem, do you have access to a PPK so you can take a look at the current consumption trace in real-time, thereby compare the radio spikes with the twi spikes, and see how they overlap. If you have access to a nRF52-DK you may try the same also using two TWI interfaces. How does the ripple on VDD look like here? Have you tried to add more decoupling on VDD? Doe you have a picture of your hardware setup? What pull-up resistors do you have on the TWI pins?

    Best regards,
    Kenneth

Reply
  • Hello,

    There was no attachment in this case, maybe you can upload again so I can take a look.

    In general what you describe should not be a problem, do you have access to a PPK so you can take a look at the current consumption trace in real-time, thereby compare the radio spikes with the twi spikes, and see how they overlap. If you have access to a nRF52-DK you may try the same also using two TWI interfaces. How does the ripple on VDD look like here? Have you tried to add more decoupling on VDD? Doe you have a picture of your hardware setup? What pull-up resistors do you have on the TWI pins?

    Best regards,
    Kenneth

Children
  • Hi Kenneth,

    Thanks for the quick response.  Sorry about the attachment.  Here it is below.

    I don't have the PPK, but could get one, they seem quite cheap.  So far I have just run the power through a 10 ohm resistor and measured voltage drop to get an idea of current consumption, and logged with a digital oscilloscope.  I could easily do that and send across if you think helpful?

    The hardware is all on our custom boards, so I can't easily change decoupling. 

    Setting up on a DK (which I have by the way) is possible, but a little time consuming, and I only have a couple of sensors I could use (instead of the 4 on my boards).  But if it comes to it I could set something up to try and replicate our custom board setup as best I can.

    I can't easily show you the hardware setup, but could send you a schematic if that helps.  Or if you just want any details of decoupling etc then I can happily send over.

    We have no pull-up resistors on our boards, and are just using the internal pull-ups on the chip.

    Many thanks

    Barney

    TWI-ANT_Interference.xlsx

  • My main worry here is that the serial transfer is causing some noise in ground or VDD, so make sure that there is no split in ground layer, but a common solid ground connection to all ground pins and have a large decoupling capacitor close to the module (e.g. 4.7uF). Using external pull-up resistors may be something to consider (at least for test), since this will likely reduce noise on chip (at least I would think so). Having a 10ohm resistor trace measurement would be useful for confirm the issue, but I assume you are by default testing without the serial resistor, since a 10ohm resistor will cause significant noise on VDD. Please share schematic of your "motherboard" that the module is placed if possible.

    Best regards,
    Kenneth

  • Hi Kenneth,

    I bought a PPK (as seemed like a useful thing to have anyway) and have logged 15 ANT cycles which are in teh attached image.  It is a little hard to make out, but you can see the ANT spike moving relative to the TWI spikes so they overlap at some point during the 15 cycle period.  

    I guess the presence of a spike suggests the ANT message is in fact being sent, but something else is preventing reception, like TWI induced noise?

    I would be happy to share the board schematic, but there are certain things that are proprietary and we would rather not make public.  Is there a way I can send to you privately?

    I have two boards connected toggether with a ribbon cable.  On one is a voltage regulator feeding the chip and sensors, and on the other is the D52M module.  The second image below shows the board design around the module, and I think I have a sufficient ground connection.  I have no decoupling capacitor near the module though.  I had assumed Garmin would have put one on the module itself.  But you say this may is necessary.  Would it be worth me checking with Garmin directly?

    Many thanks

  • Hi,

    I suggest next step is a test that you try the two suggestions:

    1. Add a large decoupling capacitor (e.g. 4.7uF) close to the module.

    2. Use external pull ups on TWI (possible on the other board in this case).

    bgarrood said:
    I guess the presence of a spike suggests the ANT message is in fact being sent, but something else is preventing reception, like TWI induced noise?

    I agree, the TWI likely impact the carrier or modulation here in such a way that the packet is no longer received on the receiver. I think part of the problem may be the LDO is placed on a different board. 

    bgarrood said:
    On one is a voltage regulator feeding the chip and sensors, and on the other is the D52M module.

    Not sure if I understood this, isn't the "chip" the same as D52M module?

    Best regards,
    Kenneth

  • Hi,


    Thank you for that.  Yes, poor wording by me, the LDO is on a different board to the D52M is all I am saying here.

    I have logged a support request with Garmin and so will wait to see what they say.  Based on that I will do some testing and report back.

    Thank you.

Related