E
E
eegmak2021-03-05 18:45:37
STM
eegmak, 2021-03-05 18:45:37

How to send pulses with the required duration to the stm32f103 pin?

How to send a pulse to a stm32f103 pin with a duration similar to these values


tim_period = SystemCoreClock / 800000; // 0.125us period (10 times lower the 1.25us period to have fixed math below)
uint32_t cc1 = (10 * tim_period) / 36;
uint32_t cc2 = (10 * tim_period) / 15;

How to send a pack to a pin from a high level with a duration of ss1 and a low level with a duration of ss2?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vasily Bannikov, 2021-03-05
@vabka

Take and send. With Delay or with PWM. If this is part of a specific protocol, then look in the datasheet - maybe it has already been implemented.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question