feat: configurable board pwm freq from Kconfig
Solved Problem
Allows for configurable board PWM frequency from Kconfig. For slow PWMs (like 10Hz) this value needs to change due to timer overflow on a 16bit register.
Solution
- Add options to Kconfig and proper setting on platforms/nuttx
Changelog Entry
For release notes:
New parameter: CONFIG_BOARD_PWM_FREQUENCY
Alternatives
None me and @dagar could think of.
Test coverage
- Unit/integration test: -
- Simulation/hardware testing logs: -
Context
Spacecraft solenoid valves requiring slow PWM.
@dagar all fixed, shold be good to go.
Looks good now, but submodule changes slipped in.
did you mean to include the gz submodule changes @Pedro-Roque ?
This pull request has been mentioned on Discussion Forum for PX4, Pixhawk, QGroundControl, MAVSDK, MAVLink. There might be relevant details there:
https://discuss.px4.io/t/px4-dev-call-june-4-2025-team-sync-and-community-q-a/45866/1
@mrpollo fixed
🔎 FLASH Analysis
px4_fmu-v5x [Total VM Diff: 8 byte (0 %)]
FILE SIZE VM SIZE
-------------- --------------
+0.0% +8 +0.0% +8 .text
+0.0% +55 [ = ] 0 .debug_abbrev
+0.0% +3 [ = ] 0 .debug_info
-0.0% -2 [ = ] 0 .debug_line
+250% +5 [ = ] 0 [Unmapped]
-0.0% -7 [ = ] 0 [section .debug_line]
-0.1% -8 [ = ] 0 [Unmapped]
+0.0% +56 +0.0% +8 TOTAL
px4_fmu-v6x [Total VM Diff: 8 byte (0 %)]
FILE SIZE VM SIZE
-------------- --------------
+0.0% +8 +0.0% +8 .text
+0.0% +55 [ = ] 0 .debug_abbrev
+0.0% +3 [ = ] 0 .debug_info
-0.0% -2 [ = ] 0 .debug_line
+250% +5 [ = ] 0 [Unmapped]
-0.0% -7 [ = ] 0 [section .debug_line]
-0.1% -8 [ = ] 0 [Unmapped]
+0.0% +56 +0.0% +8 TOTAL
Updated: 2025-07-23T11:57:57
@PetervdPerk @PetervdPerk-NXP I set the Kconfig to look for the ARCH_CHIP but it seems that these variables are not set at boardconfig time, as right now the platforms menu is empty. I'm probably missing something obvious, any pointers I should look at?
Edit: Notes for discussion:
- grab .config generated by menuconfig to take board type? Would go merged in Tools/kconfig/updateconfig.py
- add to boardconfig CHIP and ARCH / parse these into new variables?
This pull request has been mentioned on Discussion Forum for PX4, Pixhawk, QGroundControl, MAVSDK, MAVLink. There might be relevant details there:
https://discuss.px4.io/t/px4-dev-call-june-25-2025-team-sync-and-community-q-a/46161/1
This pull request has been mentioned on Discussion Forum for PX4, Pixhawk, QGroundControl, MAVSDK, MAVLink. There might be relevant details there:
https://discuss.px4.io/t/px4-dev-call-july-2-2025-team-sync-and-community-q-a/46266/3
This pull request has been mentioned on Discussion Forum for PX4, Pixhawk, QGroundControl, MAVSDK, MAVLink. There might be relevant details there:
https://discuss.px4.io/t/px4-dev-call-july-16-2025-team-sync-and-community-q-a/46513/3