GPIO_Set函数reverting back to default state

6 posts / 0 new
Last post
skyng22003
Offline
Last seen:2周6天前
加入:2015-02-02 19:30
GPIO_Set函数reverting back to default state

Hi I am trying to add a connection indicator to the DSPS example,

In version DSPS 3.150.1.5:
I reserved the port and pin RESERVE_GPIO(RGB_LED_B, RGB_LED_B_PORT, RGB_LED_B_PIN, PID_GPIO); and configured pin GPIO_ConfigurePin(RGB_LED_B_PORT, RGB_LED_B_PIN,OUTPUT,PID_GPIO,true);

and upon state set APP_CONNECTED I ran the function GPIO_SetInactive(RGB_LED_B_PORT,RGB_LED_B_PIN); which switches on the LED,

the commands above works as expected when a connection is established the LED comes on and stays on.

However when I updated to DSPD 3.150.2 and added the same codes, on connection the LED just flashes but does not stay on????

This is also true for other GPIO pins, it reverts to its default state?

any ideas?

Thanks,
天空

Keywords:
Device:
MT_dialog
Offline
Last seen:1 month 1 week ago
Staff
加入:2015-06-08 11:34
Hi skyng22003,

Hi skyng22003,

The da can preserve the states of the pins when sleeping but when it wakes up it goes through periph_init() function in order to initialize the peripherals and configures the pins to the default state. If you want your pins to reserve the state, you will have to keep the values of the pins before going to sleep.

Thanks MT_dialog

skyng22003
Offline
Last seen:2周6天前
加入:2015-02-02 19:30
I see, so version DSPS 3.150

I see, so version DSPS 3.150.1.5: so does not support sleep whilst DSPS 3.150.2 does and this is reason I'm seeing this phenomenon?

MT_dialog
Offline
Last seen:1 month 1 week ago
Staff
加入:2015-06-08 11:34
Hi skyng22003,

Hi skyng22003,

I 've just tried the older version of DSPS as it seems it doesnt sleep even with the CFG_EXT_SLEEP definition. So apparently thats the reason you are seeing this phenomenon.

Thanks MT_dialog

jorge
Offline
Last seen:3 years 11 months ago
加入:2016-01-25 14:20
Hello skyng, how did you do

Hello skyng, how did you do to ask for the state?

MT_dialog
Offline
Last seen:1 month 1 week ago
Staff
加入:2015-06-08 11:34
Hi jorge,

Hi jorge,

Please check your original posthttp://support.dialog-semiconductor.com/pin-activation-states.

Thanks MT_dialog