2018-03-17 12:07 AM
2018-03-17 06:19 AM
Link to your existing thread on the topic.
https://community.st.com/0D50X00009XkWlOSAV
I'm not aware of why writing the prescaler wouldn't work, but generally I modulate the Period or Pulse in an Update interrupt. Both Prescaler and Period are written as N-1 values, the prescaler is always limited to 16-bit.
Minimum requirements:
State clearly the model of STM32 being used from the outset
Provide complete compilable code, this can be a subset of the whole, but it needs to compile in a stand alone form. Code should include all defines, as well as clock and pin initialization.
Use the syntax high-lighter to post code.
If the code runs hundreds on lines, attach the C file as an attachment to the post.
If the code is spread across multiple files ZIP all files together and post a single file.
Failure to do these things will likely result in your post being ignored.
#
‌2018-03-19 01:21 AM
Thanks for your replay. I'll surely remember your suggestions in future posts. The code is working now. I've re-generated the whole code from STM32CubeMX with timer settings corrected after full deletion of rthe faulty project. Now everything is working fine. Thanks again.