Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SAADC EVENT_CH[n].LIMITH and L doesn't work for channel 4 .. 7 #115

Open
schumphi opened this issue Nov 10, 2023 · 0 comments
Open

SAADC EVENT_CH[n].LIMITH and L doesn't work for channel 4 .. 7 #115

schumphi opened this issue Nov 10, 2023 · 0 comments

Comments

@schumphi
Copy link

schumphi commented Nov 10, 2023

The interrupt for all limit events are set correct but when a high or low event for channel 4 to 7 is triggered then the event is not processed. The reason is a wrong mask macro

/** @brief Symbol specifying the interrupt bitmask for limits of all channels. */
#define NRF_SAADC_ALL_CHANNELS_LIMITS_INT_MASK \
    ((uint32_t)(((1 << SAADC_CH_NUM) - 1) << NRF_SAADC_LIMITS_INT_OFFSET))

There are 2 events per channel so change macro

/** @brief Symbol specifying the interrupt bitmask for limits of all channels. */
#define NRF_SAADC_ALL_CHANNELS_LIMITS_INT_MASK \
    ((uint32_t)(((1 << SAADC_CH_NUM * 2) - 1) << NRF_SAADC_LIMITS_INT_OFFSET))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant