Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions drivers/counter/counter_mcux_lptmr.c
Original file line number Diff line number Diff line change
Expand Up @@ -202,11 +202,8 @@ static uint32_t mcux_lptmr_get_pending_int(const struct device *dev)
{
const struct mcux_lptmr_config *config = dev->config;
uint32_t mask = LPTMR_CSR_TCF_MASK | LPTMR_CSR_TIE_MASK;
uint32_t flags;

flags = LPTMR_GetStatusFlags(config->base);

return ((flags & mask) == mask);
return (uint32_t)!!((config->base->CSR & mask) == mask);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this doesn't match the commit message description:

The correct behavior is to check only the TCF
(Timer Compare Flag) to see if an interrupt is pending,
regardless of the TIE (Timer Interrupt Enable) status.
This commit updates the function to return the TCF flag
directly.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

commit message updated.

}

static uint32_t mcux_lptmr_get_top_value(const struct device *dev)
Expand Down
Loading