Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 8015

General • RP2350 address translation

$
0
0
I've setup A and B partitions for my FW. The bootrom happily overwrites the older versioned partition when I drag and drop a uf2 file. All good.

My A and B partitions are only 200 K each. Now I want to use the rest of flash to store data I receive via UART and send it out again via UART later. I get a hard fault when I try to access XIP_BASE + an offset larger than 200 K. This is expected. The datasheet says, "Accessing flash addresses beyond the size of the booted partition (but below the 0x11000000 chip select watermark) returns a bus fault".

What is the best way access the rest of flash?

At the start of main() I see the ATRANS registers have this state, which seem reasonable:
ATRANS0 = 0x00320002
ATRANS1 = 0x00000034
ATRANS2 = 0x00000034
ATRANS3 = 0x00000034
ATRANS4 = 0x04000000
ATRANS5 = 0x04000400
ATRANS6 = 0x04000800
ATRANS7 = 0x04000c00

I reckon that means ATRANS4's window should be an untranslated view of the first 4 megs of flash. But it isn't. The debugger to shows lots of repeating "00 00 4c cc cc cc cc cc" there.

If instead, I point the debugger's memory viewer at XIP_NOCACHE_NOALLOC_NOTRANSLATE_BASE window (at 0x1c00'0000) I do see what appears to be the start of flash.

Have I misunderstood how ATRANS4 works?

Statistics: Posted by Andy B the third — Tue Mar 25, 2025 10:09 am



Viewing all articles
Browse latest Browse all 8015

Trending Articles