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

LPComp events triggers by other inputs

Hi

I am currently doing a project based on the nRF52840 MCU and evaluation board

as part of my project, I have used the LPComp module, and set it up to trigger on rising voltage

#define LPCOMP_REF				NRF_LPCOMP_REF_EXT_REF0			//AIN0
#define AUD_DET					NRF_LPCOMP_INPUT_1				//AIN1

    nrf_drv_lpcomp_config_t config = NRF_DRV_LPCOMP_DEFAULT_CONFIG;
	nrf_lpcomp_config_t		hal_config;

	hal_config.reference	= LPCOMP_REF;
	hal_config.detection	= NRF_LPCOMP_DETECT_UP;
	hal_config.hyst			= NRF_LPCOMP_HYST_NOHYST;

	config.hal		= hal_config;
	config.input	= AUD_DET;

	// initialize LPCOMP driver, from this point LPCOMP will be active and provided
	// event handler will be executed when defined action is detected
	errorCode = nrf_drv_lpcomp_init(&config, lpcomp_event_handler);
	APP_ERROR_CHECK(errorCode);

	nrf_drv_lpcomp_enable();

I have done so by following the LPComp example of the 15.3 SDK, which my project uses

I have tested the module and it seems to work

however, I am also recording LPComp events triggering when other modules are used (for example, when using LEDs or other GPIOs)

I have tried connecting both references together, grounding both, yet I still get LPComp events

I have also tested on two evaluation boards, so I know that the one I normally use isn't just faulty (unless both are faulty somehow)

Is there any reason for this behavior? anything I could test to try and figure out the cause?

if there is any more information I can provide to help with solving this, please let me know and I'll do my best to provide it

thanks in advance

Parents Reply Children
No Data
Related