Skip to main content
KKIM.6
Senior
August 22, 2023
Solved

PWM dosen't work when using external cystal clock.

  • August 22, 2023
  • 2 replies
  • 1238 views

저는 cubeMX와 IDE를 사용하여 PWM 신호를 생성하려고 합니다.

32MHz 내부 클럭 소스(MSI)를 사용했을 때 PWM 신호 생성에 성공했습니다.

블루투스 모듈을 사용해야 하기 때문에 클록 소스를 외부 수정으로 변경했는데 PWM이 더 이상 작동하지 않습니다.

누구든지 이것에 대한 해결책을 알고 있습니까?

This topic has been closed for replies.
Best answer by TDK

 

I'm trying to generate a PWM signal using cubeMX and IDE. When using a 32 MHz internal clock source (MSI), PWM signal generation was successful. I changed the clock source to an external crystal because I need to use the bluetooth module and the PWM no longer works. Anyone know a solution to this?

 

Probably your clock initialization failed and it's stuck in startup and never reaches the PWM code.

 

2 replies

TDK
TDKBest answer
August 22, 2023

 

I'm trying to generate a PWM signal using cubeMX and IDE. When using a 32 MHz internal clock source (MSI), PWM signal generation was successful. I changed the clock source to an external crystal because I need to use the bluetooth module and the PWM no longer works. Anyone know a solution to this?

 

Probably your clock initialization failed and it's stuck in startup and never reaches the PWM code.

 

"If you feel a post has answered your question, please click ""Accept as Solution""."
KKIM.6
KKIM.6Author
Senior
August 23, 2023

I successfully generated PWM using an external crystal HSE source using a new project.

Now, it works very well and the generated signal is more accurate than MSI.

I cannot understand why it didn't work before.

Anyway, thanks.