SK-AM62A-LP: SK-AM62A-LP: Memory requirement

Part Number: SK-AM62A-LP

Hello Team,

We are going to use AM62A34 processor for camera product and in that we are using EVM kit and in that support of 4GB RAM. But in "free" command output total memory is showing as 3399900(3.39GB). So, why it is showing 600 MB less than actual? is this reserved for any purpose. Can we use all 4GB?

We want to use 1GB RAM with our product so concerning if it will show 600 MB less then actual then we will have only access for 400MB? So want to confirm can we utilize all memory?

Thanks,
Jaimin

  • Probably because there is only 3.39GB free memory.  The other memory is being used by the kernel and other SDK code

    Regards,

    James

  • We want to use 1GB RAM with our product. Does that mean we can only access 400MB memory for device purpose? 

    We don't want to use any TI DEMO/SDK specific features with our produce. We just want to use Camera streaming features with our product. Can't we utilize all 1 GB memory here? 

    As per my understanding kernel will not use more than 100 MB memory. Where remaining memory used? If it is used by other purpose then could you please point us for which specific feature how much memory use from 600 MB which is not displayed under total memory?  How we can disable those featured to use these memory in our system?

  • Hello James,

    As per further finding kernel used some memory under different drivers for dma and other purpose which is mentioned under "reserved-memory" option under device tree. So "total memory" in "free" command is showing 600MB memory less than actual.

    If we use 1 GB RAM with our product then we will have only access for 400MB for use application. Is there way to optimize "reserved-memory"?

    In our product we only required single camera and ethernet access.

    Please help as we stuck in RAM size selection due to this point.

    Thanks

  • Hi Jaimin,

    Please do the following test:

    - mount the SD card rootfs partition on your Linux PC, and on the PC:

    $ cd <sdcard-mount-directory>
    $ sudo rm -rf
    $ sudo tar xvf <am62ax-sdk-9.1.0.7-installation-directory>/filesystem/tisdk-tiny-image-am62axx-evm.tar.xz
    $ cd -

    - umount the SD card from the PC

    - boot the EVM with 'mem=1024M' added to u-boot bootargs parameter

    - check the 'free' command in Linux on the EVM

  • Hello,


    Thank you for your response.

    We have tried to check with tiny image as suggested and it is not helping to increase total memory in free command output. Please find below free command output for your reference.

    As per our understanding tiny image is also using same kernel device tree which defines "reserved-memory".

    Is there any optimization information available for reserved memory which will fully work with tiny image? If yes then we can reduce reserved-memory under device tree which help us to get access of more RAM.

    Thanks

  • Hi Jaimin,

    As per our understanding tiny image is also using same kernel device tree which defines "reserved-memory".

    Yes, using tiny image itself doesn't improve the memory usage. My initial assumption wasn't correct.

    If yes then we can reduce reserved-memory under device tree which help us to get access of more RAM.

    The following kernel patch removes the reserved-memory for c7x and edgeai if your application doesn't use them.

    diff --git a/arch/arm64/boot/dts/ti/k3-am62a7-sk.dts b/arch/arm64/boot/dts/ti/k3-am62a7-sk.dts
    index 0b101d9899e0..45d57272b3fc 100644
    --- a/arch/arm64/boot/dts/ti/k3-am62a7-sk.dts
    +++ b/arch/arm64/boot/dts/ti/k3-am62a7-sk.dts
    @@ -90,7 +90,7 @@ mcu_r5fss0_core0_memory_region: r5f-dma-memory@9b900000 {
                            reg = <0x00 0x9b900000 0x00 0x0f00000>;
                            no-map;
                    };
    -
    +#if 0
                    c7x_0_dma_memory_region: c7x-dma-memory@99800000 {
                            compatible = "shared-dma-pool";
                            reg = <0x00 0x99800000 0x00 0x100000>;
    @@ -124,6 +124,7 @@ edgeai_core_heaps: edgeai-core-heap-memory@ae000000 {
                            reg = <0x00 0xae000000 0x00 0x12000000>;
                            no-map;
                    };
    +#endif
            };
     
            vmain_pd: regulator-0 {
    @@ -870,13 +871,13 @@ mbox_mcu_r5_0: mbox-mcu_r5-0 {
                    ti,mbox-tx = <1 0 0>;
            };
     };
    -
    +#if 0
     &c7x_0 {
            mboxes = <&mailbox0_cluster1 &mbox_c7x_0>;
            memory-region = <&c7x_0_dma_memory_region>,
                            <&c7x_0_memory_region>;
     };
    -
    +#endif
     &wkup_r5fss0_core0 {
            mboxes = <&mailbox0_cluster0 &mbox_r5_0>;
            memory-region = <&wkup_r5fss0_core0_dma_memory_region>,

    This improves the available memory size.

    For 4GB DDR:

    Zroot@am62axx-evm:~# free
                  total        used        free      shared  buff/cache   available
    Mem:        3956232       61276     3854428        8920       40528     3794792

    For 1GB DDR:

    root@am62axx-evm:~# free
                  total        used        free      shared  buff/cache   available
    Mem:         936732       57364      838904        8920       40464      820880