Skip to content
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

Is it safe to set a breakpoint in the breath control loop while the device is running live? #55

Open
chuckhacker opened this issue Aug 4, 2022 · 6 comments

Comments

@chuckhacker
Copy link

Is it safe to set a breakpoint in the breath control loop while the device is running live? Worried about damaging my device, thanks.

@Asmageddon
Copy link

I'd love to know this too, so pinging some contributors who might know, @osresearch, @wormyrocks, @colinoflynn.

@nbritton
Copy link

nbritton commented Dec 8, 2022

Well presumably the digital electronics are just sending PWM signals to the blower motor, so I would expect it to ether stop entirely or just keep sending the same signal. It might cause the blower to go high as a fail safe condition, as more air is better than no air, but I can't think of any obvious way that you could damage the blower, it won't spin faster than it's designed to go.

@colinoflynn
Copy link
Collaborator

I can't comment on impact on the device long-term, but I did set tons of break-points live with no obvious damage (smoking electronics).

@Asmageddon
Copy link

Thank you both for the replies :)

@colinoflynn, what was the behavior of the device while the execution was stopped? Did it keep blowing air at a constant speed? What happened after resuming execution?

@colinoflynn
Copy link
Collaborator

It's been a while, IIRC yes it just got stuck at some constant speed. The PWM etc is all running as a peripheral, so when the CPU core is stopped that is just going to be left at the last value.

@Asmageddon
Copy link

So I can confirm that no harm is done to the device by halting execution, the blower stops during it, and if you stop and resume it while it's idling it'll halt again in an error function but after resuming from that it's fine.

That said, I cannot recommend trying to debug it- it seems obvious in retrospect, but debugging decompiled firmware is ridiculously tough, and I am in awe that anyone is capable of it.

I tried to disable backup rate(machine-initiated breaths if you pause breathing) in ASV mode, and/or add the EasyBreathe exhale slope to S mode with EasyBreathe off, but I only managed to identify where the target pressure values are written, without figuring out where they're computed or how to alter any of the behavior. Ugh.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants