I would like to invoke a hardware interruption whenever there is a change in the PLU Inputs values (PLU_INs).
I have used the NVIC_EnableIRQ() from the CMSIS access NVIC functions.
Also I checked the PLU interrupt priority and it is 0.
But whenever I change the PLU_IN values, (from 0V to ), nothing occurs, no execution of the PLU_IRQHandler(). No interruption happen. I tried to manually pend the interruption (using the SW) only then the PLU_IRQHandler() is executed.
Any idea about what I maybe missing?
Any example deploying interruptions?
When does the SysTick has to do with peripheral interruption?
Thank you in advance.
Hi, Randa,
Can you observe that the PLU_OUTx signal toggle via oscilloscope?
BR
XiangJun Rong
Hi, Randa,
Pls refer to section 39.5.5 Wake-up/interrupt control register in UM11126.pdf, which is UM of LPC55S6x.
I copy it here:
"Any of the eight selected PLU outputs can be enabled to contribute to an asynchronous
wake-up or an interrupt request. All enabled output signals are logically OR’d together to
generate a single wake-up or /Interrupt request"
BTW, you have to write the WAKEINT register so that you can specify which PLU output signal triggers the interrupt.
I do not think we have example for the PLU interrupt.
Hope it can help you
BR
XiangJun rong
Thank you very much for your precious insight, I am trying to work it out.
Though, I have a question:
Hi,Randa,
Youi have to call the two function: PLU_EnableWakeIntRequest()) and NVIC_EnableIRQ()).
The function NVIC_EnableIRQ()) is to set up the NVIC module, for example to set up the priority of the PLU, enable the interrupt source of PLU, which is 52th vector in vector table. The function can do it by setting bit 20 for the NVIC->ISER1 register, setting the bit 20 of NVIC->ICER1.
Pls refer to the Chapter 3: LPC55S6x/LPC55S2x/LPC552x Nested Vectored Interrupt Controller (NVIC), Note that the NVIC is part of cortem-M4.
The PLU_EnableWakeIntRequest() is only to write the WAKEINT_CTRL register, which can select the interrupt source from the PLU output signals.
Pls refer to section 38.5.5 Wake-up/interrupt control register.
Hope it can help you
BR
Xiangjun Rong
Thank you very much this was so helpful.
One additional issue,
Referring to the 38.5.5 Wake-up/interrupt control register from the UM, some glitching issues can occur when it comes to invoke interrupt using the PLU module due to the possible delay caused by the LUT network.
In a first trial, I left the default settings of the plu_wakeint_config_t, means no filtering is used and the clock cycle is default (using the PLU_GetDefaultWakeIntConfig). Then, the code get stuck in the PLU_IRQHandler and does not go out from the function.
As a trial to fix that, I thought that glitching may be the cause, so I updated the plu_wakeint_config_t in a way that it considers the filtering mode. Then, then interruption is no more invoked from the PLU module!
Any idea about this issue?
Thank you again.
Hi, Randa,
You have to configure the PLU module so that there is an exact signal for the PLU_OUTx signal which you predefined and the signal can toggle to trigger interrupt.
Hope it can help you
BR
Xiangjun Rong
Hi Xiangjung Rong,
Indeed, this is what I made sure to do:
PLU_interruptMask= 11111111;
PLU_EnableWakeIntRequest(PLU, PLU_interruptMask, pPLU_interrupt_config); //Enables PLU outputs wakeup/interrupt request.
This is the definition of API:
I want what ever one of the 8 Outputs pin changes, then an interruption occurs.