RAK11720 PWM only achieve 38.5% of duty

  • What product do you wish to discuss? RAK4631, RAK3372, RAK11200, RAK11310, RAK11722?
    RAK11720
  • What firmware are you using? (RUI3 or Arduino BSP or other IDE (e.g. STM32CubeIDE)?
    RUI3 Ver 4.1.1
  • What firmware version? Can it be obtained with AT+VER=?
    Ver 4.1.1
  • Computer OS? (MacOS, Linux, Windows)
    Windows
  • What Computer OS version?
    10 pro
  • How often does the problem happen?
    RAK11720 PWM only achieve 38.5% of duty cycle we need 0 to 100%
  • How can we replicate the problem?
    Sample code Arduino_Led_Breathing
  • Provide source code if custom firmware is used or link to example if RAKwireless example code is used.

Doesn’t help if you post the same question twice.

No answer available at the moment.

Thanks beegee
this answer help me

@wilgaced

Sorry for taking so long.
It will be fixed in the next release of RUI3, Here I am setting PWM in steps 1, 32, 64, 96, … 224, 254 and back::
2024-03-06-13-31-10

You can patch the current file in the BSP if you want to test:
Inside the BSP look for ...Arduino15\packages\rak_rui\hardware\apollo3\4.1.1\cores\apollo3\component\core\mcu\apollo3\uhal\uhal_pwm.c
Search for int32_t uhal_pwm_set_duty(udrv_pwm_port port, uint32_t duty)
Change the function (only 8bit resolution is fixed yet) like this: