Skip to content

Is there a way to enable HRTIM on F334? #1947

Closed Answered by Stefankante
Stefankante asked this question in Q&A
Discussion options

You must be logged in to vote

I tried with some guide from here https://sudonull.com/post/7101-Development-of-buck-converter-on-STM32F334-principle-of-operation-calculations-prototyping

and strip out all ADC related only PWM part remain, Tested LED works on PA8 and can be control with
HRTIM1->sTimerxRegs[0].CMP1xR = dutycycle; // 0-100%

But I have no idea how to control in style of analogWrite which only need to stated Frequency,Resolution,Level in that resolution.
Also does Generic STM32F334R8xx board setting make use of HSE on board?

#pragma once
#include "stm32f3xx.h"

void InitHRPWM (void);
void SetDutyTimerA (uint16_t duty);
void InitBasicADC (void);
extern void Delay (uint32_t setDelay);

uint16_t dutyControl = 0;

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
4 replies
@Stefankante
Comment options

@Stefankante
Comment options

@fpistm
Comment options

@Stefankante
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by fpistm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants