475 questions
0
votes
0
answers
42
views
SAM3X8E / Arduino Due: Timer/Counter not generating PWM on TIOB0 (PB27) — output stuck HIGH
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 ...
1
vote
1
answer
173
views
How to use LL drivers on an STM32 to generate PWM deadtime
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 ...
1
vote
0
answers
48
views
Very Specific Combination of Servo.write and analogWrite messes up frequencies on esp32 PWM pins
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 ...
1
vote
0
answers
49
views
Measure PWM Duty Cycle with Pic
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 ...
0
votes
0
answers
125
views
LEDC PWM in RISC-V assembly on ESP32-C3 using ESP-IDF
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 ...
0
votes
0
answers
7
views
Pulse with Modulation Synchronization in TI Tiva Through Keil uVision
I am trying to actuate individual servo actuators (S51 Micro Servo) using the onboard PWM modules in a delay sequence. The Tiva datasheet states it can be done but I am unable to figure it out. I ...
0
votes
1
answer
83
views
PWM configured via DMA does not work properly at high speeds
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())...
0
votes
1
answer
269
views
Rust Embassy SimplePwm waveform functions don't work as intended
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 ...
1
vote
1
answer
174
views
ATmega328 Timer1 Fast PWM Mode 15 Not properly set up
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, ...
0
votes
1
answer
235
views
Looking for library supporting hardware PWM on RPi3 (not using sysfs)
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 ...
0
votes
1
answer
157
views
ESP32 pulsed PWM at low frequencies
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 ...
0
votes
1
answer
538
views
Orchestration of DMA transfer to PWM peripheral on STM32
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 ...
0
votes
0
answers
58
views
Servo motor doesn't respond
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 ...
1
vote
3
answers
1k
views
What is the difference between SET_AUTORELOAD And SET_COUNTER
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. ...
2
votes
0
answers
231
views
What is the best way to convert ticks to degrees for PWM phase shift (STM32)?
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, ...
0
votes
1
answer
226
views
Arduino breaking both IR input and PWM output when used together
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 ...
0
votes
1
answer
424
views
STM32 PWM first pulse width varies
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 ...
0
votes
1
answer
173
views
Achieving a 6-second period for a PWM Wave using nRF52 Series PWM Driver in C
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 ...
-1
votes
1
answer
209
views
Control fan speed with PCA9685 and a PIC [closed]
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 ...
0
votes
1
answer
410
views
GD32F303RBT6 - TIMER_0 - PWM Settings
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 ...
0
votes
1
answer
1k
views
STM32 2 PWM Generation with phase difference using TIM1 and TIM2. TIM2 PWM does not turn on properly when i stop it and restart
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.
...
1
vote
0
answers
100
views
Timer 3 PWM generation works but doesn't rotate the servo
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 ...
0
votes
1
answer
462
views
STM32 Timer registers (PWM Measurement) Not working
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).
...
-1
votes
1
answer
1k
views
stm32 with pin PWM capable : datasheet?
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 ...
-1
votes
2
answers
721
views
play audio with pwm of a attiny85
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 ...