It is in the bootrom section of the RP2350 datasheet (in the list of bootrom functions) - it is also in bootrom.h in the SDK as rom_flash_op and thus should be in the SDK docs. The datasheet docs are not super helpful it seems so i will update them for the next releaseCan you give me a pointer where that's described and examples on how to use it ?You can use the `flash_op()` bootrom API to read/write/erase flash using untranslated addresses (or it can do translated addresses,
Nope, this code still works - it accesses the memory via ROM flash functions (the older versions like `flash_program` and `flash_erase`) which work with untranslated addresses.Would I need to edit the Bluetooth stack to prevent that crashing when it reads from and writes to the last two sectors of Flash ?
TLDR it is only the memory mapped stuff that is affected by address translation
Its in bootrom_constants.h; i assumed you could/would just search for itWhere's that at ?see CFLASH_ASPACE_)
This is what your sample code is trying to do (and probably what you want)I may but I have no idea if I'd want to or not. Would that be the best way ? How would I decide ?Of course you may want to read from the XIP directly.
The registers are described in the datasheet - the "what the bootrom would have done" i'll make clearer in the updated docs. Not sure that there is an exampleCan you give me a pointer where that's described and some example on how to do that ?You can either remap one of the other 4M regions to point at it - the bootrom will have made region starting at 0x10400000 sized 0 if the image isn't >4M big.
Where would I put that, and how do I use it ? Is there an example ?Or you can use the #define XIP_NOCACHE_NOALLOC_NOTRANSLATE_BASE _u(0x1c000000) to read untranslated memory without use of the windows from secure code (though it won't be cached)If you or someone could update that so it does read the locations specified without hanging that's probably enough to move on.Code:
#define BOT_ADDRESS 0x10200000 // Top 2 MB of 4 MB Flash#define TOP_ADDRESS 0x103FFFFC
Code:
// use untranslated window starting at 0x1C000000#define BOT_ADDRESS 0x1C200000 // Top 2 MB of 4 MB Flash#define TOP_ADDRESS 0x1C3FFFFCit willHow's integrating file system support with the Pico SDK coming along ? I presume that will work with RP2040, RP235X partitioned and non-partitioned, will do what I am after ?
Statistics: Posted by kilograham — Fri May 02, 2025 4:53 pm