# 159 questions

Tagged
• x
60
views
no
1

## How to trigger ADC from a timer interrupt, while generating PWM with the same timer and while using BLE on nRF51822?

Hi. I am a newbie in Nordic chips, quite knowledgeable in Atmel AVR, though. I'm working with an nRF51822 on a board like this https://www.waveshare.com/wiki/BLE400. I use the Mbed environment.

What I'm trying ... (more)

59
views
1
vote
1

Coming from other embedded systems, I'm impressed with the flexibility and power of the Task/Event framework of the nRF52832. But with great flexibility comes great confusion! :)

I'd like to do something along these lines, written here in ... (more)

53
views
no
1

## 51822 PWM unstable

Hi guys，

I use the 51822's PWM recently, PWM is made by GPIOTE+PPI+TIMER, and the PWM source code as below(I use TIMER1, GPIOTE[0], PPI_CH[0], PPI_CH[1]， period and duty means ticks with 16MHz):

void ...
(more)

23
views
no
1

## Pulsewidth modulation with app_pwm results in NRF_ERROR_INVALID_STATE

I have a nrf51-DK. I am trying to get a PWM signal on one pin. Here is my code:

static volatile bool ready_flag;

void test_pwm(){
APP_PWM_INSTANCE(PWM1,2);                   // Create the instance ...
(more)

121
views
1
vote
1

## MPU9250 with PWM logic

Hello friends,

i am new to embedded programming and trying to learn the new things in embedded for this i am doing 1 project in which i am using mpu9250 with pwm.

is it possible to glow 4 different LEDs ... (more)

54
views
no
2

## Difference in PWM from nrf52810, 2832 and 2840

New to NDZ. Searched forums already. Summary page of each produce spec says different things but PWM section in each spec looks like they are copied.

So are the PWM modules different?

2810: 1st page of PSv1.0spec: "4-channel pulse ... (more)

54
views
1
vote
1

## PWM driver - invert pin

Hi,

I'm using nRF PWM Driver and I didn't find the way, how to invert logic of PWM. I would like to reach this behaviour:

• If I set seq_value=0, I want to have PWM signal which is ...
(more)

28
views
no
1

## Which GPIO pin can be used as PWM in nrf51822?

Which GPIO pin can be used as PWM in nrf51822? or is there a document to describe it?

59
views
no
1

## I'm new to embedded system terminology.May i know what exactly do you mean by instance in the PWM explanation of nRF52 api?

Module for generating a pulse-width modulated output signal.

This module provides a PWM implementation using timers, GPIOTE, and PPI.

Each PWM instance utilizes 1 timer, 2 PPI channels, and 1 PPI channel group plus 2 PPI and 1 GPIOTE channels ... (more)

79
views
no
1

## I have tried to produce a PWM signal of 33.33KHz at a GPIO pin of nRF52832!The duty cycle of the signal varies bizzaredly even after setting it to 50%!Can anyone help me out! I wanna run an external IC on this clock!Please find the screenshot attached!

PWM.PNGHere is my code:

#include "nrf.h"
#include "nrf_gpio.h"
#include "nrf_drv_rtc.h"
#include "nrf_drv_clock.h"
#include "boards.h"
#include "app_error.h"
#include <stdint.h>
#include <stdbool.h>

#define COMPARE_COUNTERTIME  (3UL)                                       < Get Compare event COMPARE_TIME seconds after the ...
(more)

88
views
no
1

## PID Controller

Hello All,

Where would I find a library file for a PID controller? Forgive me if there is an obvious answer. I'm new to working with Keil.

Thanks for taking the time to read this.

102
views
no
1

## 3 or 4 PWM in nrf52840

In the nRF52840 Objective Product Specification, there is 4 PWM in the key features but only 3 in the beginning of the PWM chapter.

55
views
1
vote
1

## GCC compile PWM problem

I'm following the tutorial Development with GCC and Eclipse, but have problem when use GCC to compile project that use PWM library.

I found that when compile the code with GNU "make" command, whenever I call app_pwm_disable(), the PWM ... (more)

82
views
no
1

## PWM on nrf52 with mbed consumes to much current.

Hi, I wonder why my pwm uses so much power in WFI mode. It uses around 470uA and when I do not use pwm that current is around 1.8uA. I tried to disable pwm but without success. Here's ... (more)

84
views
1
vote
1

## what is difference between pwm driver and pwm library example

Hi.

In SDK 14.0 examples, there are two examples for pwm. I analyzed both example. pwm driver example source looks like that it use pwm peripheral driver source. And pwm library source looks like that it use timer and ... (more)

57
views
no
no

## PWM and TWI not working at the same time [closed]

Hello, i have Nrf52840, here is the code for PWM

APP_PWM_INSTANCE(PWM1, 1);

uint8_t cBuzzer::_PWM_init(uint32_t Time_uS){
app_pwm_uninit(&PWM1);
app_pwm_config_t pwm1_cfg = APP_PWM_DEFAULT_CONFIG_1CH(Time_uS, Buzzer_Pin);
/* Initialize and enable PWM. */
if (app_pwm_init(&PWM1, &pwm1_cfg, NULL) != Successfully) {return Error ;}
app_pwm_enable(&PWM1);
return ...
(more)

77
views
no
2

## RTC0 AND RTC1

hi , I have a question about rtc.In my project ,I use rtc1 for app timer and rct0 for low_power_pwm.The problem is that I dont't have any idear to enable rtc0 instead of rtc1 in the low_power_pwm .Thank ... (more)

83
views
1
vote
1

## Timer and PWM (and BLE) in nRF5 v12

(Building with nRF5 12.2.0 / armgcc)

I want to do bursts of pulses using PWM for the pulses and a TIMER to enable the bursts. I need this to be non-blocking so I can also use BLE.

Now PWM ... (more)

80
views
no
1

## nrf_pwm_values_individual_t pwm RGB LED

I want to have blinky orange led,

0 mean on, 0x8000 is off, right? and why??

I have no idea what's 0x8000 mean!

so if I want have orange(full-R and half-G), how can i do?

thanks!

There is ... (more)

90
views
2
1

## Is it possible to creat a pwm with 1sec period

Dear All :

Is it possible to creat a pwm with 1sec period? Since the lowest frequency of the base clock is 125kHz，the top count of the pwm with 1sec period will be 125000(for case of up counter)。But ... (more)

75
views
no
1

## 52810 PWM control

I have intention to use 52810's PWM output to drive motor. The timing requirement are critical so hardware PWM is essential, rather than CPU generated waveform output.

I have found some posts on forum discussed about pwm related issue ... (more)

159
views
2
1

## 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 ... (more)

146
views
no
1

## NRF52832 PWM limitations

Hello,

With sdk13 and app_pwm library, I only got 9bits resolution for 32KHz freq.

The pwm should have 16bits resolution, with max freq 100KHz? please could anyone confirm that.

157
views
1
vote
1

## nRF52- PWM - Generating 8Mhz Clock

Hi,

Can Anyone has experienced with nRF52 PWM clock generation ? I am trying to generate 8-Mhz clock out of GPIO by configuring it for PWM module.. But so far I can get only 1Mhz clock maximum..

Is it possible to ... (more)

890
views
7
1

## NRF52 Dim LED with PWM Driver

I am migrating from nrf51 to nrf52. Using SDK12.1

On NRF51, I used the PWM Library to use 2 buttons on the DK to dim up or down onboard LED1 (called OUTPUT_LED). It worked great (not sure if it ... (more)

165
views
no
2

## Infrared Transmitter only with PWM driver on nrf52

Hi all,

I need to transmit an infrared beacon every X seconds and the beacon does not change over time. I am using the PWM driver on nrf52 to generate the 38kHz carrier frequency and I am currently working on ... (more)

42
views
no
no

## EVENTS_PWMPERIODEND interrupt not behaving as expected

I am trying to use the EVENTS_PWMPERIODEND interrupt to read a GPIO pin on every falling edge of an output GPIO that is driven from the PWM module.

The description in the reference manual is: EVENTS_PWMPERIODEND 0x118 Emitted at the ... (more)

79
views
no
1

## nrf51822 PWM failure

I am trying to add the example in examples\peripheral\pwm_library to another project to get pwm working. In the other project I have included all necessary stuff but I get:

..\..\..\main.c(59): error: #20: identifier "TIMER1_INSTANCE_INDEX" is undefined ... (more)

194
views
2
2

Please can anyone help me on how to use(program) PWM hardware with individual loading mode? My goal is to control 12 LEDs individually with different duty cycles and playbacks using pwm hardware which has 12 outputs to make a ... (more)

116
views
no
no

## making Tune instead of Beep using Bizzer with PWM library

i have added pwm into proximity profile example and now i am able to make beep using buzzer with pwm library.Now i want to make some sort of Tune instead of beep.

Can any one help!....Thanks.

#### Statistics

• Total users: 25629
• Latest user: Mercedes Simonetti
• Resolved questions: 11238
• Total questions: 27730

## Recent blog posts

• ### Introduce smart motion controller - ELIO

Posted 2017-12-12 05:09:05 by caram5555
• ### The world's smallest breakout board compatible BTLE module: Automate your curtains for less than \$90 with BluChip!

Posted 2017-12-07 09:10:36 by Jeevan Anga
• ### Join Jumper's free beta for a Virtual nRF52832 device to streamline your R&D process

Posted 2017-11-27 12:53:04 by Yaniv Nis
• ### PSG-NORDIC Channel in YouTube

Posted 2017-11-27 11:08:04 by Mugelan
• ### Job Offer: nRF / Embedded Developer in Stuttgart, Germany

Posted 2017-11-20 11:46:20 by Marius Heil

## Recent questions

Posted 2017-12-12 10:03:07 by roger.k
• ### system_info.h: No such file or directory what can i do?

Posted 2017-12-12 09:52:43 by AMER