New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
User high resolution timer fix #20099
base: main
Are you sure you want to change the base?
Conversation
@dagar I removed hrt_store_absolute_time entirely |
Can you fix the CI failure (style check)? https://github.com/PX4/PX4-Autopilot/actions/runs/3035286435/jobs/4885259187 Otherwise this looks good, thanks. |
Oh I'm sorry, did not notice there was a styling issue. |
WARN [load_mon] usr_hrt low on stack! (96 bytes left)
Removed, as it is not needed
@dagar was there still something you wish for me to do? From my part this is ready to merge. |
Hello again @dagar , this has been inactive for a while but the fix is valid and we have been running this patch for a while now so it is stable as well. If you wish I can also abandon this and we'll keep the change in our private repo only. |
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-maintainers-call-august-01-2023/33417/1 |
Describe problem solved by this pull request
This fixes two crashes when using user hrt:
Describe your solution
User land code does not need to disable system interrupts, especially here, as the atomic handling of hrt is handled by the kernel side code.
Test data / coverage
Unpublished RISC-V target for Microchip MPFS.
Additional context
RISC-V does not allow executing global interrupt disable/enable from user space. Doing so results in an illegal instruction trap.