Announcements

Ever wondered how you could shape the future in collaboration with others? Join us at OktoberTech Asia Pacific and get inspired. Click here to sign up FREE of charge.

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

AURIX™ Forum Discussions

User22771
Level 1
Level 1
Hi,

is there any sample code for this? I'm not able to make it or reconfigure the size with WinIdea for TC36x
0 Likes
2 Replies
NeMa_4793301
Level 6
10 solutions authored 5 solutions authored First solution authored
Level 6
DCON0 and PCON0 are ENDINIT protected, so you have to disable CPU ENDINIT protection to change them. Here's how the iLLD does it:

static void __Core0_start(void)
{
unsigned short cpuWdtPassword = Ifx_Ssw_getCpuWatchdogPasswordInline(&MODULE_SCU.WDTCPU[0]);

Ifx_Ssw_clearCpuEndinitInline(&MODULE_SCU.WDTCPU[0], cpuWdtPassword);

/* Enable/ Disable the caches depending on the configuration. At this point cache are invalidated */
{
Ifx_CPU_PCON0 pcon0;
pcon0.U = 0;
pcon0.B.PCBYP = IFX_CFG_SSW_ENABLE_TRICORE0_PCACHE ? 0 : 1; /* depending on the enable bypass bit is reset/set */
Ifx_Ssw_MTCR(CPU_PCON0, pcon0.U);
Ifx_Ssw_ISYNC();
}

{
Ifx_CPU_DCON0 dcon0;
dcon0.U = 0;
dcon0.B.DCBYP = IFX_CFG_SSW_ENABLE_TRICORE0_DCACHE ? 0 : 1; /* depending on the enable bypass bit is reset/set */
Ifx_Ssw_MTCR(CPU_DCON0, dcon0.U);
Ifx_Ssw_ISYNC();
}
0 Likes
User22771
Level 1
Level 1
Hi,

thanks a lot it works at least for configuring the PCon0/DCon0. But to visit the area reserved for DCache , eg for TC365 it should be 7003 C000H - 7003 FFFFH, i have also to set the CPU0_DCMAP?

Best Regards
0 Likes