hi,
I am trying to use ewm since it does reset peripherals。
But examples in both k26 and mcxn does not work as we thought.
I add logs to print ewmIsrFlag, it shows that ewm enters interrupt when interrupt bit is enabled. ewm does not enter interrupt when we wait for timeout.
Step by step debugging also gives the same proof。
Sincerely waiting for your reply.
Is there any known bugs or the refresh procedure is not exactly right ?
Solved! Go to Solution.
Hello @Crshi ,
Thanks for your post.
According to the description of RM, "When the ewm_out_b signal asserts, an interrupt request can be generated to indicate the assertion of the EWM reset out signal. The interrupt is enabled when CTRL[INTEN] = 1. Writing 0 to this field clears the interrupt request but does not affect the ewm_out_b signal, which can be deasserted only by forcing a system reset."
Therefore the ewm_out_b signal determines whether an interrupt request will be generated, while INTEN bit determines whether the interrupt is allowed to be passed to the CPU. In other words, when ewm_out_b is asserted and INTEN = 1, the interrupt request will be sent to the CPU, but whether the IRQ handler is ultimately executed depends on the following additional conditions:
1. The interrupt is not masked by a higher-priority interrupt;
2. The interrupt vector table is correctly configured;
3. The NVIC has enabled the EWM0 interrupt.
The interrupt number of EWM can be found in "Table 15. Interrupt Vector Assignments" of the RM.
Hope it can help you.
BRs,
Celeste
--------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the "ACCEPT AS SOLUTION" button. Thank you!
--------------------------------------------------------------------------------------------------------------------
I read the rm word by word again.
It says,
1. When IntEn bit is set and EWM_out is asserted, an interrupt is generated.
2.When ewm_out is asserted, it can only be deasserted by forcing reset.
So, does it mean that once an interrupt generated, the respective irq handler will be triggered when IntEn is set?
Hello @Crshi ,
Thanks for your post.
According to the description of RM, "When the ewm_out_b signal asserts, an interrupt request can be generated to indicate the assertion of the EWM reset out signal. The interrupt is enabled when CTRL[INTEN] = 1. Writing 0 to this field clears the interrupt request but does not affect the ewm_out_b signal, which can be deasserted only by forcing a system reset."
Therefore the ewm_out_b signal determines whether an interrupt request will be generated, while INTEN bit determines whether the interrupt is allowed to be passed to the CPU. In other words, when ewm_out_b is asserted and INTEN = 1, the interrupt request will be sent to the CPU, but whether the IRQ handler is ultimately executed depends on the following additional conditions:
1. The interrupt is not masked by a higher-priority interrupt;
2. The interrupt vector table is correctly configured;
3. The NVIC has enabled the EWM0 interrupt.
The interrupt number of EWM can be found in "Table 15. Interrupt Vector Assignments" of the RM.
Hope it can help you.
BRs,
Celeste
--------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the "ACCEPT AS SOLUTION" button. Thank you!
--------------------------------------------------------------------------------------------------------------------