[20737S] Wrong GPIO behavior on P27 or P14

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
hachc_2137126
Level 5
Level 5
10 likes given 5 likes given First like received

Hi,

One weird finding on using GPIO pin as LED control.

The symptom is found at using P27/PWM1 or P14/PWM2 as GPIO function for driving the LED.

The GPIO pin state won't stay at low (to turn on the LED) statically while we programmed it to be low from API:

#define GPIO_PIN_LED1 14

#define GPIO_SETTINGS_PIN_LED1 (GPIO_OUTPUT | GPIO_INIT_HIGH | GPIO_LED)

....

gpio_configurePin (GPIO_PIN_LED1 / 16, GPIO_PIN_LED1 % 16, GPIO_OUTPUT_ENABLE, 0);

  It behaves as a short-period 'low' then back to high. So the LED will be just a short and dim blinking in every call of API gpio_configurePin (we configure it in every second).

  But we don't see this issue while changing the PIN to P13/PWM3.

HW setting:

VDDIO: 1.8v (also the same voltage level for LED)

Resistor for LED: 100 ohm

  Any comment?

0 Likes
1 Solution

You cannot use two different methods to control the LED. Make sure that you don't have P14 or P27 also in your application's BLEPROFILE_GPIO_CFG structure.

View solution in original post

2 Replies
hachc_2137126
Level 5
Level 5
10 likes given 5 likes given First like received

Is there any 'pre-define' control while the GPIO setting is defined with 'GPIO_LED'?

0 Likes

You cannot use two different methods to control the LED. Make sure that you don't have P14 or P27 also in your application's BLEPROFILE_GPIO_CFG structure.