My application is designed to generate HSTX data on core0 in interrupts, but also uses hardware SPI for SD card access.
It turns out that the amount of time spent in maskInterrupts/unmaskInterrupts with interrupts disabled, even with an empty _usingIRQs, is too long.
Add a quick check and avoid touching the interrupt disable flag if there's not actually any GPIO interrupt to (un)mask.
@ladyada this fixes the hstx video glitches during SPI SD card access
My application is designed to generate HSTX data on core0 in interrupts, but also uses hardware SPI for SD card access.
It turns out that the amount of time spent in `maskInterrupts`/`unmaskInterrupts` with interrupts disabled, even with an empty `_usingIRQs`, is too long.
Add a quick check and avoid touching the interrupt disable flag if there's not actually any GPIO interrupt to (un)mask.
@ladyada this fixes the hstx video glitches during SPI SD card access
earlephilhower
(Migrated from github.com)
left a comment
Copy Link
Copy Source
Wow, that's tight timing. I wonder if the STL is doing actual memory allocations/etc. in the for (auto x: y) iteration even with an empty list...
You'll need to adjust formatting using tools/restyle.sh or just manually indent/format the new short-circuit path to get through CI.
-edit- update formatting -edit-
if (_usingIRQs.empty()) {
return;
}
OTW, LGTM!
Wow, that's tight timing. I wonder if the STL is doing actual memory allocations/etc. in the `for (auto x: y)` iteration even with an empty list...
You'll need to adjust formatting using `tools/restyle.sh` or just manually indent/format the new short-circuit path to get through CI.
-edit- update formatting -edit-
````
if (_usingIRQs.empty()) {
return;
}
````
OTW, LGTM!
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
My application is designed to generate HSTX data on core0 in interrupts, but also uses hardware SPI for SD card access.
It turns out that the amount of time spent in
maskInterrupts/unmaskInterruptswith interrupts disabled, even with an empty_usingIRQs, is too long.Add a quick check and avoid touching the interrupt disable flag if there's not actually any GPIO interrupt to (un)mask.
@ladyada this fixes the hstx video glitches during SPI SD card access
Wow, that's tight timing. I wonder if the STL is doing actual memory allocations/etc. in the
for (auto x: y)iteration even with an empty list...You'll need to adjust formatting using
tools/restyle.shor just manually indent/format the new short-circuit path to get through CI.-edit- update formatting -edit-
OTW, LGTM!
Thanks, I've tried to update the branch with the correct style.
Third time's the charm. 😆
thank you