Why the esc_status frequency is much lower than Dshot frequency when bidirectional dshot is enabled

Dear all,

I am curious about what determines the frequency of the bidirectional DShot feedback (ESC status). When I attempt direct motor control via ROS2 at a frequency of 500 Hz, I observe the following in the working queue, indicating that the DShot is running at 500 Hz:

Work Queue: 10 threads                          RATE        INTERVAL
|__ 1) wq:rate_ctrl    
|   |__ 1) control_allocator                 20.0 Hz        49996 us
|   |__ 2) dshot                            500.0 Hz         2000 us
|   |__ 3) mc_rate_control                 2003.1 Hz          499 us
|   \__ 4) vehicle_angular_velocity        2003.1 Hz          499 us
|__ 2) wq:SPI1         
...

I have increased the DDS frequency under the suggestion mentioned in this question

However, the frequency of esc_status is only ~45 Hz by ros2 topic hz /fmu/out/esc_status.

average rate: 42.159
	min: 0.015s max: 0.051s std dev: 0.01121s window: 43
average rate: 42.865
	min: 0.014s max: 0.083s std dev: 0.01229s window: 87
average rate: 42.028
	min: 0.014s max: 0.083s std dev: 0.01260s window: 128
average rate: 44.132
	min: 0.009s max: 0.083s std dev: 0.01174s window: 179
average rate: 45.366
	min: 0.009s max: 0.083s std dev: 0.01109s window: 230
average rate: 45.637
	min: 0.009s max: 0.083s std dev: 0.01079s window: 278
average rate: 45.315
	min: 0.009s max: 0.083s std dev: 0.01099s window: 323

I also noticed that when I decrease the Dshot frequency, the frequency of esc_status decreases as well. Is there any correlation between the two?

Additionally, I’m wondering how I can increase the feedback frequency of the esc_status.

Thank you all!

@Benja @farhang sorry to bother you, but I would really appreciate it if you or someone you know is familiar with the Dshot component. :face_holding_back_tears:

Bidirectional DShot is available for fmuv6xrt fmuv6xrt implement bidirectional dshot by PetervdPerk-NXP · Pull Request #22583 · PX4/PX4-Autopilot · GitHub

Are you using that board?

General Bidirectional DShot is still an open PR: [Sponsored by ARK] Bidirectional DShot by dakejahl · Pull Request #23863 · PX4/PX4-Autopilot · GitHub

Are you testing that branch or are you using the standard DShot telemetry over serial port? Parameter Reference | PX4 Guide (main)

Yes, I am testing it with a serial port

and I am testing with the main branch, using the hkust_nxt-dual_default board.

Based on my understanding, the bidirectional DShot protocol allows for obtaining ERPM feedback at a frequency matching the DShot motor control frequency (i.e., over 2000 Hz), without requiring telemetry over the serial port. However, as I’m reviewing the firmware, I’m uncertain if this functionality is supported in PX4. Part of my knowledge comes from the Betaflight documentation, as outlined below:

I am looking to implement a closed-loop motor speed control system based on ERPM feedback, and I hope the feedback frequency can match the control frequency. Could I kindly ask if, based on your knowledge, this is feasible? @Benja

I found that I was unable to enable bidirectional DShot, but I did receive ERPM data via telemetry. My hardware is this, and I’m wondering, in addition to enabling DSHOT_BIDIR_EN, what other configurations are necessary to fully enable bidirectional DShot?