User push buttons on ConnectME9210 dev board


Anyone know how to have the user push buttons on the ConnectMe 9210 development board create an event? Do they need to be tied to an interrupt? Any examples?


See the HRM for the ME 9210 to see which pins can be used as external interrupts and which ones you’d have to poll as GPIO inputs.

I’d recommend creating the Sample project ‘Wakeup Interrupt Samle’. It’s for the CC9P 9215 (i.e. you have to select it as the platform you’re building for), but is a good reference on how to setup an ISR on any platform.

Thanks for the tip.

I looked at the HRM and I guess that’s part of my question. I thought the push buttons would have been identified as a gpio pin. Even if a gpio pin can be used for an external interrupt, how do I tie the push button to that pin?


Is this example available on the Linux platform? I don’t see it as an option in my sample project list.

A Linux ISR example would be nice. I know it’s probably following the standard request_isr format but the step-by-step explanation of the mknod commands specific to the user buttons and the dev kit for the 9210 would save people a lot of time.

This example (demo application for accessing gpios on the CME9210) will be included in the next version of Digi Embedded Linux (5.0).

We plan also to include the demo application in a future package delivered through the Package Manager.

In any case, the gpio test application and gpio demo driver can be used with the CME9210 just changing the gpios used.

Find attached the 2 files you should modify. One is the test application adapted for the CME9210 (please, be sure you pass the option CONFIG_DEL_CME9210JS when building) and the second one is the file that creates the necesary device nodes for the gpios.

The gpios connected to the buttons on the ConnectME base board are not interrupt capable, therefore the application uses polling to read the inputs.
But the driver and the application contain valid code to read an input as interrupt if you select a gpio that has such capability.

Thank you for the code. I’ve gotten most of what I need related to the GPIOs working for polling from the “C programmed GPIO test application” but I’m still a bit lost on the interrupt part. It looks like your code just extends that existing code to the CME9210.

If the user buttons don’t support interrupts, what GPIOs do? What are their major and minor device numbers?

I was considering writing my code into the gpio.c kernel module but that’s a big jump straight out of the gate.

My big question, I guess, is does the IRQ_CAPABLE code block when reading and return when the interrupt is triggered? Is that how we wait for an interrupt in this user space code?

SW2 on the Digi Connect ME 9210 dev board is also tied to [E12], which can be used as an EIRQ.

Attached you’ll find an updated version of the test application.