This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Compiler/AWR1642: [AWR1642] CHANGING TCMB SIZE

Part Number: AWR1642

Tool/software: TI C/C++ Compiler

Hello,

I wonder how I can change a TCMB size.

I tried changing the environment variable 

set MMWAVE_SDK_SHMEM_ALLOC=0x00010005

but, it seems not work.

It does not start at all.

Even I use CCS, right after I load mss file, it show run icon.

Then that is the end of mss.

Please let me know...

※ The version.

#define MMWAVE_SDK_VERSION_BUILD 4
#define MMWAVE_SDK_VERSION_BUGFIX 0
#define MMWAVE_SDK_VERSION_MINOR 1
#define MMWAVE_SDK_VERSION_MAJOR 2

  • Hi,

    What is the reason to change the size?

    Do you want to increase the memory?

    Thank you

    Cesar

  • I need more space in TCMB.

    My new functionality needs more data ram.

  • after I change env var as below,

    set MMWAVE_SDK_SHMEM_ALLOC=0x00010005

    I got these below memory map.

    DATA_RAM has increased to 00050000 from 00030000.

    name origin length used unused attr fill
    ---------------------- -------- --------- -------- -------- ---- --------
    VECTORS 00000000 00000100 0000003c 000000c4 X
    PROG_RAM 00000100 0003ff00 0003bfba 00003f46 R X
    DATA_RAM 08000000 00050000 00031c46 0001e3ba RW
    L3_RAM 51000000 000a0000 00000000 000a0000 RW
    HS_RAM_MSS 52080000 00004000 0000089c 00003764 RW
    HS_RAM_DSS 52084000 00004000 00000000 00004000 RW

    But if my application occupy that data_ram area over 00030000, my awr1642 sensor does not work at all.

    and further, Actually I tried to modify a MPU like as below.

    In soc_xwr16xx_mss.c file,
    in SOC_mpu_config() function,
    _mpuSetRegion_(mpuREGION3);
    _mpuSetRegionBaseAddress_(SOC_XWR16XX_MSS_TCMB_BASE_ADDRESS);
    _mpuSetRegionTypeAndPermission_(MPU_NORMAL_OINC_NONSHARED, MPU_PRIV_RW_USER_RW_NOEXEC);
    // _mpuSetRegionSizeRegister_(mpuREGION_ENABLE | MPU_256_KB);
    _mpuSetRegionSizeRegister_(mpuREGION_ENABLE | MPU_512_KB);

    I changed a size of REGION3 to 512 from 256,

    Cause I thought 196(default size of tcmb) plus 128 (from L3 shared) is over 256,
    So mpu size of region must be 512.

    It is not working.

  • The TRM (section 2.1.2.4) specifies the 1642's TCMA at 256KB and TCMB at 192KB.  You cannot increase this, and the demos already use these sizes in their memory specifications.

     -dave

  • Hi, Dave.

    Sorry to say that I don't understand.

    Please check 10.2 DSS_L3 MEmory Organization for 16xx on TRM(swru520c).

    The thing that I understand is.. it is possible to change the size of TCMB to 320KB from 192KB.

    Please check that document content.

  • Section 10.2 refers to DSP memory.  TCMA and TCMB are only for the ARM (MSS).  If you need more data memory available to the ARM, there are a few additional memories. Please check Table 3-2 for memories visible to the ARM core.  Please note also that the "sized used" column refers to the address space that is available, not necessary what is physically present in the device revision you may have.

     -dave

  • I understand above comments as..

    It supports 320KB CR4-TCMB.

    Please share the meaning of that above comments on TRM.

  • Hi, dave.

    Please reply to my question above.

  • Sorry, I've been away from the office.  Yes, that configuration is available, but rarely is there a benefit to it, because it reduces the memory available to the DSP and the ARM can see all of L3 anyway.  Since the DSP is much better suited to radar processing, it is best to maximize it's memory access.

     -dave

  • You mean it is available,

    could you share how to get that 320KB TCMB?

  • Hi Minan,

    I have been looking into this as time permits, and while it is possible, it requires expert knowledge and requires rebuilding tools that we currently do not provide the source code for.  Until we provide a procedure and tools for doing this at the customer level, I would suggest looking into alternatives:

    1) Let the MSS use L3 for it's additional memory needs, or

    2) Move the algorithm to the DSP.

     

    -dave

  • Hi Minan

    Give me a day or so to look into this. The steps you did should have worked and yes the MPU settings seems to be incorrect in the release (will file an internal bug). With shmem_alloc set to 0x00010005 and MPU setting fixed, if you keep the TCMB used space to be less than 192KB, does the device/application boot-up normally? if yes, then could you connect CCS and see if you can access TCMB beyond the 192KB space using Memory browser in CCS?

    Thank you for your patience,

     Madhvi

  • Hi Minan

    These are the experiments I did and after just fixing the MPU bug, I was able to use the extended TCMB memory.

    • Step 1: Fix SOC_mpu_config to set the SOC_MPU_REGION3 size to SOC_MPU_512_KB

    /*
    Setup region 3, TCMB DRAM, base address = MSS_TCMB_BASE_ADDRESS, size = 512 KB (actual 192 KB + optional 128KB extension),
    Access Permissions: Full Access
    Execute Permissions: Execute Never
    Memory Type: Non-Cached, Non-Shared, Normal
    */
    #if ((SOC_XWR16XX_MSS_TCMB_BASE_ADDRESS & (512U * ONE_KB - 1)) != 0)
    #error SOC_XWR16XX_MSS_TCMB_BASE_ADDRESS not aligned to 512 KB
    #endif
    SOC_MPUSetRegion(SOC_MPU_REGION3);
    SOC_MPUSetRegionBaseAddress(SOC_XWR16XX_MSS_TCMB_BASE_ADDRESS);
    SOC_MPUSetRegionTypeAndPermission(SOC_MPU_NORMAL_OINC_NONSHARED, SOC_MPU_PRIV_RW_USER_RW_NOEXEC);
    SOC_MPUSetRegionSizeRegister(SOC_MPU_REGION_ENABLE | SOC_MPU_512_KB);

    • Step 2: rebuild SOC driver and ccsdebug with environment variable MMWAVE_SDK_SHMEM_ALLOC set to 0x00010005 (all other environment variables and build instruction same as SDK User guide)
    • Step 3: Verify map file and see the TCMB size go up to 0x50000 and L3 reduced to 0x000a0000.
    • Step 4: Burn this new ccsdebug to flash and bootup AWR1642
    • Step 5: Connect CCS to R4F core and View->Memory Browser. Check access to TCMB address space using following addresses (just examples):
      • 0x08000000
      • 0x08000000 + 0x00040000 - 0x4
      • 0x08000000 + 0x00050000 - 0x4
    • Step 6: Created global variables in ccsdebug utility, placed them in a distinct section (.extMem) and used (HIGH) keyword in linker command file to place them in top section of extended TCMB.

    #ifdef SUBSYS_MSS
    #pragma DATA_SECTION(clkCfg, ".extMem");
    SOC_SysClock clkCfg = SOC_SysClock_INIT;
    #pragma DATA_SECTION(socHandle, ".extMem");
    SOC_Handle socHandle;
    #endif

    update main() to comment out local socHandle and to use clkCfg global variable to set socCfg.clockCfg.

    update r4ccsdebug_linker.cmd to place this section:
    /*----------------------------------------------------------------------------*/
    /* Section Configuration */
    SECTIONS
    {
    .extMem : {} > DATA_RAM (HIGH)
    }
    /*----------------------------------------------------------------------------*/

    • Step 7: rebuild ccsdebug with environment variable MMWAVE_SDK_SHMEM_ALLOC set to 0x00010005. Verify map file that .extMem is 8 bytes long and placed at 0804fff8.
    • Step 8: Burn this new ccsdebug to flash and bootup AWR1642
    • Step 9: Connect CCS to R4F core. Check address and value of clkCfg and socHandle in expressions window.


    So all the above steps were succssful and working at my end i.e. application could leverage the extended TCMB region. You could also try those in your setup using SDK's ccsdebug and let us know the outcome.
    That should help debug your application.

  • Hi Minan,

    I am going to close this thread since there has been no activity for almost two weeks. Please open a new thread if you have additional queries.

     -dave