I wanted to add this info to my previous ticket, but there was no option to reply. Just an FYI, here is the link:
So after doing some more research I found a link (from Hakon) where he had attached a littlefs.zip that shows how to configure the 64MB flash device as a file system. That was very beneficial, but I really don't want the file system. I'd prefer to access the flash using low-level calls like:
flash_area_open(FLASH_AREA_ID(storage), &my_area
-or-
flash_dev = device_get_binding(DT_CHOSEN_ZEPHYR_FLASH_CONTROLLER_LABEL)
flash_read(flash_dev, ...,...);
Is there a way I can modify the overlay to provide that type of access for the external flash? Here is the overlay I'm using:
/ {
chosen {
nordic,pm-ext-flash = &mx25r64;
};
};
&spi3 {
status = "okay";
sck-pin = <13>;
mosi-pin = <11>;
miso-pin = <12>;
cs-gpios = <&gpio0 25 GPIO_ACTIVE_LOW>;
mx25r64: mx25r6435f@0 {
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <8000000>;
label = "MX25R64";
jedec-id = [c2 28 17];
sfdp-bfp = [
e5 20 f1 ff ff ff ff 03 44 eb 08 6b 08 3b 04 bb
ee ff ff ff ff ff 00 ff ff ff 00 ff 0c 20 0f 52
10 d8 00 ff 23 72 f5 00 82 ed 04 cc 44 83 68 44
30 b0 30 b0 f7 c4 d5 5c 00 be 29 ff f0 d0 ff ff
];
size = <67108864>;
has-dpd;
t-enter-dpd = <10000>;
t-exit-dpd = <35000>;
};
};