Search found 9 matches

by kid_bengala
Fri Jun 09, 2023 6:35 pm
Forum: Projects
Topic: Read duty cycle of pwm signal
Replies: 9
Views: 12920

Re: Read duty cycle of pwm signal

Hello Sorry for the delay in responding, I was sick and could not follow up on this. I have tested the stm32duino example (https://github.com/stm32duino/STM32Examples/blob/main/examples/Peripherals/HardwareTimer/Frequency_Dutycycle_measurement/Frequency_Dutycycle_measurement.ino) and as I said, it w...
by kid_bengala
Fri Feb 24, 2023 5:33 pm
Forum: Projects
Topic: Read duty cycle of pwm signal
Replies: 9
Views: 12920

Re: Read duty cycle of pwm signal

Hello

I changed the pin from PB0 to PB3 and the example worked, why was this? I would like to know in order to learn. Thank you.

Regards.
by kid_bengala
Fri Feb 24, 2023 5:31 pm
Forum: Custom design boards
Topic: Calibrate HSI in custom board with stm32g030
Replies: 6
Views: 6788

Re: Calibrate HSI in custom board with stm32g030

Hello,

Just today I was investigating that, having found in ST that model of microcontroller. Thanks for the information!

Regards
by kid_bengala
Wed Feb 22, 2023 12:14 pm
Forum: Projects
Topic: Read duty cycle of pwm signal
Replies: 9
Views: 12920

Re: Read duty cycle of pwm signal

Hello Thanks all for reply. Not every pin can be used. Which pins can I use? I have modified the code by assigning Timer 3 and Timer1, but it still doesn't work. HardwareTimer *MyTim = new HardwareTimer(TIM3); https://i.ibb.co/kcwnvdF/Selecci-n-002.png If you cannot use interrupts for measuring, the...
by kid_bengala
Wed Feb 22, 2023 11:47 am
Forum: Custom design boards
Topic: Calibrate HSI in custom board with stm32g030
Replies: 6
Views: 6788

Re: Calibrate HSI in custom board with stm32g030

Hello! Thanks for the reply. I have oscilloscope and frequency meter up to 40 Mhz. I put a 32,768 Khz crystal on the chip, but I removed it because I didn't see any improvement in the code nor could I (or did I) configure it correctly. https://i.ibb.co/T4k8GRq/Selecci-n-003.png https://i.ibb.co/wWgr...
by kid_bengala
Fri Jan 27, 2023 6:38 pm
Forum: Custom design boards
Topic: Calibrate HSI in custom board with stm32g030
Replies: 6
Views: 6788

Re: Calibrate HSI in custom board with stm32g030

Hi

Is it not possible to do this with stm32duino?

Thanks

Regards
by kid_bengala
Fri Jan 27, 2023 6:36 pm
Forum: Projects
Topic: Read duty cycle of pwm signal
Replies: 9
Views: 12920

Re: Read duty cycle of pwm signal

In STM examples you have example that reads frequency and duty cycle. I have tried that example, changing the pin to the pin I use on my board (it was a gift) and it does not work. [19:22:28:154] Frequency = 0 Dutycycle = 0 [19:22:29:161] Frequency = 0 Dutycycle = 0 [19:22:30:152] Frequency = 0 Dut...
by kid_bengala
Sun Jan 15, 2023 11:45 pm
Forum: Projects
Topic: Read duty cycle of pwm signal
Replies: 9
Views: 12920

Read duty cycle of pwm signal

Hello, I want to read a PWM signal and know its duty cycle, for this I read a digital input and by pulseIn, I get a value that I divide by 10. It has been working, but I have noticed that if I raise the frequency or lower it, the value returned by PulseIn is altered, sometimes unrelated. For example...
by kid_bengala
Sun Jan 15, 2023 11:36 pm
Forum: Custom design boards
Topic: Calibrate HSI in custom board with stm32g030
Replies: 6
Views: 6788

Calibrate HSI in custom board with stm32g030

Hello, I am new to the forum and I have been looking for information about my question, I have not found anything, but maybe I have searched wrongly, I apologize if my question is duplicated. I have developed some boards with a stm32g030 microprocessor, which I put some 48 Mhz quartz crystals and tr...

Go to advanced search