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

how do I change PWM port to 1 on example "low_power_pwm"

Hi, I have Design a new product based on the NRF52840 I am trying to get the lcd up and running so first thing is the pwm for the backlight. I am using pin 1.08 for the pwm. but I seem to have problem trying to convert LED1 to Port 1 I setup the Low_power_pwm example project and changed the defined board to Custom_board and copied PCA10056.h and renamed it custom_board it compiles fine and works but once I try to change the definition of LED1 It now compiles but will NOT toggle the output P1.8

here is the part of custom_board.h that I changed:

original: / LEDs definitions for PCA10056 #define LEDS_NUMBER 4

#define LED_1 NRF_GPIO_PIN_MAP(0,13) #define LED_2 NRF_GPIO_PIN_MAP(0,14) #define LED_3 NRF_GPIO_PIN_MAP(0,15) #define LED_4 NRF_GPIO_PIN_MAP(0,16)

#define LEDS_ACTIVE_STATE 0

#define LEDS_LIST { LED_1, LED_2, LED_3, LED_4 }

#define LEDS_INV_MASK LEDS_MASK

#define BSP_LED_0 13 #define BSP_LED_1 14 #define BSP_LED_2 15 #define BSP_LED_3 16

I made two changes: #define LED_1 NRF_GPIO_PIN_MAP(1,8) and the second change #define BSP_LED_0 8

the original compiled and worked in the Preview -DK using P0.13 after making this change it compiled and I downloaded it to my board and But I have NO output on port 1.8

What am I missing ?

Related