Search found 146 matches

by ozcar
Tue Dec 27, 2022 11:31 am
Forum: General discussion
Topic: Question about Bluepill arduino using OnePulse mode
Replies: 33
Views: 3958

Re: Question about Bluepill arduino using OnePulse mode

Show us what you tried, and in what way did it not work?
by ozcar
Tue Dec 27, 2022 5:19 am
Forum: Projects
Topic: STM32F103C8 Fast Input Rate Counter
Replies: 23
Views: 5640

Re: STM32F103C8 Fast Input Rate Counter

Good to hear that you are making progress. A few comments: Like "counter", "Direction" should be declared as volatile. It may be reasonable to assume, or maybe you know for sure, that there will not be a step pulse very close to a change of direction, so it might be "safe&qu...
by ozcar
Sat Dec 24, 2022 7:26 am
Forum: Projects
Topic: STM32F103C8 Fast Input Rate Counter
Replies: 23
Views: 5640

Re: STM32F103C8 Fast Input Rate Counter

I notice you are not using the overflow counter there. Maybe that is OK because you periodically reset the TIM1 counter in the TIM2 ISR, but then if you are not using the overflow counter you might as well take out the TIM1 overflow ISR. I'm also not sure how often you really want to call the TIM2 I...
by ozcar
Fri Dec 23, 2022 4:02 am
Forum: Projects
Topic: STM32F103C8 Fast Input Rate Counter
Replies: 23
Views: 5640

Re: STM32F103C8 Fast Input Rate Counter

I took your last test program and modified it to alter the timer to count external signal, instead of using the internal clock. It did not take much to do that, but it is far from being a generalised solution. It does not make any assumption about which timer will be used, but does assume that the i...
by ozcar
Thu Dec 22, 2022 7:37 pm
Forum: Projects
Topic: STM32F103C8 Fast Input Rate Counter
Replies: 23
Views: 5640

Re: STM32F103C8 Fast Input Rate Counter

40,000-80,000 inputs per second if that is possible. That would translate to a max speed of 500mm/s at 16-32 micristeps the current code is able to process 8000 inputs per second, which is just around 100 mm/s I took the frequency / duty cycle example, and changed it to only interrupt on rising edg...
by ozcar
Thu Dec 22, 2022 11:11 am
Forum: Projects
Topic: STM32F103C8 Fast Input Rate Counter
Replies: 23
Views: 5640

Re: STM32F103C8 High Frequency Input Counter

Is it a signal from the AS5600 that you have connected to EX_STEP_PIN / PA8? I'm not familiar with AS5600, but from the data sheet that I turned up now, that can produce either an analog output or PWM output. If that is set to generate PWM output, and that is what you have connected to EX_STEP_PIN /...
by ozcar
Wed Dec 21, 2022 10:58 pm
Forum: Projects
Topic: STM32F103C8 Fast Input Rate Counter
Replies: 23
Views: 5640

Re: STM32F103C8 High Frequency Input Counter

There is a frequency measurement example at https://github.com/stm32duino/STM32Examples/blob/main/examples/Peripherals/HardwareTimer/Frequency_Dutycycle_measurement/Frequency_Dutycycle_measurement.ino Maybe that is what you started with, but I do not follow what you are trying to do with that counte...
by ozcar
Sun Dec 18, 2022 2:29 am
Forum: General discussion
Topic: Timer config for frequency measurement
Replies: 7
Views: 2133

Re: Timer config for frequency measurement

For synchronous timers, the max speed is half of the mcu's clock speed. For the STM32 timers it does seem to be that the max rate is 1/2 the timer clock. But the documentation gives different answers in different places. I just noticed that one section of the cookbook even disagrees with itself - w...
by ozcar
Sat Dec 17, 2022 7:28 pm
Forum: General discussion
Topic: STM32 TVout Upgrade to Work with Video Overlay - Help Needed
Replies: 7
Views: 1619

Re: STM32 TVout Upgrade to Work with Video Overlay - Help Needed

How would I use "set_vbi_hook() " ?? Sorry, way beyond my pay grade. I have not looked at TVOut before, and I only saw that function mentioned in a comment in the STM32 TTVout.cpp. For all I know, maybe the comment translates to "did not implement this" or "impossible"...
by ozcar
Sat Dec 17, 2022 6:56 am
Forum: General discussion
Topic: STM32 TVout Upgrade to Work with Video Overlay - Help Needed
Replies: 7
Views: 1619

Re: STM32 TVout Upgrade to Work with Video Overlay - Help Needed

Wait, so if I attach a hardware interrupt falling edge to say pin PB3 (which the datasheet says is TIM2_CH2), when I pull PB3 LOW, will that automatically reset TIM2_CH2? Have you got any of the demos that come with the STM32 TVOUT to work? From what I can see, the OverlayDemo does not reset the ti...

Go to advanced search