Hello NXP team,
Do you have the example of DTCM/ITCM as system ram for S32K3?
Thanks!
I have recently prepared such example:
Hi there,
I have adapted my project to use the DTCM in it. I don't use ITCM in this case. I have changed the startup code and the linker is similar, I haved used the unified bootloader one.
Everything works fine with the debugger (starting the code with the S32 Design Studio) but when the board starts the code without it, the program doesn't work. The program starts sending through CAN after 2 seconds. With the debugger and no breakpoints, it works fine. Without the debugger, the board doesn't start sending CAN messages.
Thank you for your support!
I'd like to know which code need to be modifed if make this feature work well.
According to the AN13388(document number) at P11, need to configure some registers to enable TCM as system RAM.
I don't find similar modifications in your sample code.
Can you please help me explain more details.
In addition, I did some data copy tests in ITCM, it worked well. but if ITCM is used for freeRTOS heap, occurs hardfult.
freeRTOS code as below:
#if ( configAPPLICATION_ALLOCATED_HEAP == 1 )
/* The application writer has already defined the array used for the RTOS
* heap - probably so it can be placed in a special segment or address. */
extern uint8_t ucHeap[ configTOTAL_HEAP_SIZE ];
#else
PRIVILEGED_DATA static uint8_t __attribute__ ((section(".itcm0_code"))) ucHeap[ configTOTAL_HEAP_SIZE ];
#endif /* configAPPLICATION_ALLOCATED_HEAP */
What are the restrictions of ITCM usage?
Thanks!
Actually my example only shows how to put function to the ITCM (executing) and data to the DTCM (read/write). If you need it for other purpose or other core than it is tightly coupled to you must use backdoor access.
So it is needed to redefine linker file addresses and so.
Hi davidtosenovjan,
For S32K324, i want to put variables of core0 to core0 dtcm, and variables of core1 to core1 dtcm, how can i setup the memory map in link file, for this case if mean i must use backdoor access.
TKS