xWRL6432 has 512KB Shared Memory in following configurations:
This example shows the usage of 256KB HWASS/APPSS Shared memory as APPSS memory and usage of 160KB HWASS dedicated Memory plus 96KB of HWA/FECSS (configured for HWASS by default) shared memory in APPSS software (helpful in cases when complete 160KB + 96KB memory is not used for HWA). Following registers will help in configuring 256KB Memory between APPSS and HWASS (Refer to Technical Reference Manual for more details):
APP_CTRL:APPSS_SHARED_MEM_CLK_GATE </ul
When running in functional mode RBL can be leveraged to perform these configurations. This can be done through modifying "SH_MEM_CONFIG" macro found in build files ("makefile" , "makefile_ccs_bootimage_gen"). The following configurations are possible:
SH_MEM_CONFIG VALUE | TOTAL APPSS RAM (INCL. SHARED RAM) | HWASS (FECSS shared Memory to be taken care by HWASS) |
---|---|---|
SH_MEM_CONFIG=0 | 0x00400000 - 0x0047FFFF (512 KB) | 0x60000000 - 0x6007FFFF (512 KB) |
SH_MEM_CONFIG=1 | 0x00400000 - 0x0049FFFF (640 KB) | 0x60000000 - 0x6005FFFF (384 KB) |
SH_MEM_CONFIG=2 | 0x00400000 - 0x0047FFFF 0x004A0000 - 0x004BFFFF (640KB) | 0x60000000 - 0x6005FFFF (384 KB) |
SH_MEM_CONFIG=3 | 0x00400000 - 0x004BFFFF (768 KB) | 0x60000000 - 0x6003FFFF (256 KB) |
In case complete HWASS Memory is not used, that memory can be used for APPSS Software. However as this memory is not initialized by RBL, application has to ensure that this memory is intitialized before use. Hence we cannot use it for .text, .data, .ro sections. This example demonstrates one such use case.
.text file is being assigned to the M4F_SHRM section in the linker file
Shared Memory Demonstration:
To configure FECSS/HWA Shared Memory (96KB) for HWASS(Configured for HWASS by default), Following registers have to be configured (Refer to Technical Reference Manual for more details):
TOP_PRCM:HWA_PD_MEM_SHARE_REG
FEC_CTRL:FECSS_SHARED_MEM_CLK_GATE
When this memory is configured for HWASS the address range is in continuation to HWASS (160KB) Memory.
The .l3 section is assigned to the start of the HWASS dedicated memory space in the linker file. The array created spans more than the 160 KB forcing allocation into the FECSS shared memory area. This example writes 0xFF to these memory locations.
Important Notes: When shared memory is allocated to M4/M3, back to back full word write access to a location followed by sub-word write access to another location corrupts data in previously written location. Refer to Errata Dig#14 "Corrupted Data Store for Partial Write in Shared Memory" in Errata document. Workarounds:
Parameter | Value |
---|---|
CPU + OS | m4fss0-0 freertos |
Toolchain | ti-arm-clang |
Boards | xWRL6432-evm |
Example folder | examples/drivers/sharedmemory |
A GUI tool SysConfig is used to configure different modules and peripherals of the example. Using this tool, users can select and customize different modules and peripherals. The SysConfig tool will generate the code for initializing and configuring these modules. This configuration is saved to a file called example.syscfg for every example. To know more about how to use SDK with SysConfig, Visit this page
Shown below is a sample output when the application is run,