PsoC6 not waking from (normal) sleep on rising edge interrupt

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
UrPl_1236626
Level 4
Level 4
10 likes given First solution authored 50 replies posted

Hi,

we have noticed that rising edge interrupt does not (always) wake-up M4 from sleeping (asm: WFI), and thus interrupts are not served.

By omitting the WFI instruction all interrupts are perfectly served.

By changing the interrupt to Level instead of Rising Edge, and using the WFI, all interrupts are served, thus working perfectly.

Is this expected behavior of the Rising Edge interrupt?

Setup:

  • UDB generates a high signal when counter matches one value, it stays high for some time,
  • Clocked with Peripheral / 2
  • All clocks: Fast, Peripheral, Slow = 96 MHz

BR Uros

0 Likes
5 Replies
RodolfoGL
Employee
Employee
250 solutions authored 250 sign-ins 5 comments on KBA

Note that when calling the WFI(), the PSoC might go to deep-sleep or sleep mode, depending how the SCB_SCR register is set.

Perhaps it is configured to deep-sleep, in this case, you will not wake from an UDB interrupt? Try to use this PDL function to go to sleep: Cy_SysPm_CpuEnterSleep(CY_SYSPM_WAIT_FOR_INTERRUPT);

If that still doesn't work, can you share the project?

0 Likes

I have used the Cy_SysPm_CpuEnterSleep(CY_SYSPM_WAIT_FOR_INTERRUPT) instruction.

The thing is that when UDB interrupt is set to Level it works perfectly, but rising edge is loosing interrupts (on one of my boards and a bit different project) or are not even working (on some other board).

It would be difficult to share the whole project, but the UDB logic that triggers the interrupt is simple upcounter, which is counting up by two, when registers are equal output goes high, which is then triggering the interrupt, which interrupt then modifies the compare register value (the output which is triggering interrupt goes low).

0 Likes

Can you create a simple project to reproduce this problem and share with us? Perhaps simply using a DFF connected to an interrupt?

0 Likes
UrPl_1236626
Level 4
Level 4
10 likes given First solution authored 50 replies posted

 I will try to strip down.

0 Likes
Rakshith
Moderator
Moderator
Moderator
250 likes received 1000 replies posted 750 replies posted

The thread was locked due to inactivity for a long time, you can continue the discussion on the topic by opening a new thread with reference to the locked one. The continuous discussion in an inactive thread may mostly be unattended by community users.

Thanks and Regards,
Rakshith M B
0 Likes