4 posts / 0 new
Last post
dsnejko
Offline
Last seen: 6 years 7 months ago
Joined: 2015-02-14 13:29
can't drive GPIO in deep sleep mode

Hi,

I have a custom board with DA14580. The board has one clock 16Mhz. SDK si 3.06. After a connection established I am trying to use a GPIO to power an external opam amplifier and run the adc to read the analog signal. It works in active mode but stops working if I enable any sleep mode. Even if I try to control the mode from the app, let say deep sleep in advertisement and force active after connection, the gpio is not controlled. Any suggestions?
Regards, Dmitri.

Device: 
MT_dialog
Offline
Last seen: 1 year 3 months ago
Staff
Joined: 2015-06-08 11:34
Hi dsnejko,

Hi dsnejko,

When the da goes in sleep mode the pins are latched to the state they were before going to sleep, when waking up the pins are reconfigured and return to their default state. Their default state is the configuration you have in the periph_init() function. You have to configure your pins, when waking up, in the state they were before going to sleep mode.

Thanks MT_dialog 

dsnejko
Offline
Last seen: 6 years 7 months ago
Joined: 2015-02-14 13:29
Thanks a lot, it works now.

Thanks a lot, it works now. How about the app timer. I have a timer which should wake-up every 10 ms, but I don't see it does it. Also I have supervisory timeouts after a couple of minutes, it never happens in active mode.

Regards, dsnejko

MT_dialog
Offline
Last seen: 1 year 3 months ago
Staff
Joined: 2015-06-08 11:34
Hi dsnejko,

Hi dsnejko,

Make sure that you are setting up the timer correctly? You can place the arch_set_pxact_gpio() function and track if the da wakes up from Smart Snippets, if you cant use Smart Snippets use a led and set it active when the timer wakes up (remember to maintain to status of your led in every wake up, remember the periph_init() reinitializes your pins in every wake up).

Thanks MT_dialog