cancel
Showing results for 
Search instead for 
Did you mean: 

PWM dosen't work when using external cystal clock.

KKIM.6
Senior

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

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

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

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

1 ACCEPTED SOLUTION

Accepted Solutions
TDK
Guru

 

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".

View solution in original post

2 REPLIES 2
TDK
Guru

 

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".

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.