Cross posting this from the Legato forum.
Any help is greatly appreciated!
Cross posting this from the Legato forum.
Any help is greatly appreciated!
The 8 GPIOs (34-41) highlighted by @coastalbrandon are routed inside the WP8548 module to the ULPM MCU. I extracted the information in the table below from the wp8548 product technical specification document.
WP GPIO | WP Pin Num | ULPM Wakeup | Possibly Unavailable in Future Modules |
---|---|---|---|
34 | 100 | ||
35 | 101 | ||
36 | 102 | ✓ | |
37 | 103 | ||
38 | 92 | ✓ | |
39 | 93 | ✓ | |
40 | 94 | ✓ | |
41 | 95 | ✓ |
Based on looking at the gpio_map
definition in drivers/mfd/swimcu-gpio.c
in the kernel source, I believe that in addition to being usable as ULPM wakeup, GPIOs 36, 38 and 39 can also have interrupts attached to them that are useful while Linux is running. In @nick post on the Legato forum he mentions that GPIO38 is working while the others are not. Can you confirm that GPIOs 36 and 39 are not working, but 38 is? It seems like 34, 35, 37, 40, 41 won’t be usable as interrupts. I don’t know if there is a hardware reason why the ULPM mcu can’t catch interrupts on these pins or if it’s just a matter of configuring the MCU firmware differently. The MCU firmware is closed source, so you can’t change its behavior yourself.
Hey David, thanks for the response. To confirm, when you speak of an interrupt - does this mean that we wouldn’t be able to sense an edge on those pins? We would have to poll those pins manually in order to read if our external device has been triggered?
@coastalbrandon: my understanding is that for 5 of the 8 pins, you would have to poll them to detect a change in value.
Hello all,
I tried to implement this by polling on an interval (while(true)
with a 500ms delay). It worked pretty well with only one pin for about 10 minutes. Leaving it running for a bit longer or adding more pins quickly locked up the i2c connection to the low power MCU.
Is it fair to say this is a hardware limitation in terms of the bus and MCU? I’m starting to believe this to be true (as much as I don’t want it to be true).
@nick are you saying interrupts didnt work on gpio 36,37 and 38?
Hey @asyal,
I was able to confirm interrupts function as expected on GPIO 36 and 38, however GPIO 37 lacks the edge property as discussed in the post on the Legato forum. I suspect GPIO 39 will work as well, but I have not had a chance to confirm yet.