File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change 2626
2727#if defined(PICO_RP2350) && defined(RP2350_PSRAM_CS)
2828static void __no_inline_not_in_flash_func (flushcache)() {
29- for ( volatile uint8_t * cache = ( volatile uint8_t *) 0x18000001 ; cache < ( volatile uint8_t *)( 0x18000001 + 2048 * 8 ); cache += 8 ) {
30- *cache = 0 ;
31- __compiler_memory_barrier ();
32- *(cache - 1 ) = 0 ;
33- __compiler_memory_barrier () ;
29+ // From https://forums.raspberrypi.com/viewtopic.php?t=378249#p2263677
30+ // Perform clean-by-set/way on all lines
31+ for ( uint32_t i = 0 ; i < 2048 ; ++i) {
32+ // Use the upper 16k of the maintenance space (0x1bffc000 through 0x1bffffff):
33+ *( volatile uint8_t *)(XIP_SRAM_BASE + (XIP_MAINTENANCE_BASE - XIP_BASE) + i * 8u + 0x1u ) = 0 ;
3434 }
3535}
3636#elif defined(PICO_RP2350)
You can’t perform that action at this time.
0 commit comments