Skip to main content
Filter by
Sorted by
Tagged with
0 votes
0 answers
50 views

I'm trying to generate a PWM signal on PB27 / Arduino Due pin 13, which corresponds to TIOB0 on the SAM3X8E (used on the Arduino Due). However, the output pin just goes HIGH and stays there — no PWM ...
Lysapala's user avatar
  • 150
1 vote
1 answer
240 views

I am working on an STM32 microcontroller (running at 168 MHz) to generate PWM signals on Timer channels (Ch1 and Ch2) with a frequency of 500 Hz. The PWM is used to control a motor's applied voltage, ...
Hasan Fashtook's user avatar
1 vote
1 answer
190 views

I am trying to generate 3 channel center aligned PWM with complementary outputs and deadtime insertion on an STM32G474. To test functionality of the timers, I currently have the 6 outputs connected to ...
The Tomster's user avatar
0 votes
0 answers
52 views

I am looking for ways to diagnose a problem with a vibration motor NFP-3C-03208B using Zephyr on a custom nrf5340 boardh. I have working on a nordic dk but is not working on a custom board. The device ...
lcj's user avatar
  • 1,927
1 vote
0 answers
56 views

Preface: First time asking a question, please take it easy with the "YOU SHOULD FORMAT YOUR QUESTIONS THIS WAY!" Question: Why does this happen? I'm programming an esp32 S3 dev module using ...
yhq80's user avatar
  • 11
2 votes
2 answers
442 views

I'm facing an issue with the update event triggering in STM32G4 TIM1. I've configured TIM1 to generate PWM signals and set the update event to Center-Aligned Mode 1. However, I've noticed that the ...
amirparto's user avatar
1 vote
0 answers
56 views

I am trying to measure two PWM input signals and, based on them, turn a LED on or off. I am using a PIC16F18313 microcontroller. I have a Futaba remote control, and through its receiver, I receive two ...
Tiberiu Berchez's user avatar
0 votes
0 answers
99 views

I need to add two new PWM pins to my DTS file on a BeagleBone Black. How can I do that? It has the P9_42 as the PWM pin, but I'm having some difficulty in adding another PWM pin. I'll use in mg90 for ...
Vitória Silva's user avatar
0 votes
0 answers
130 views

I've started a personal project. The idea is to output PWM on pin 8 (GPIO8) of a ESP32-C3 using LEDC peripheral on an ESP32-C3 using assembly language (RISC-V) with ESP-IDF. I've started by ...
Léo Dupuy's user avatar
0 votes
0 answers
32 views

I'd like to trigger a GPIO when detecting a falling edge on my PWM. I want to do all of this within the same timer. For example: Timer 1: PWM Generation Timer 2: input capture indirect mode or ...
B.Adlane's user avatar
1 vote
0 answers
55 views

#include "Main.h" #define MAX_Intensity 1600 static volatile uint16_t Intensity = 10; void Timer4_Configuration(void) { TIM_TimeBaseInitTypeDef TIM_BaseStructure; ...
이석희's user avatar
0 votes
1 answer
87 views

I have set RCC on STM32F767ZI to 48 MHz (when setting to a higher frequency an error occurs, although in CubeMX with the same settings there is no error). rcc.cr.modify(|_, w| w.hsebyp().set_bit())...
Raul Alimbekov's user avatar
0 votes
1 answer
95 views

I wrote my code based on this topic, but it is not work. I'm using the stm32f7xx_hal crate, but I think the logic of my program is similar to the code from the example. My problem is that the duty ...
Raul Alimbekov's user avatar
0 votes
1 answer
277 views

Duty-cycle behaves strangely at high frequencies. While at 20 KHz the error is barely noticeable PWM of 20 KHz At 6 MHz it becomes obvious PWM of 6 MHz I use the STM32F11ce6 microcontroller. Clock ...
Raul Alimbekov's user avatar
2 votes
2 answers
413 views

I'm new here and I have some questions about generating a PWM signal for dimming an led using STM32 boards. I'm trying to generate the PWM only by writing the nessasarry bits with bit manipulation. ...
sebi's user avatar
  • 21
1 vote
1 answer
182 views

I am having issues with properly setting up the fast PWM mode 15 in my Arduino Uno (ATmega328). Most of the registers seem pretty straight-forward, but I am not sure about a few of them.. For example, ...
paxel's user avatar
  • 25
1 vote
1 answer
392 views

I am trying to write a program for the pi pico using Micropython to send pwm signals to a mosfet module to turn it on and off to send pulsed current through a DC electromagnet. The MOSFET switches ...
sab201's user avatar
  • 11
0 votes
1 answer
247 views

I wrote years ago a short c program for a Raspberry Pi (RPi3) using the pigpio library to send an infrared signal to a heating system. Still in use. The carrier frequency is 450 kHz, i.e., pretty fast ...
Al_'s user avatar
  • 83
0 votes
2 answers
83 views

I am trying to send PWM signals using STM32F100RBTx but it is not working. I double checked all the addresses but it is still the same. I wasn't sure if I was flashing at the beginning but I ...
Rynxie's user avatar
  • 69
0 votes
1 answer
163 views

The problem is that I'm expecting a low frequency (1.25khz) continuous square wave when writing to the PWM output of the ESP32 and what I get is regular/irregular pulsed PWM triangle wave with a 125hz ...
Brook's user avatar
  • 3
0 votes
0 answers
157 views

I have four square waves S1, S2, S3 and S4. All have 50% duty cycle. When S1 is on S2 is off (vice versa) and when S4 is on S3 is off (vice versa). I want to change the duty cycle of S1 and S3 to more ...
Himangshu Chetia's user avatar
0 votes
1 answer
563 views

I have a STM32F411 board and want to output a PWM signal using timers/PWM/DMA: once every 2 ms a, 16 pulses are sent, each representing one bit. Each pulse has a period of ~3 microseconds with varying ...
m3m3n70 m0r1's user avatar
0 votes
1 answer
696 views

I use NUCLEO-F042K6 board to generate a PWM signal. I use Timer2 for that purpose. Timer2 has 4 channels, but according to STM32F042x4 Datasheet CH1 cannot be redirected to physical pin. [ I still ...
Nemanja's user avatar
  • 33
0 votes
0 answers
58 views

I'm trying to "steer" my servo by using pwm. To make my code better, I refactor the FILE type out of the function so that the file is not being opened and closed with every call I make. But ...
John's user avatar
  • 857
1 vote
1 answer
272 views

I have an STM32F411 Black Pill board, and I am trying to simulate a rotary encoder with this. I want to generate two PWM signals, which are always 90 degrees out of phase, but have variable frequency. ...
eccentricOrange's user avatar
1 vote
3 answers
1k views

What is the difference between these two functions. __HAL_TIM_SET_AUTORELOAD(&htim3,45); __HAL_TIM_SET_COUNTER(&htim3,45); For example, if ı want to chance the Counter Period on the fly. ...
user avatar
0 votes
1 answer
347 views

I have an arduino Giga (STM32H7), and I'm trying to generate PWM's. I succeeded using alternate function AF9 of PA7 (digital pin 5), which uses TIM14_CH1. Now, using the exact same code (as far as I ...
Timeverdrive's user avatar
2 votes
0 answers
234 views

Goal: implementing a phase shift between PWM TIM1 and TIM8 (STM32F303CBT6). How will I do this: I will configure TIM1/TIM8 as MASTER/SLAVE and change the phase shift between them. TIM_SetCounter(TIM1, ...
Delta's user avatar
  • 147
0 votes
3 answers
3k views

I need to generate PWM in periods of 20ms and at a frequency of 50Hz. The pulse width (duty cycle) of the generated PWM should be between 1.5 and 2ms I'm using STM32f103c8t6 mcu and my APB2 peripheral ...
M0000's user avatar
  • 13
0 votes
1 answer
229 views

I made wrote this fairly simple code which sets output on LED pin to some analog number #include <Arduino.h> #include <IRremote.hpp> #define IR_RECEIVE_PIN 7 #define LED_PIN 11 uint16_t ...
Exenifix's user avatar
0 votes
1 answer
354 views

I'm using this code below trying to achieve a intensity transition effect upon turning on a light: void output2ControlTask(void *argument) { /* USER CODE BEGIN output2ControlTask */ uint32_t ...
Travis Su's user avatar
  • 709
0 votes
1 answer
445 views

I'm using Marlin on a BTT SKR MINI E3 V3.0 board (ARM Cortex M0+ STM32), and I'm trying to use a PWM signal to time a delay used to acquire images. I do the timing by counting a number of pulses in a ...
Bjm's user avatar
  • 123
-2 votes
1 answer
522 views

I am new to Arduino Mega. I am using it to build a switch mode regulator. I need to change Arduino Mega pin 2 and pin 3 PWM frequency to 10kHz or more than that. Appreciate if you can explain in ...
user42423's user avatar
  • 117
0 votes
1 answer
184 views

I am working on a project using an nRF52 Series MCU, where I am aiming to produce a sinusoidal PWM wave with a total period of approximately 6 seconds using the nRF52 SDK v.15.3.0. I have initialized ...
Flavio Andrade's user avatar
0 votes
1 answer
121 views

While the button is pressed, led is fade on gradually. Using pwm when the Brightness value is more than 255, the value is reset to 0 while the button is not pressed, the Brightness keeps brightest ...
kkwadk's user avatar
  • 1
-1 votes
1 answer
215 views

I would like to control the speed of various motors using a PIC and PCA9685. This following code allow me to start the rotation, but it does not reduce the speed void pca9685_Set_rate(int address, int ...
andrea ciuffoli's user avatar
1 vote
2 answers
2k views

Using my Arduino Mega 2560 I am trying to generate a PWM signal where I can change both PWM frequency and Duty Cycle. For that I decided to use Timer2 OC2A output. The code is the following one: void ...
rodolaf's user avatar
  • 29
0 votes
1 answer
427 views

Good morning, everyone, I am a firmware developer and am currently using the GD32F303R8T6 microcontroller to control a brushless motor. To control such a motor, I plan to use the timer peripheral ...
Aristide's user avatar
1 vote
0 answers
453 views

I'm attempting to activate PWM on pin PA6 of an Orange Pi One board. I've tried using a Device Tree Blob Overlay (DTBO) and accessing the sysfs interface, as well as using the WiringOP library, but I'...
Mathias Nichele's user avatar
0 votes
1 answer
2k views

I can generate 2 pwm signals with phase difference between them, but when I stop and restart, TIM2 PWM turn on with %100 Duty Cycle. I use Internal Triggering System to generate delay between to PWM. ...
Kaan Kurtça's user avatar
0 votes
1 answer
64 views

I managed to create a perfect square wave by using the 8-bit timer2 in ATmega88 running at 16 MHz. I also managed the change the OCR2A in the code and change the frequency of the signal as expected. I ...
cemox's user avatar
  • 21
1 vote
0 answers
101 views

I have been building a 6 degree of freedom industrial robot using stm32f091rc taking advantage of multiple timers to generate pwm pulses to rotate the robots' joint angles and to do forward and ...
persona's user avatar
  • 108
1 vote
2 answers
297 views

I want to generate some 4 software PWM signals on GPIO pins (5, 6, 19, and 26) on the Raspberry Pi 4B using the pigpio library (which is in C). I want to generate a PWM frequency of 8 kHz. I was able ...
BhavinT's user avatar
  • 332
0 votes
1 answer
467 views

I'm trying to measure the pulse width of a signal on the STM32G431RB, and I keep getting random values from the counter registers. I've checked the signal and it's fine (PWM Signal from a receiver). ...
Brandon's user avatar
0 votes
1 answer
1k views

I'm trying to create an overlay with for a pwm output for a pin in zephyr rtos , the overlay has pinctrl-1 and a pinctrl-name for pin configuration ,however a .dts file was already define with ...
j-leo7's user avatar
  • 11
-1 votes
1 answer
1k views

I want to build a project with an STM32G070. I need a couple of PWM pins. I look at the datasheet and user manual, and I cannot find anywhere if all pins of if only some are PWM capable and so, which ...
Nitrof's user avatar
  • 151
0 votes
1 answer
207 views

I'm trying to synthesize sound on the Arduboy, which is a handheld gaming device with an AVR ATMega32u4 microcontroller and a speaker attached between its pins C6 and C7. My plan is to use timer 4 to ...
Cactus's user avatar
  • 27.8k
-1 votes
2 answers
731 views

I'm trying to understand how to implement audio playback from scratch on attiny85. The goal is to play a short sound (cat meows, so i want it to remain recognizable) from an array representing ...
Nikolai Savulkin's user avatar
0 votes
0 answers
2k views

I am trying to blink the yellow and green LEDs on my CC32xx board. To do that I need to edit some code that was presented to me. I need to set duty for PWM1 to 90%, set duty for PWM2 to 10%, set the ...
FireMonkey's user avatar
2 votes
1 answer
176 views

I am trying to implement a PI controller in C that outputs / controls a PWM's duty cycle on a microcontroller. The duty cycle that I can write to the certain PWM control register is limited to 10bit (...
Alles Klar's user avatar

1
2 3 4 5
10