This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

uC sleeping BUT Not Waking off RDYN issue?

I'm right now getting uC to sleep WHEN THERE ARE NO ACI EVENTS I think I'm doing right, the uC sleeps but I'm not able to wake up despite the fact that RDYN is connceted to pin 2 and as I use ATmega328 its the lowest level hardware interrupt that should make the uC wake up but it is not happning ,I have the issue covered here >> forums.adafruit.com/viewtopic.php

I have tried both external interrupt using attachInterrupt(0, funcNAME, CHANGE); and PCintPort::attachInterrupt(2, funcNAME, CHANGE/FALLING/RISING);

IN connections the RDYN is very finely soldered to pin2 of ATmega or else the nrf8001 wouldn't work at all so its the problem somewhere in the library or my methodology/way of getting the uC to sleep!

Parents
  • What method are you using in the nRF8001 library , polling or interrupt ? Can you check with polling, you would want to have the RDYN line LOW as a wakeup source so the mcu will not be able to go to sleep when RDYN is low. This will be easier to verify and then we can address the interrupt.

  • In the hal_aci_tl.cpp file ,I encountered one ISR function named: m_rdy_line_handle() and which was handling the external interrupt on pin 3! ,I changed that interrupt addressal to pin2 but then things jammed further.

    There's another bool function I encountered nameed: toggle_eimsk(true) which I think is swtiching the interrupt on pin2 :

    if (m_aci_q_is_full(&aci_rx_q)) { /* Disable RDY line interrupt. Will latch any pending RDY lines, so when enabled it again this routine should be taken again */ toggle_eimsk(false); }

    What you think?

Reply
  • In the hal_aci_tl.cpp file ,I encountered one ISR function named: m_rdy_line_handle() and which was handling the external interrupt on pin 3! ,I changed that interrupt addressal to pin2 but then things jammed further.

    There's another bool function I encountered nameed: toggle_eimsk(true) which I think is swtiching the interrupt on pin2 :

    if (m_aci_q_is_full(&aci_rx_q)) { /* Disable RDY line interrupt. Will latch any pending RDY lines, so when enabled it again this routine should be taken again */ toggle_eimsk(false); }

    What you think?

Children
No Data
Related