Search found 179 matches
- Wed Dec 28, 2022 6:19 pm
- Forum: General discussion
- Topic: Question about Bluepill arduino using OnePulse mode
- Replies: 33
- Views: 13817
Re: Question about Bluepill arduino using OnePulse mode
... if you tie the output line to a spare pin configured for input, then you can tell at any point in your code whether the timer is driving the line low or not.
I was thinking about this later, and maybe you don't even need a "spare" pin to do that. In https://www.stm32duino.com/viewtopic.php ...
- Wed Dec 28, 2022 11:51 am
- Forum: General discussion
- Topic: Question about Bluepill arduino using OnePulse mode
- Replies: 33
- Views: 13817
Re: Question about Bluepill arduino using OnePulse mode
I should have realised that you are using a Leaflabs/Libmaple based core, not the "official" STM one. For a long time now I have only used the STM core, so what I said before may not apply, but then the underlying hardware is the same so it is possible that you could run into similar problems.
The ...
The ...
- Tue Dec 27, 2022 8:20 pm
- Forum: General discussion
- Topic: Question about Bluepill arduino using OnePulse mode
- Replies: 33
- Views: 13817
Re: Question about Bluepill arduino using OnePulse mode
I'm not familiar with DHT11 at all, but two things come to mind:
Firstly, maybe you have run into a problem like here - https://www.stm32duino.com/viewtopic.php?f=7&t=1563 . That did result in a change to the hardwaretimer code, but it still may be necessary to move the Timer2.refresh() to after ...
Firstly, maybe you have run into a problem like here - https://www.stm32duino.com/viewtopic.php?f=7&t=1563 . That did result in a change to the hardwaretimer code, but it still may be necessary to move the Timer2.refresh() to after ...
- Tue Dec 27, 2022 11:31 am
- Forum: General discussion
- Topic: Question about Bluepill arduino using OnePulse mode
- Replies: 33
- Views: 13817
Re: Question about Bluepill arduino using OnePulse mode
Show us what you tried, and in what way did it not work?
- Tue Dec 27, 2022 5:19 am
- Forum: Projects
- Topic: STM32F103C8 Fast Input Rate Counter
- Replies: 23
- Views: 12554
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" to reset the timer ...
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" to reset the timer ...
- Sat Dec 24, 2022 7:26 am
- Forum: Projects
- Topic: STM32F103C8 Fast Input Rate Counter
- Replies: 23
- Views: 12554
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 ...
- Fri Dec 23, 2022 4:02 am
- Forum: Projects
- Topic: STM32F103C8 Fast Input Rate Counter
- Replies: 23
- Views: 12554
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 ...
- Thu Dec 22, 2022 7:37 pm
- Forum: Projects
- Topic: STM32F103C8 Fast Input Rate Counter
- Replies: 23
- Views: 12554
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 ...
- Thu Dec 22, 2022 11:11 am
- Forum: Projects
- Topic: STM32F103C8 Fast Input Rate Counter
- Replies: 23
- Views: 12554
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 ...
- Wed Dec 21, 2022 10:58 pm
- Forum: Projects
- Topic: STM32F103C8 Fast Input Rate Counter
- Replies: 23
- Views: 12554
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 ...
Maybe that is what you started with, but I do not follow what you are trying to do with that ...