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

cross mob
Amr-khaled-Aziz
Level 1
Level 1
First like given 10 sign-ins 5 replies posted

Hello All,

I am using Aurix TC399 kit, I am trying to configure some parameters via the command line which is done successfully based on this example https://www.infineon.com/dgdl/Infineon-ASCLIN_Shell_UART_1_KIT_TC397_TFT-Training-v01_02-EN.pdf?file...

Now I want to have a default configuration applied at startup without the need to send the configuration every time after reset. So is there a way to inject a default command at start-up like simply "info".

BR,

0 Likes
1 Solution

Hi @Amr-khaled-Aziz 

Maybe you can use an Serial Port Terminal program that allows scripting, with this you will be able to communicate your device to an automated Serial terminal that facilitates you the testing and analysis of your application.

BR,
Ulises

View solution in original post

7 Replies
Ulises_L
Moderator
Moderator
Moderator
10 solutions authored 25 replies posted 50 sign-ins

Hi @Amr-khaled-Aziz 

"Now I want to have a default configuration applied at startup without the need to send the configuration every time after reset. So is there a way to inject a default command at start-up like simply "info”.
By this, do you mean that  you want to change the startup Shell message after reset for another different?

Best Regards,
Ulises

0 Likes
Amr-khaled-Aziz
Level 1
Level 1
First like given 10 sign-ins 5 replies posted

Hi @Ulises_L ,

No more like simulate as if a command is entered after every reset like help or info or any other I choose.

BR,

0 Likes

Unfortunately this is not possible with the ADS Terminal, to do this, you will need to connect through UART to another system that make those responses automatically.

BR,
Ulises 

0 Likes

Hi @Amr-khaled-Aziz 

If you want to show a "command" for example printInfo command every time you reset the micro, why don't you just make something like:

static void welcome(void){
 IfxStdIf_DPipe_print(io, ENDLINE);
    IfxStdIf_DPipe_print(io, "******************************************************************************"ENDLINE);
    IfxStdIf_DPipe_print(io, "This is an example that shows how to use the Infineon Shell from iLLDs.       "ENDLINE);
    IfxStdIf_DPipe_print(io, "In order to toggle the LEDs enter the command '" COMMAND_TOGGLE "' followed by one of the "ENDLINE);
    IfxStdIf_DPipe_print(io, "following parameters:                                                         "ENDLINE);
    IfxStdIf_DPipe_print(io, "  - '0': turns on all the LEDs on the board                                   "ENDLINE);
    IfxStdIf_DPipe_print(io, "  - '1': toggles the LED D107                                                 "ENDLINE);
    IfxStdIf_DPipe_print(io, "  - '2': toggles the LED D108                                                 "ENDLINE);
    IfxStdIf_DPipe_print(io, "  - '3': toggles the LED D109                                                 "ENDLINE);
    IfxStdIf_DPipe_print(io, "  - '4': toggles the LED D110                                                 "ENDLINE);
    IfxStdIf_DPipe_print(io, "Any other parameter turns off all the LEDs and reports a Shell command error. "ENDLINE);
    IfxStdIf_DPipe_print(io, "******************************************************************************"ENDLINE);
}

 Call it before the main,

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);
    
    /* Initialize the Shell Interface and the UART communication */
    initShellInterface();
    welcome();
    while(1)
    {
        runShellInterface(); /* Run the application shell */
    }
}

there's not need to call it thru the use of the terminal.

Regards! :1

0 Likes

Hello @David_R ,

Sorry for the late response.

No, I don't just need simple print statements, I just used "info" as an example. What I need to call is another custom command that configures some parameters in the system that the system can't start operating without.

So I need to emulate the calling of this config command to start operating normally without having to enter this command after every reset.

I hope this makes it clearer.

BR,

0 Likes

Hello @Amr-khaled-Aziz 

No, I don't just need simple print statements, I just used "info" as an example. What I need to call is another custom command that configures some parameters in the system that the system can't start operating without.

Please let me know if i'm correct, so you want a custom command to enable the MCU, otherwise the MCU keeps "sleeping", is that correct?,  if it was, then you want to know how to create the custom command?

So I need to emulate the calling of this config command to start operating normally without having to enter this command after every reset.

I don't understand why it has to be thru the terminal?, you can create the function to wait for this custom command to start the MCU, so if you could please give us more details about it.

Regards! :1

 

0 Likes

Hi @Amr-khaled-Aziz 

Maybe you can use an Serial Port Terminal program that allows scripting, with this you will be able to communicate your device to an automated Serial terminal that facilitates you the testing and analysis of your application.

BR,
Ulises