This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

nRF9160 toggle gpio with modem active/inactive state

Hi,

I am using ncs 1.0.0 and modem fw version 1.0.1. 

I am using PSM mode in my firmware. 

I want to toggle state of one gpio when modem goes in active or inactive state. 

I am using gpio to control sleep mode of LDO powering the nRF9160. 

Is there a way to do this ?

I explored COEX pin and MAGPIO pins usage for this but couldn't find how to use it. 

Regards,

Smitesh Mali

Parents Reply
  • I took a closer look at this, and you don't need to send any AT commands in order to use the COEX interface. One thing you should make sure, if you are using the nRF9160 DK, is that the interface pins 6-8 are routed to the COEX interface. However, if you haven't changed anything, this should be done by default (Check out the file boards/arm/nrf52840_pca10090/Kconfig).

    To see whether the modem is active or not, attach a 100kΩ pull-down resistor to the COEX2 pin on the P1 connector (see image below), and check its digital value.

    I tested it out with the udp_with_psm sample, and configured active time to 1 minute and periodic tau to 90 seconds. I checked the results of COEX2 with a digital analyzer, and it worked as expected:

    Best regards,

    Simon

Children
Related