Skip to content

Commit fb43a48

Browse files
arnopocarlescufi
authored andcommitted
drivers: ipm: fix infinite TXF interrupt
The TXF interrupt mask is not properly set. In this case the interrupt line is not cleaned, leading to the re-entrance in the interrupt handler. the issue is linked to the management of the IPCC_CxTOCySR value. The TXF interrupt is triggered when the IPCC_CyMR is channel bit is set to 0 and the IPCC_CxTOCySR associated bit move from 1 to 0. The fix is to check if the IPCC_CxTOCySR channel bit is 0 instead of 1. Signed-off-by: Arnaud Pouliquen <[email protected]>
1 parent 36ea41f commit fb43a48

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/ipm/ipm_stm32_ipcc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ static void stm32_ipcc_mailbox_tx_isr(const struct device *dev)
136136
mask = (~IPCC_ReadReg(cfg->ipcc, MR)) & IPCC_ALL_MR_TXF_CH_MASK;
137137
mask = mask >> IPCC_C1MR_CH1FM_Pos;
138138

139-
mask &= IPCC_ReadReg_SR(cfg->ipcc) & IPCC_ALL_SR_CH_MASK;
139+
mask &= ~IPCC_ReadReg_SR(cfg->ipcc) & IPCC_ALL_SR_CH_MASK;
140140

141141
for (i = 0; i < data->num_ch; i++) {
142142
if (!((1 << i) & mask)) {

0 commit comments

Comments
 (0)