Aurix Development Studio- TC366 PINA Wake Up Test

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.
Teoman
Level 2
Level 2
5 questions asked 10 replies posted 10 sign-ins
Hello, 
I am implementing "SCU_Power_Down_Standby_1_KIT_TC297_TFT" project to new project which is called PINA_TC366. 
Original example code contains this portion of line from SCU_Power_Down_Standby.c Line 85  as the following; 
MODULE_SCU.PMSWSTATCLR.U = MASK_BIT2_TO_8_ONES;                       /* Clear all Standby and Wake-up flags    */
 On the other hand, TC366 board supports the necessary registers at PMS unit not SCU. But when I write  
"MODULE_PMS.PMSWSTATCLR.U = MASK_BIT0_TO_31_ONES;"
The compiler gives me error such as "TYPE 'MODULE_PMS' COULD NOT BE RESOLVED". Moreover the new project(TC366) accepts the writing of "MODULE_SCU. and so on ". What can be the reason or how can I solve the problem for reaching PMS registers  via objects ?

  Capture.PNG

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

If you are using a TriBoard then you can change the startup configuration to Generic Bootstrap Loader mode. Then when using the Memtool select (BSL/ASC) mode instead of DAP. Once you have configured the Memtool for this mode and it is open, apply power to the TriBoard and immediately click the "Connect" button and you should be able to connect to the device and replace the flash program with another one.

You can change the HW Boot configuration with to the Generic BSL mode by having DIP-switches 2,3 and 4 all on. 

cwunder_0-1646432239338.png

Here is a picture of the Memtool configured for BSL/ASC mode

cwunder_1-1646432308956.png

 

View solution in original post

18 Replies
lock attach
Attachments are accessible only for community members.
cwunder
Employee
Employee
5 likes given 50 likes received 50 solutions authored

Here is an example Standby mode (with VEXT powered) tested on a TC334 (TriBoard) which can be used for the TC366.

I did modify the iLLDs and the PFlash is not disabled so the function "IfxPmsPm_continueStandbySequenceInRAM()" is still run out of PFlash. 

Note: Once programmed you only have 10 seconds to connect a debugger from either a wake up (PINA) or power up.

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

 

To answer your question add the header file 

 

#include "IfxPms_reg.h"

 

Then you can modify the register

 

 PMS_PMSWSTATCLR.U = MASK_BIT2_TO_8_ONES;

 

or

MODULE_PMS.PMSWSTATCLR.U = MASK_BIT2_TO_8_ONES;

 

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

dw_1-1646361796360.png

 

Teoman
Level 2
Level 2
5 questions asked 10 replies posted 10 sign-ins

Hello thanks for everything.

My project is working successfully after your advice. I cannot try your example code because there is a error, related to debug session in ADS. While code is  running and enters standby mode, I click the debug stop button and the problem occured like that as I remember.

When I click on debug icon again, it gave me an error,

Starting Debugger...
The debug instrument IO could not be initialized.
The GDI debug instrument provided the following error message.
An internal error has occurred.

I uninstall the program and rebuild everything but it still continue. How can I solve this problem? 

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

If the code is enter into standby, then it's not debugging. So, for this part,.

The debug method before used:

1) disable enter/exit standby code, debug SCR and main Core0 code.

2) enable enter/exit standby code (because now debugging will not work)

0 Likes
Teoman
Level 2
Level 2
5 questions asked 10 replies posted 10 sign-ins

How Can I activate release version on ADS ? Yes, My board is in standby mode all the time even I wake up the cpu after that it step into standby mode again. 

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

Hi Teoman,

The trick is you should leave a way to wakeup from standby. You could read the code and check how to exit standby. If there is no way to exit standby, then the chip will be bricked. So this should be noticed.

 

dw

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

dw_0-1646389363647.png

You can refer to AP32465_Standby_contoller_and_standby_Mode_AURIX_v1.0.pdf 

0 Likes
Teoman
Level 2
Level 2
5 questions asked 10 replies posted 10 sign-ins

I can wake up via PINA pin, but at the same time I saw in "SCU_Power_Down_Standby_1
for KIT_AURIX_TC297_TFT " example project I saw the code; 

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);
    
    initLEDs();
    runStandby();
    while(1)
    {
    }
    return(1);
}

Just because of "return(1)", I assume the CPU immediately wake up and  get in standby mode again, until I again the system wake up via PINA . Maybe there can be  a way to solve when look at default example project code that I mention above.  

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

Hi Teoman,

Sorry, If the CPU wake up from standby, will like a reset.

 

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

dw_0-1646396066607.png

 

There is 10s before enter into Standby.

0 Likes
Teoman
Level 2
Level 2
5 questions asked 10 replies posted 10 sign-ins

If I can erase the flash, maybe I can debug and load code again ? Is there any option like "Mass Erase" in order to erase DFLASH and  PFLASH in ADS ? Moreover how can I download code to the board(answer to the last post)?  Or can I use MEMTOOL for example to erase the program? 

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

If you can connect the debug in 10s after reset, then you can stop the program and reprogram flash?  

0 Likes
Teoman
Level 2
Level 2
5 questions asked 10 replies posted 10 sign-ins

You are right but my code step in Standby mode in 2 3 sec. So that's not enough for re-debug I assume.  The only choice is erasing the program flash but I cannot connect via Memtool with DAS com port right now. 

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

If you are using a TriBoard then you can change the startup configuration to Generic Bootstrap Loader mode. Then when using the Memtool select (BSL/ASC) mode instead of DAP. Once you have configured the Memtool for this mode and it is open, apply power to the TriBoard and immediately click the "Connect" button and you should be able to connect to the device and replace the flash program with another one.

You can change the HW Boot configuration with to the Generic BSL mode by having DIP-switches 2,3 and 4 all on. 

cwunder_0-1646432239338.png

Here is a picture of the Memtool configured for BSL/ASC mode

cwunder_1-1646432308956.png

 

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

Two things to remember when the device is in BSL mode.

1) There is no timeout on the AURIX while it is waiting for the 128 bytes. So you don't need to hurry to connect with the Memtool when in this mode.

2) You cannot attach a debugger in this mode

Teoman
Level 2
Level 2
5 questions asked 10 replies posted 10 sign-ins

Thank you I solved the problem and understand debug method. One more question I relocate the project to TC332 board and settings are same between boards. Via USB connection, I cannot debug the module and the error; 

Error creating session
The debug instrument IO could not be initialized.
The GDI debug instrument provided the following error message.
There appears to be no debug probe attached, or it is not connected to a target that is powered on.

USB port can be seen in  Device Manager and TC3xx is selected at debug configs. How can I solve this problem? 

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

Hi, before relocate, you could use ADS 1.5.4 and example code to make sure the TC332 board is normal.

If you use UDE, you could debug the .elf with on-board miniwigger(if you use triboard). The UDE is already in ADS installation which you can find in C:\

0 Likes