Skip to content

Commit 1ca5e66

Browse files
committed
rp2: Enable SEVONPEND CPU interrupt bit.
Previously this was not set, so potential for race conditions in interrupt handlers this didn't issue SEV. (Which is currently all of them, as far as I can see.) Eventually we might be able to augment the interrupt handlers that wake the main thread to call SEV, and leave the others as-is to suspend the CPU slightly faster, but this will solve the issue for now. Signed-off-by: Angus Gratton <angus@redyak.com.au>
1 parent 368ae07 commit 1ca5e66

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

ports/rp2/main.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,9 @@ bi_decl(bi_program_feature_group_with_flags(BINARY_INFO_TAG_MICROPYTHON,
7373
BI_NAMED_GROUP_SEPARATE_COMMAS | BI_NAMED_GROUP_SORT_ALPHA));
7474

7575
int main(int argc, char **argv) {
76+
// tickless port, interrupts should always trigger SEV
77+
SCB->SCR |= SCB_SCR_SEVONPEND_Msk;
78+
7679
#if MICROPY_HW_ENABLE_UART_REPL
7780
bi_decl(bi_program_feature("UART REPL"))
7881
setup_default_uart();

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy