5/25/2012

How are GPIOs shared between modem and application processors in MSM7xxx?

GPIO_OWNER registers determine which processor owns the GPIO.

Detail: GPIO_OWNER registers determined which processor owns the GPIO. The bits in GPIO_OWNER registers are mapped to individual GPIOs. When the ownership register bit is set to 0, the corresponding GPIO is owned by modem processor. If the bit is set to 1, the GPIO is owned by application processor.

Write attempts without GPIO ownership are ignored. Read attempts without ownership always return 0. Once triggered, GPIO interrupts are routed to the appropriate owners.

Due to security reasons, GPIO_OWNER registers are not shadowed, which means that application processor cannot modify the GPIO_OWNER registers. All ownership setting is done by modem processor.

In addition, GPIO_PAGE and GPIO_CONFIG registers are not shadowed. As a result, even if the GPIO ownership is set to application processor, ARM11 cannot change the alternative function setting of a GPIO. Configuring GPIO alternative function can only be done by modem processor.

For example, when application processor is ready to enter sleep, it will inform the modem processor to take over all the GPIOs. Modem processor switches all GPIOs by writing 0s to the GPIO_OWNER registers before putting application processor into sleep. This allows modem processor to carry out GPIO reconfiguration during sleep, and handle all GPIO interrupts when application processor is in sleep. When application processor wakes up, modem processor restores GPIO_OWNER registers to its original settings.

No comments:

Post a Comment