Reply
Posts: 1
Registered: ‎07-07-2017

Configuring GPIO interrupts with Configurator for Happy Gecko

Hello,

I am new to the Happy Gecko and SiLabs. I am porting an application from the STM32 family to Happy Gecko EFM32HG322F64. I want to enable interrupts on some GPIO pins and I cannot find where in the Configurator where this is done. I have exhausted search results so I am posting here as a last resort.

 

First, is it even possible to configure GPIO pin interrupts from the Configurator or do I have to code the GPIO interrupts manually?

 

When I reference other reference projects (STSTK3400A_clock for example) I notice the emlib folder contains em_core.c while my solution does not. I am to understand that Configurator adds this file to the solution when it is needed. Do I need to add em_core.c manually?

 

Any help is appreciated.

 

Rich

 

Keywords: happy gecko configurator interrupts GPIO

Highlighted
Posts: 404
Registered: ‎12-05-2016

Re: Configuring GPIO interrupts with Configurator for Happy Gecko

Hi @RWLROC,

 

Yes, the file will need to be added manually.  Unlike the EFM8 hardware configurator, the hardware configurator for 32 bit parts is mainly used for pin configuration and it does not have support for configuring the registers for all of the various modules, so that module configuration code has to be manually added.  Both the GPIO module and the nested interrupt controller (NVIC) have to be configured for the interrupts to work correctly. This KB article should be useful: http://community.silabs.com/t5/32-bit-MCU-Knowledge-Base/EFM32-and-EFR32-Interrupt-Handling/ta-p/172....  So the HG reference manual will also need to be referenced to figure out how to set the various GPIO module registers including the interrupt enable (GPIO_IEN) register.  Also an HG example project such as the SLSTK3400A_clock project can be referenced to see how interrupts are configured for the push buttons on the board.

 

I hope this points you in the right direction for using interrupts with the Happy Gecko.

 

Thank you,

jpitt