ZMS Storage limitations

Hi there, I am developing a bluetooth application and would like to have some on board temperature logging as well. I am using ZMS to do this, with an 8 byte struct. I notice that this means every temperature record uses 1 ATE which is 16 Bytes, It seems somewhat wasteful to use half of the storage space I have as an overhead for ZMS. Is there a more space efficient solution to do this ?
I am also interested in increasing the partition space but there are these image slots that are using up the rest of the space (device tree portion pasted below). Do you know if I can take over these if I want to use OTA FW update in the future ? 

        /* node '/soc/rram-controller@5004b000' defined in zephyr\dts\vendor\nordic\nrf54l_05_10_15.dtsi:732 */

                rram_controller: rram-controller@5004b000 {

                        compatible = "nordic,rram-controller"; /* in zephyr\dts\vendor\nordic\nrf54l_05_10_15.dtsi:733 */

                        reg = < 0x5004b000 0x1000 >;           /* in zephyr\dts\vendor\nordic\nrf54l_05_10_15.dtsi:734 */

                        #address-cells = < 0x1 >;              /* in zephyr\dts\vendor\nordic\nrf54l_05_10_15.dtsi:735 */

                        #size-cells = < 0x1 >;                 /* in zephyr\dts\vendor\nordic\nrf54l_05_10_15.dtsi:736 */

                        interrupts = < 0x4b 0x1 >;             /* in zephyr\dts\vendor\nordic\nrf54l_05_10_15.dtsi:737 */

                        /* node '/soc/rram-controller@5004b000/rram@0' defined in zephyr\dts\vendor\nordic\nrf54l_05_10_15.dtsi:739 */

                        cpuapp_rram: rram@0 {

                                compatible = "soc-nv-flash";   /* in zephyr\dts\vendor\nordic\nrf54l_05_10_15.dtsi:740 */

                                erase-block-size = < 0x1000 >; /* in zephyr\dts\vendor\nordic\nrf54l_05_10_15.dtsi:741 */

                                write-block-size = < 0x10 >;   /* in zephyr\dts\vendor\nordic\nrf54l_05_10_15.dtsi:742 */

                                reg = < 0x0 0x165000 >;        /* in zephyr\dts\vendor\nordic\nrf54l15.dtsi:28 */

                                /* node '/soc/rram-controller@5004b000/rram@0/partitions' defined in nrf54l15-connectkit\boards\makerdiary\nrf54l15_connectkit\nrf54l15_connectkit_nrf54l15_cpuapp.dts:23 */

                                partitions {

                                        compatible = "fixed-partitions"; /* in nrf54l15-connectkit\boards\makerdiary\nrf54l15_connectkit\nrf54l15_connectkit_nrf54l15_cpuapp.dts:24 */

                                        #address-cells = < 0x1 >;        /* in nrf54l15-connectkit\boards\makerdiary\nrf54l15_connectkit\nrf54l15_connectkit_nrf54l15_cpuapp.dts:25 */

                                        #size-cells = < 0x1 >;           /* in nrf54l15-connectkit\boards\makerdiary\nrf54l15_connectkit\nrf54l15_connectkit_nrf54l15_cpuapp.dts:26 */

                                        /* node '/soc/rram-controller@5004b000/rram@0/partitions/partition@0' defined in nrf54l15-connectkit\boards\makerdiary\nrf54l15_connectkit\nrf54l15_connectkit_nrf54l15_cpuapp.dts:27 */

                                        boot_partition: partition@0 {

                                                label = "mcuboot";     /* in nrf54l15-connectkit\boards\makerdiary\nrf54l15_connectkit\nrf54l15_connectkit_nrf54l15_cpuapp.dts:28 */

                                                reg = < 0x0 0x10000 >; /* in nrf54l15-connectkit\boards\makerdiary\nrf54l15_connectkit\nrf54l15_connectkit_nrf54l15_cpuapp.dts:29 */

                                        };

                                        /* node '/soc/rram-controller@5004b000/rram@0/partitions/partition@10000' defined in nrf54l15-connectkit\boards\makerdiary\nrf54l15_connectkit\nrf54l15_connectkit_nrf54l15_cpuapp.dts:31 */

                                        slot0_partition: partition@10000 {

                                                label = "image-0";         /* in nrf54l15-connectkit\boards\makerdiary\nrf54l15_connectkit\nrf54l15_connectkit_nrf54l15_cpuapp.dts:32 */

                                                reg = < 0x10000 0x51000 >; /* in nrf54l15-connectkit\boards\makerdiary\nrf54l15_connectkit\nrf54l15_connectkit_nrf54l15_cpuapp.dts:33 */

                                        };

                                        /* node '/soc/rram-controller@5004b000/rram@0/partitions/partition@61000' defined in nrf54l15-connectkit\boards\makerdiary\nrf54l15_connectkit\nrf54l15_connectkit_nrf54l15_cpuapp.dts:35 */

                                        slot0_ns_partition: partition@61000 {

                                                label = "image-0-nonsecure"; /* in nrf54l15-connectkit\boards\makerdiary\nrf54l15_connectkit\nrf54l15_connectkit_nrf54l15_cpuapp.dts:36 */

                                                reg = < 0x61000 0x51000 >;   /* in nrf54l15-connectkit\boards\makerdiary\nrf54l15_connectkit\nrf54l15_connectkit_nrf54l15_cpuapp.dts:37 */

                                        };

                                        /* node '/soc/rram-controller@5004b000/rram@0/partitions/partition@b2000' defined in nrf54l15-connectkit\boards\makerdiary\nrf54l15_connectkit\nrf54l15_connectkit_nrf54l15_cpuapp.dts:39 */

                                        slot1_partition: partition@b2000 {

                                                label = "image-1";         /* in nrf54l15-connectkit\boards\makerdiary\nrf54l15_connectkit\nrf54l15_connectkit_nrf54l15_cpuapp.dts:40 */

                                                reg = < 0xb2000 0x51000 >; /* in nrf54l15-connectkit\boards\makerdiary\nrf54l15_connectkit\nrf54l15_connectkit_nrf54l15_cpuapp.dts:41 */

                                        };

                                        /* node '/soc/rram-controller@5004b000/rram@0/partitions/partition@103000' defined in nrf54l15-connectkit\boards\makerdiary\nrf54l15_connectkit\nrf54l15_connectkit_nrf54l15_cpuapp.dts:43 */

                                        slot1_ns_partition: partition@103000 {

                                                label = "image-1-nonsecure"; /* in nrf54l15-connectkit\boards\makerdiary\nrf54l15_connectkit\nrf54l15_connectkit_nrf54l15_cpuapp.dts:44 */

                                                reg = < 0x103000 0x51000 >;  /* in nrf54l15-connectkit\boards\makerdiary\nrf54l15_connectkit\nrf54l15_connectkit_nrf54l15_cpuapp.dts:45 */

                                        };

                                        /* node '/soc/rram-controller@5004b000/rram@0/partitions/partition@15c000' defined in nrf54l15-connectkit\boards\makerdiary\nrf54l15_connectkit\nrf54l15_connectkit_nrf54l15_cpuapp.dts:48 */

                                        storage_partition: partition@15c000 {

                                                label = "storage";         /* in nrf54l15-connectkit\boards\makerdiary\nrf54l15_connectkit\nrf54l15_connectkit_nrf54l15_cpuapp.dts:49 */

                                                reg = < 0x15c000 0x9000 >; /* in nrf54l15-connectkit\boards\makerdiary\nrf54l15_connectkit\nrf54l15_connectkit_nrf54l15_cpuapp.dts:50 */

                                        };

                                        /* node '/soc/rram-controller@5004b000/rram@0/partitions/partition@154000' defined in nrf54l15-connectkit\mesh_bt\boards\nrf54l15_connectkit_nrf54l15_cpuapp.overlay:142 */

                                        temp_log_partition: partition@154000 {

                                                label = "temp_log";        /* in nrf54l15-connectkit\mesh_bt\boards\nrf54l15_connectkit_nrf54l15_cpuapp.overlay:143 */

                                                reg = < 0x154000 0x8000 >; /* in nrf54l15-connectkit\mesh_bt\boards\nrf54l15_connectkit_nrf54l15_cpuapp.overlay:144 */

                                        };

                                };

                        };

                };

Parents
  • Hi,

    I am developing a bluetooth application and would like to have some on board temperature logging as well. I am using ZMS to do this, with an 8 byte struct. I notice that this means every temperature record uses 1 ATE which is 16 Bytes, It seems somewhat wasteful to use half of the storage space I have as an overhead for ZMS. Is there a more space efficient solution to do this ?

    If I understood your situation correctly, you want to use ZMS as a FIFO. I would then recommend you to not go with ZMS, but instead go with FCB (Flash Circular Buffer) directly. You can also see this recommendation in the docs here.

    I am also interested in increasing the partition space but there are these image slots that are using up the rest of the space (device tree portion pasted below). Do you know if I can take over these if I want to use OTA FW update in the future ? 

    If you want OTA capabilities you want to keep all these partitions. It is possible to resize them but if you want to do that, there are quite a few requirements in order for it to work (especially alignment constrains). You can find the doc here.

    However, I see that you added the "temp_log" partition. But you should put that partition inside the storage partition. You can see the documentation about it here.

    Best regards,

    Simon

Reply
  • Hi,

    I am developing a bluetooth application and would like to have some on board temperature logging as well. I am using ZMS to do this, with an 8 byte struct. I notice that this means every temperature record uses 1 ATE which is 16 Bytes, It seems somewhat wasteful to use half of the storage space I have as an overhead for ZMS. Is there a more space efficient solution to do this ?

    If I understood your situation correctly, you want to use ZMS as a FIFO. I would then recommend you to not go with ZMS, but instead go with FCB (Flash Circular Buffer) directly. You can also see this recommendation in the docs here.

    I am also interested in increasing the partition space but there are these image slots that are using up the rest of the space (device tree portion pasted below). Do you know if I can take over these if I want to use OTA FW update in the future ? 

    If you want OTA capabilities you want to keep all these partitions. It is possible to resize them but if you want to do that, there are quite a few requirements in order for it to work (especially alignment constrains). You can find the doc here.

    However, I see that you added the "temp_log" partition. But you should put that partition inside the storage partition. You can see the documentation about it here.

    Best regards,

    Simon

Children
No Data
Related