RAM initialization in TC37x

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

cross mob
lock attach
Attachments are accessible only for community members.
babu99
Level 2
Level 2
10 replies posted 5 replies posted 5 sign-ins

Hello Everyone,

I'm working with TC37x & TC39x controllers and i want to retain the DSPR data over resets.

How to modify the DMU_HF_PROCONRAM register RAMIN value to 0x2[Init_Cold].

I have tried to access with register memory location 0xF804008C. But it's not updating.

Kindly help me.

Thanks in advance.

-Babu Dudekula

0 Likes
1 Solution
cwunder
Employee
Employee
5 likes given 50 likes received 50 solutions authored

To change the behavior of the RAMIN you need to modify the UCB_DFLASH which can be done with Memtool. Below is a screen shot of the tool for reference.

cwunder_0-1659530854092.png

 

 

View solution in original post

25 Replies
Di_W
Moderator
Moderator
Moderator
500 solutions authored 1000 replies posted 250 solutions authored

Hi babu99,

Have you clear ENDINIT protection?

void IfxAsclin_Asc_disableModule(IfxAsclin_Asc *asclin)
{
    Ifx_ASCLIN *asclinSFR = asclin->asclin;       /* getting the pointer to ASCLIN registers from module handler*/
    uint16      psw       = IfxScuWdt_getCpuWatchdogPassword();
    IfxScuWdt_clearCpuEndinit(psw);               /* clearing the endinit protection */
    IfxAsclin_setDisableModuleRequest(asclinSFR); /* disabling the module */
    IfxScuWdt_setCpuEndinit(psw);                 /* setting the endinit protection back on */
}

 Above code example to clear ENDINIT protection for register access.

 

dw 

0 Likes
babu99
Level 2
Level 2
10 replies posted 5 replies posted 5 sign-ins

Hello,

Thank you for the information.

But the API IfxAsclin_setDisableModuleRequest is not available in my IFX files.

Could you please share if it's available with you.

Thank you

-Babu dudekula

0 Likes
Di_W
Moderator
Moderator
Moderator
500 solutions authored 1000 replies posted 250 solutions authored

Hi,

This API is just to access register for a reference.

No need to have it in your project.

IFX_INLINE void IfxAsclin_setDisableModuleRequest(Ifx_ASCLIN *asclin)
{
    asclin->CLC.B.DISR = 1;
}

dw

0 Likes
lock attach
Attachments are accessible only for community members.
babu99
Level 2
Level 2
10 replies posted 5 replies posted 5 sign-ins

Hello dw,

I have tried the code you explained like as below.

    uint16    psw;
    psw = IfxScuWdt_getCpuWatchdogPassword();
    IfxScuWdt_clearCpuEndinit(psw);               /* clearing the endinit protection */
    DMU_HF_PROCONRAM.U = 0x2;
    IfxScuWdt_setCpuEndinit(psw);  
 
But it's not updating to register DMU_HF_PROCONRAM. It always has 0x00000000 value.
 
Further any suggestions would help.
 
Thank you
Babu Dudekula
0 Likes
Di_W
Moderator
Moderator
Moderator
500 solutions authored 1000 replies posted 250 solutions authored

Hi babu99,

Please download MemTool 2021.08 from here:

https://www.infineon.com/cms/en/tools/aurix-tools/free-tools/infineon/

dw

0 Likes
cwunder
Employee
Employee
5 likes given 50 likes received 50 solutions authored

To change the behavior of the RAMIN you need to modify the UCB_DFLASH which can be done with Memtool. Below is a screen shot of the tool for reference.

cwunder_0-1659530854092.png

 

 

babu99
Level 2
Level 2
10 replies posted 5 replies posted 5 sign-ins

Hello Cwunder,

Thank you for the information.

How can I get the Memtool?

We have NDA already. Just for information.

And how this tool will be connected with my controller?

 

Thank you

Babu Dudekula

0 Likes
TBencher
Level 6
Level 6
25 solutions authored 25 likes received 5 questions asked

Hi Babu,

just download it from MyICP.

 

Best regards,

TBencher

0 Likes
lock attach
Attachments are accessible only for community members.
babu99
Level 2
Level 2
10 replies posted 5 replies posted 5 sign-ins

Hi All,

I have downloaded the Memtool and encountering below problem while using it.

I have JTAG & DAP connection to connect with TC377TP controller via Trace32 debugger.

But i'm unable to connect Memtool with controller. It's taking DAS server.

How to change the connection type to JTAG or DAP?

How to get UCB password to write new configuration to controller?

Please check the attached snapshots.

 

Thank you

Babu Dudekula

0 Likes
Di_W
Moderator
Moderator
Moderator
500 solutions authored 1000 replies posted 250 solutions authored

Hi babu99,

If you use Triboard, please check your user manual of Triboard for JTAG/DAP settings.

https://www.infineon.com/dgdl/Infineon-TriBoard_TC3X7-UserManual-v02_03-EN.pdf?fileId=5546d462700c0a...

dw

0 Likes
babu99
Level 2
Level 2
10 replies posted 5 replies posted 5 sign-ins

Hi dw,

 

I'm not using starter kit.

I have board which connects via JTAG/DAP and normally working fine.

But now i'm unable to change setting on memtool for JTAG/DAP.

The DAP is not enabled for me on Memtool.

 

Thank you

Babu Dudekula

0 Likes
Di_W
Moderator
Moderator
Moderator
500 solutions authored 1000 replies posted 250 solutions authored

https://www.infineon.com/cms/en/product/promopages/das/?redirId=53841

Hi babu99,

For JTAG/DAP, you can first read about DAS, please refer to above link. And you should have a miniwiggler.

dw

0 Likes
babu99
Level 2
Level 2
10 replies posted 5 replies posted 5 sign-ins

Hi dw,

Thanks for the information.

We have Trace32 debuggers.

Now i cannot go to purchase miniwigger device.

Could you please suggest alternates to change RAMIN values.

 

Thank you

Babu Dudekula

0 Likes
Di_W
Moderator
Moderator
Moderator
500 solutions authored 1000 replies posted 250 solutions authored

Hi babu,

https://www2.lauterbach.com/pdf/app_tricore_flash.pdf

Please consult lauterbach for UCB programming.

dw

0 Likes
babu99
Level 2
Level 2
10 replies posted 5 replies posted 5 sign-ins

Hi dw,

Should i use safety ENDINIT or CPU ENDINIT?

Thank you

Babu Dudekula

0 Likes
Di_W
Moderator
Moderator
Moderator
500 solutions authored 1000 replies posted 250 solutions authored

Hi babu,

For CE0-y and E, SE registers, they are proteced by ENDINIT, please check Figure 71 ENDINIT Control Reisters in aurixtc3xx_um_part1_v2.0.pdf

For NVM, please refer to 6.3.1. Safety Endinit protection in Chapter 6 Non Volatile Memory Subsystem.

 

dw

0 Likes
lock attach
Attachments are accessible only for community members.
babu99
Level 2
Level 2
10 replies posted 5 replies posted 5 sign-ins

Hi dw,

For DMU_HF_PROCONRAM, the access is mentioned as "BE" [always bus error].

Please check the attached snap.

So, the ENDINIT code will work to unlock DMU_HF_PROCONRAM?

 

Thank you

Babu Dudekula

0 Likes
Di_W
Moderator
Moderator
Moderator
500 solutions authored 1000 replies posted 250 solutions authored

Hi babu,

dw_0-1659702460386.png

Sorry, for BE access mode, it cannot be written by normal access way.

Please refer to above access terms.

Please use UCB to access it.

dw

0 Likes
babu99
Level 2
Level 2
10 replies posted 5 replies posted 5 sign-ins

Hi dw,

Could you please share more details about UCB method to update RAM register.

Thank you

Babu Dudekula

0 Likes
Di_W
Moderator
Moderator
Moderator
500 solutions authored 1000 replies posted 250 solutions authored

Hi babu99,

For Miniwiggler, you can use Memtools.

For Lauterbach, you could consult the company and refer to Lauterbach user manual.

dw

0 Likes
babu99
Level 2
Level 2
10 replies posted 5 replies posted 5 sign-ins

Hi dw,

Thank you very much for the details & continuous support.

best regards

Babu Dudekula

0 Likes
babu99
Level 2
Level 2
10 replies posted 5 replies posted 5 sign-ins

Hi dw,

I have modified UCB_DFLASH section[ RAMIN value to Init_Cold] via Trace32 debugger.

But after updating DMU_HF_PROCONRAM register, i have flashed my software and it's not working.

My software got struck in OS.

 

Could you please suggest if there are some more changes required ?

After reverting to Init_All [original values], also the microcontroller is keep resetting. Any inputs on how to stop microcontroller continuous reset?

 

Thank you

Babu Dudekula

0 Likes
Di_W
Moderator
Moderator
Moderator
500 solutions authored 1000 replies posted 250 solutions authored

Hi babu99,

Could you confirm your chip is bricked? Please note that the UCB modification is very dangerous and may make the chip bricked.

Please make sure you understand what you have done on it.

You should understand the UCB structure and definitions. Have you only changed UCB_DFLASH_ORIG and UCB_DFLASH_COPY? Have you changed other UCBs?  

Q:After reverting to Init_All [original values], also the microcontroller is keep resetting.

A: If your UCB_DFLASH_ORIG and UCB_DFLASH_COPY all restored? If yes, please check what else you have changed. Generally make your project code as simple as possible. It should enter a loop after boot, but not reset forever.

dw

0 Likes
babu99
Level 2
Level 2
10 replies posted 5 replies posted 5 sign-ins

Hi dw,

When i revert the PROCONRAM value to default, my micro is working.

I have erased PFLASH and the reset problem is fixed now.

The chip is not bricked.

i have changed both UCB_DFLASH_ORIG and UCB_DFLASH_COPY properly.

Should i do any changes to start up software if i change PROCONRAM value to Init_Cold[0x2]?

No issues when PROCONRAM value is 0x0.

Thank you

Babu Dudekula

0 Likes
lock attach
Attachments are accessible only for community members.
babu99
Level 2
Level 2
10 replies posted 5 replies posted 5 sign-ins

Hi dw,

Thanks for the information.

I want to try by unlocking ENDINIT protection to update RAM value.

The register HF_PROCONRAM has "BE" access mode for writing. [BE meaning busError].

Does it allowed to write into RAM register by unlocking only SCU_WDTCPU0CON0?

Please check attached snaps of registers after unlocked. Still my values are not writing to register.

Do I need to do other registers unlock?

Thank you

Babu Dudekula

0 Likes