Quantcast
Viewing all articles
Browse latest Browse all 4890

SDK • How to disable all interrupts and freezes on core1?

I have written code to simulate a ROM chip which requires responding to enable line and address line changes within about 50ns in a tight loop. I have the ROM simulation code running on core1 with core0 handling USB communication and other tasks.

The issue is when sending serial data to the Pico over USB it will cause core1 to stutter and crash the computer it's hooked up to by failing to keep the line timings required. I can work around this in hardware but would like to find the source of the interrupts and remove them.

Things I've tried in the C code:

__asm volatile ("cpsid i");
bus_ctrl_hw->priority = BUSCTRL_BUS_PRIORITY_PROC1_BITS;
( These both run in the core1 process )

Things I've set in CMakefile:

set(PICO_DEFAULT_BINARY_TYPE copy_to_ram)
set(PICO_COPY_TO_RAM,1)

Any hints on what to try next? I've overclocked it to 250MHz so I can't easily just get more speed out of it.

Statistics: Posted by iansmith6 — Sat Apr 20, 2024 4:53 pm



Viewing all articles
Browse latest Browse all 4890

Trending Articles