This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CC2538: How to set an Interrupt Service Routine for GPIO wake up interrupt

Part Number: CC2538
Other Parts Discussed in Thread: SMARTRF06EBK, Z-STACK

Hello,

I would like to ask a question concering the power saving mode in CC2538. I am using the zstack 1.2.2a HomeAutomation. The device is falling asleep and it wakes up with the sleep timer interrupt. i would like to set a GPIO interrupt as well and I want to register an interrupt service routine for that GPIO when it wakes up. The sleep wake up timer has a dedicated interrupt service routine to set does the GPIO has one also or do I use the generic function to set a GPIO interrupt?

Thank you in advance

Panagiotis Nomikos

  • Hello Panagiotis,

    This is enabled in the Sample Application files using the OnBoard and board_key files for the buttons on-board the SMARTRF06EBK.  Please reference InitBoard -> HalKeyConfig (OnboardKeyIntEnable should be set to TRUE), and OnBoard_KeyCallback from OnBoard.c file.  Also the interrupt_keybd -> hal_key_int_keys from board_key.c and the KEY_* definitions in board_key.h will be of further use.  You can find more information in the HAL Driver API and Z-Stack Home Developer's Guide documents.

    Regards,
    Ryan