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

Timing Connection intervals - controlling when processor is waking from sleep

Hi, 

I am trying to measure my circuit sleep current while connected, through a high value resistor, the problem is while waking up each MIN_CONN_INTERVAL the processor wakes, the voltage drops and the processor resets, What I want to do is to time the waking of the processor, to control the resistance with which I measure to increase only for a few miliseconds BETWEEN the CONN events, is that possible?

I am working with nRF51822, s130, SDK12

Thanks!

Parents
  • Hi,

    I am not sure I understood the use case nor the exact question. Can you please elaborate?

    The SoftDevice configures the RTC to interrupt when it needs to wake up for any event, and the application does not have control or insight into this so I do not immediately see how you can reliably know beforehand.

  • Hi Einar

    Thanks for the response,

    I will try to explain again - I want to measure the processor sleep current, and to do so by momentarily passing the return current through a large resistor, i.e. 500R, I can not keep this large resistance in the return path when the processor wakes up of course, so I need to be able to control or to know when the waking up is about to happen. I want to know when will the processor wake up and consume extra current  - or - to be able to stop the processor for invoking such events for a significant period of time (without disconnection), for a few hundreds of milisec for example, starting in a time which I can chose or at least know be updated in real-time about.

    the application does not have control or insight into this

    If not to know, as I said, can the application stop those connection messaging for a limited period of time? without causing a disconnection ofcourse

    Thanks!

  • Is this in a lab setting or in the field? If in a lab setting you would typically use a small resistor (say 10 ohm) in series with the power supply, and measure the voltage drop over that.

    If you can control when this happens from the nRF, when you can perhaps use the radio timeslot API of the SoftDevice. This will give you a period where you are guaranteed not to be interrupted. During that time you have full control, and could put the CPU to sleep, and typically use an RTC to wake it up after some time.

  • Is this in a lab setting or in the field?

    This is normal settings, I don't want to have a different firmware for production and testing, just because of this issue.

    typically use a small resistor

    regardless of which resistor I use, I still need to know when to sample, and I wish to guarantee that processor sleeps while I sample

    perhaps use the radio timeslot API of the SoftDevice.

    OK, I will consider doing that, need to see how much extra code this will require, as I said, I don't want to have a separate firmware for production and testing, and looking at the examples it seems heavier that I intended. 

    Thanks!

  • Hi,

    Ron said:
    This is normal settings, I don't want to have a different firmware for production and testing, just because of this issue.

    I was not clear in my question. I wondered if this sleep current measurement is something you want to do only in the lab (during development, testing, etc.) or if you want to measure this in the end product in the field. 

    Ron said:
    regardless of which resistor I use, I still need to know when to sample, and I wish to guarantee that processor sleeps while I sample

    I am guessing this means that you sample from the nRF then? I do not have a full understanding of what and how you do things, so I must have misunderstood here. (My comment was related to how you typically measure current in the lab, where you can use an external instrument/volt meter to measure voltage drop over a resistor in series with the supply.

    Ron said:
    OK, I will consider doing that, need to see how much extra code this will require, as I said, I don't want to have a separate firmware for production and testing, and looking at the examples it seems heavier that I intended. 

    If you want to know from SW when the radio is active and you are using a SoftDevice then the radio timeslot API is the only good alternative.

    (If this is in a lab setting where you just want to measure the idle current consumption, then you typically easily see in the current pattern if the radio is active or not, so you typically just set a cursor on the instrument at the star and end of the idle period and average from that. That may not be what you want to do though.)

Reply
  • Hi,

    Ron said:
    This is normal settings, I don't want to have a different firmware for production and testing, just because of this issue.

    I was not clear in my question. I wondered if this sleep current measurement is something you want to do only in the lab (during development, testing, etc.) or if you want to measure this in the end product in the field. 

    Ron said:
    regardless of which resistor I use, I still need to know when to sample, and I wish to guarantee that processor sleeps while I sample

    I am guessing this means that you sample from the nRF then? I do not have a full understanding of what and how you do things, so I must have misunderstood here. (My comment was related to how you typically measure current in the lab, where you can use an external instrument/volt meter to measure voltage drop over a resistor in series with the supply.

    Ron said:
    OK, I will consider doing that, need to see how much extra code this will require, as I said, I don't want to have a separate firmware for production and testing, and looking at the examples it seems heavier that I intended. 

    If you want to know from SW when the radio is active and you are using a SoftDevice then the radio timeslot API is the only good alternative.

    (If this is in a lab setting where you just want to measure the idle current consumption, then you typically easily see in the current pattern if the radio is active or not, so you typically just set a cursor on the instrument at the star and end of the idle period and average from that. That may not be what you want to do though.)

Children
No Data
Related