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

LPCOMP priority

Hi guys,

I'm using following setup NRF51822, SD130, SDK 12.3.0. I control one transistor with PWM output via timer 1. Before enabling PWM I start 8bit ADC task to measure voltage on AN1 and I also start LPCOMP which triggers interrupt when AN1 cross the VDD/8

I read SD specs and see that during advertising and established connection in peripheral mode we have approx. 2% of dead time for triggering LPCOMP interrupt.

BLE connection and all SoftDevice related stuff is not important in case of LPCOMP interrupt. Minimal latency of triggering LPCOMP interrupt is the most important because it protects transistor from overcurrent, therefore I’m wondering two things… What ADC sample rate can I expect in described configuration and how to get the highest priority for LPCOMP interrupt – higher than SoftDevice.

Thank you for info.

Best regards,
Matej

Parents
  • You mentioned that you are using ADC simultaneously as the LPCOMP, but this is not possible since it uses the same analog inputs as the ADC module and only one of the modules can be enabled at the same time. I assume you are only using the LPCOMP, since that will cover the needs in order to achieve mentioned functionality.

    What ADC sample rate can I expect in described configuration?

    By this, I assume you mean how fast it takes from a crossing happens until an event is generated. According to the Product Specification on page 66, it says that the time from a VIN crossing to ANADETECT generated is 15µs.

    How to get the highest priority for LPCOMP interrupt – higher than SoftDevice?

    This is not possible unfortunately, the Exception model from the SoftDevice S130 Specification is shown below:

    The SoftDevice needs a higher priority (0) than the application (1), in order to maintain a stable BLE link.

    Best regards, Simon

Reply
  • You mentioned that you are using ADC simultaneously as the LPCOMP, but this is not possible since it uses the same analog inputs as the ADC module and only one of the modules can be enabled at the same time. I assume you are only using the LPCOMP, since that will cover the needs in order to achieve mentioned functionality.

    What ADC sample rate can I expect in described configuration?

    By this, I assume you mean how fast it takes from a crossing happens until an event is generated. According to the Product Specification on page 66, it says that the time from a VIN crossing to ANADETECT generated is 15µs.

    How to get the highest priority for LPCOMP interrupt – higher than SoftDevice?

    This is not possible unfortunately, the Exception model from the SoftDevice S130 Specification is shown below:

    The SoftDevice needs a higher priority (0) than the application (1), in order to maintain a stable BLE link.

    Best regards, Simon

Children
No Data
Related