Ok, I find out that problem in Prescaler value for Timer + Counter Period, which are too high, but how I can decrease them?
I need Prescaler value as 1 and Counter-Period value from around 15-31.
Maybe there a way to update API and add new methods which introduce that values as params?
RUI3 abstracts different commonly used functionalities (inspired with Arduino) to different MCUs like ST, Nordic and Apollo.
Tone is a generic feature that can be used in different use case. However, making counter period for ST configurable will require as to exposed it for Nordic and Apollo as well since RUI3 API should work on all MCUs.
Counter period modification is low level already and if you need a very low counter-period, you will need to directly configure the STM32Wl registers and not via RUI3 API.
But I would highly recommend add one more PWM function to your Arduino API to let users set Prescaler and Period for PWM timers + update documentation in relation to PWN, because now it is not really clear which PWM pins devs able to use.
Thanks!