ADC of zephyr

Hi,

I am working on the nrf5340 with zephyr (NCS 1.7.1), I need to monitor the voltage of the battery, in the beginning, I used the ADC API of zephyr, and it works well, but the zephyr API doesn't seem to provide API to close the ADC, so I have to switch to nrfx_saadc API, and I got a few examples of its usage here:

The issue is as below:

Only the "simple booking mode" works, the other two mode doesn't work, the system hangs after nrfx_saadc_mode_trigger() is executed, It appears the “nrfx saadc event handler” is not working properly.

the ADC config of prj.conf as below, am I missing anything?

CONFIG_ADC=y
CONFIG_ADC_ASYNC=y
CONFIG_ADC_NRFX_SAADC=y
CONFIG_NRFX_SAADC=y

Thanks!
Kind regards
Related