TC377TP controller up issue

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

cross mob
User20162
Level 3
Level 3
10 replies posted 10 questions asked 5 replies posted
Hi,

i am using tc377tp, i am fusing the program from trace32 software, it is running properly from trace32 software but when i remove and reset the controller program is not executing.

i am using TLF35584 PMIC to power the micro controller up.

kindly help me to sort this out.


Regards
Mohamed Rahmathulla
0 Likes
29 Replies
MoD
Employee
Employee
50 likes received 500 replies posted 100 solutions authored
In the most cases that a software runs with Debugger but not without debugger is that any of the watchdogs are going to timeout if no debugger connected. If a debugger is connected then the watchdogs are automatically switched off and there occurs no timeout, If there is no debugger connected then the watchdogs are working as expected.
You should make sure that your watchdogs are switched off or serviced in time.
0 Likes
User20162
Level 3
Level 3
10 replies posted 10 questions asked 5 replies posted
i disabled the watchdog in my code, here my code is

void core0_main(void)
{
IfxCpu_enableInterrupts();

/* !!WATCHDOG0 AND SAFETY WATCHDOG ARE DISABLED HERE!!
* Enable the watchdogs and service them periodically if it is required
*/
IfxScuWdt_disableCpuWatchdog(IfxScuWdt_getCpuWatchdogPassword());
IfxScuWdt_disableSafetyWatchdog(IfxScuWdt_getSafetyWatchdogPassword());

/* Wait for CPU sync event */
IfxCpu_emitEvent(&g_cpuSyncEvent);
IfxCpu_waitEvent(&g_cpuSyncEvent, 1);

initTime(); /* Calculate iLLDs time constants */
initLED(); /* Initialize the LED port pin */

while(1)
{
blinkLED(); /* Make the LED blink */
}
}


i am disabling cpu watchdog and safety watchdog.

still i am facing the issue
0 Likes
MoD
Employee
Employee
50 likes received 500 replies posted 100 solutions authored
What is the controller is doing if you start without debugger? You use an own board or a TriBoard? Is there a reset indicator with LED?
0 Likes
User20162
Level 3
Level 3
10 replies posted 10 questions asked 5 replies posted
i Tried the same code with Tri-board, it is working, but the same software i am fusing in my custom board but it is working only in trace32 software, if i remove the jtag and press the reset button it is not in reset mode, but in some system down mode.

current cusumption of reset mode is 70mA, but i am getting 80mA, if i long press the reset button it is going to 70mA as expected.
0 Likes
TBencher
Level 6
Level 6
25 solutions authored 25 likes received 5 questions asked
Hi Mohamed,

did you also try to flash your program manually into the chip?
I am not aware what trace32 software really does in terms of program location, but it could be that the program is not located where the Bootloader expect it to be after reset.

Regards,

Jens
0 Likes
MoD
Employee
Employee
50 likes received 500 replies posted 100 solutions authored
I expect that the device is in Generic Bootstrap Loader Mode because you don't program the BMHD0 with the startaddress. Program also UCB BMHD0 with your used reset address. Please note to avoid problems after UCB programming don't program the BMHDx_COPY together with BMHDx_ORIG
0 Likes
TBencher
Level 6
Level 6
25 solutions authored 25 likes received 5 questions asked
Hi MoD,

that makes sense. But the question here is what the Trace32 tool does. Mohamed stated that his program is only working during Trace32 tool session, and not anymore afterwards.
The idea was not to manipulate any of the UCBs. The idea was to flash the program and see what happens. I mean this is actually no problem here, because Mohamed is able to debug
but somehow wondering why the program is not starting anymore without Trace32 tool session. Just flash it, and you can run it.

Regards,

Jens
0 Likes
TBencher
Level 6
Level 6
25 solutions authored 25 likes received 5 questions asked
Hi MoD again,

sorry I did not get it right. Mohamed claimed that the program is working with the Triboard, but not directly with its custom board. In this case you are right.
Mohamed should use the Memtool directly where all the basics are already done for him.

Regards,

Jens
0 Likes
User20162
Level 3
Level 3
10 replies posted 10 questions asked 5 replies posted
i programmed and checked the memory of both tri-board and my custom board.

program flashed in PF0 for both the tri-board as well as my custom board.. but still facing the same problem,.

What is purpose of BMHDx_ORIG and BMHDx_COPY here?


Thanks & Regards
Mohamed Rahmathulla
0 Likes
TBencher
Level 6
Level 6
25 solutions authored 25 likes received 5 questions asked
Hi Mohamed,

so you are facing the same problem... If the flash content is equal, then it could have something to do with the TLF Power Supply and Monitoring device.
Did you also placed the TLF on your custom board?

Basically, the TLF is able to hold your Aurix in RESET.
But on the other hand, you only need the TLF if you are doing a Functional Safety related application.

How, do you provide power to the Aurix?

Another problem could be, that you permanently hold your Aurix in RESET, because you might have forgotten to hold the PORST pin into logical high position.

The Bootmode headers essentially have a configuration purpose, where you decide whether for example to use the HWCFC pins or where to start reading your program from.
The copies are mostly supposed to have something running available if your original BMHD is corrupted. If the first BMHD would be corrupted, the firmware might just grab
the next one from known location to start from.

Regards,

Jens
0 Likes
TBencher
Level 6
Level 6
25 solutions authored 25 likes received 5 questions asked
Hi Mohamed,

do you have also the TLF on your custom board?
Please check your HWCFG pins to be in proper configuration and PORST to be logical high.

If you do not want to share your schematics here in the forum, you could also send it directly to me via
info@tbench-solutions.com. We could have a quick look on it. But you could also share it here. It is up to you.


Regards,

Jens
0 Likes
User20162
Level 3
Level 3
10 replies posted 10 questions asked 5 replies posted
Hi jensM,

i am using TLF35584QVVS1XUMA2 to give power to my custom board. we disable the failstate reading, so it is working as a default state and it is giving 5v to the controller.

i checked the HWCFG pin and PORST pin is High (5V),

i have checked the memory location of BMHDx_ORIG, i am getting different value in custom board and tri-board, i have attached the image of memory below

this is the memory view of tri-board

5017.attach

and this for my custom board
5018.attach

writing to those register is taken care by infineon .cmm file.

is there anything we need to check??

Regards
Mohamed Rahmathulla
0 Likes
TBencher
Level 6
Level 6
25 solutions authored 25 likes received 5 questions asked
Hi Mohamed,

yes the boot mode headers are missing, obviously.
Without them, there is no chance to run your program.

So, you might need to manually put them in.
Do you have PLS UDE Tool available?

Regards,

Jens
0 Likes
TBencher
Level 6
Level 6
25 solutions authored 25 likes received 5 questions asked
Hi Mohamend,

which flashing tool are you using?
Usually, things like that might be configured inside Memtool for example.

Regards,

Jens
0 Likes
User20162
Level 3
Level 3
10 replies posted 10 questions asked 5 replies posted
Hi JensM,
I am using Trace32 software and Lauterbach debugger to flash the program. we have TC37X.cmm file to configure the memory region.

i dont have PLS-UDE tool..

In tri-board it is executing properly.

Regards
Mohamed Rahmathulla
0 Likes
User20162
Level 3
Level 3
10 replies posted 10 questions asked 5 replies posted
Hi JensM,
I am using Trace32 software and Lauterbach debugger to flash the program. we have TC37X.cmm file to configure the memory region.

i dont have PLS-UDE tool..

In tri-board it is executing properly.

Regards
Mohamed Rahmathulla
0 Likes
TBencher
Level 6
Level 6
25 solutions authored 25 likes received 5 questions asked
Hi Mohamed,

please look whether you have Memtool installed on your machine.
If not, just download it. Then you should be able accessing the Generic Bootstrap Loader
to transfer your program with the right settings.

Or, you look into your Trace32 software, whether there is an option to configure the BMHDs.

Or, just send me the cmm file. I am gonna have a look on it.

Regards,

Jens


Regards,

Jens
0 Likes
cwunder
Employee
Employee
5 likes given 50 likes received 50 solutions authored
mohamed rahmathulla wrote:
What is purpose of BMHDx_ORIG and BMHDx_COPY here?

Please refer to section 3.1.1.6.3 Processing in case no valid BMHD found in the AURIXTC3XX_um_part1_v1.6.pdf and continue reading on the purpose of BMHDx. If you have ORIG and COPY copy this means it is stored rundentaly. The first being checked is the ORIGinal and then if needed the COPY is check by the SSW.
0 Likes
TBencher
Level 6
Level 6
25 solutions authored 25 likes received 5 questions asked
Hi Mohamed,

on the TC3XX controllers you have also swap functionality for SOTA available. This could also confusing you.

You need to check your Trace32 tool whether there are any additional configurations to be done.
But, if you are able to watch at your flash contents on both the Triboard and the custom board, you could also directly edit it. Why not?
Just put the BMHD which you have figured from your Triboard debug session, and put it onto your custom board.
That should be really straight forward inside Trace32 tool. No need to calculate any checksums, because of the same content.
Just try it.


My alternative suggestion here is switching to Memtool, because this comes directly from Infineon and has everything you need for configuration purposes.
With that tool you can enter Generic Bootstrap Mode as I mentioned earlier, and iron your hex file (BMHDs included) right into PFLASH 0. That should work for you.

The question why this happened to your custom board could be somehow related to the way you handle the custom board.
Lauterbach and anyone else say, that you should not power cycle your board if no valid Boot Mode Header is installed.
That means, if you delete your flash and do a power cycle without putting at least one valid BMHD on it, you run right into that trouble.



@cwunder: yes we have covered that before


Regards,

Jens
0 Likes
lock attach
Attachments are accessible only for community members.
User20162
Level 3
Level 3
10 replies posted 10 questions asked 5 replies posted

here i attached the tc37.cmm file, which i used for both boards.

Regards
Mohamed Rahmathulla
0 Likes
TBencher
Level 6
Level 6
25 solutions authored 25 likes received 5 questions asked
Hi Mohamed,

thanks for the script file. Yes, this file is not supposed to be edited by the user.
Instead you can call it or portions of it as described in the upper comments.

like this:
DO ~~/demo/tricore/flash/tc37x.cmm CPU=TC377TE PREPAREONLY

It seems that this script allocates address space for all BMHDs in DF0.

Unfortunately, this might not really help.

Do you have another custom board with another Aurix available?
This would possibly help you overcoming this issue.

If your BMHDs are corrupted or simply not exist, the only thing what you could do is manually rewrite them.
What about the UCB0? Did you edit or erase it? Can you have a look on it in Trace32?

Regards,

Jens
0 Likes
MoD
Employee
Employee
50 likes received 500 replies posted 100 solutions authored
When you change line 256 from:
FLASH.Create 21. 0xAF400000--0xAF4001FF 0x0200 NOP Long /INFO "UCB00 BMHD0 ORIG" ; DF0, DF0_UCB0
to
FLASH.Create 21. 0xAF400000--0xAF4001FF 0x0200 TARGET Long /INFO "UCB00 BMHD0 ORIG" ; DF0, DF0_UCB0
Then the UCB0_ORIG will be programmed also when it is part of our program to flash.
When you wrote 1 time the BMHD then you can revert the change as long as you don't change the BMHD.
0 Likes
TBencher
Level 6
Level 6
25 solutions authored 25 likes received 5 questions asked
Hi MoD,

nice trick. What about this comment?

If changing the sector type from NOP to TARGET is required, use the command; FLASH.CHANGETYPE instead of modifying this script.

When I get this right, Lauterbach is trying to prevent users from permanently locking their devices, which obviously happened from time to time.

Is there any further documentation regarding this script available?

Thanks for sharing this information.


Regards,

Jens
0 Likes
MoD
Employee
Employee
50 likes received 500 replies posted 100 solutions authored
To prevent the device from permanently locking I wrote to change only configuration of UCB0. Risk of permanently lock only when you manipulate ORIG and COPY at the same time.
As I understand he use only this script and not any other where he can make changes.
For more documentation please see the doc folder in T32 or ask directly the Lauterbach support.
0 Likes
TBencher
Level 6
Level 6
25 solutions authored 25 likes received 5 questions asked
Hi MoD,

yes Mohamed should contact Lauterbach directly. We are more related to PLS tools for debugging.


Regards,

Jens
0 Likes
User20162
Level 3
Level 3
10 replies posted 10 questions asked 5 replies posted
Hi Mod and JensM,

I tried changing the script from NOP to TARGET, it is working, but i will contact lauterbach to find recommended solution.

Thank you for you support.

Regards
Mohamed Rahmathulla
0 Likes
TBencher
Level 6
Level 6
25 solutions authored 25 likes received 5 questions asked
Hi Mohamed,

you're welcome.


Regards,

Jens
0 Likes
NeMa_4793301
Level 6
Level 6
10 likes received 10 solutions authored 5 solutions authored
Make sure you don't leave it that way - UCBs should be kept under 100 program/erase cycles for maximum retention (see tRTUcc in the datasheet).
0 Likes
TBencher
Level 6
Level 6
25 solutions authored 25 likes received 5 questions asked
Hi UC_wrangler,

I assume Mohamed is aware of that. I think it was more like an accident loosing the BMHDs.

Regards,

Jens
0 Likes