TC4xx promo banner Banner_Aurix_Competition Banner_AURIX_Security-Solution Banner_AURIX_Safety_Products ShieldBuddy TC275 Banner_AURIX_DevelopmentStudio


+ Reply to Thread
Page 2 of 2 FirstFirst 1 2
Results 11 to 17 of 17

Thread: AURIX TC29x Flash Setting

  1. #11
    Advanced Advanced
    Infineon Employee
    Infineon Employee
    teoBits is on a distinguished road
    Join Date
    Nov 2019
    Posts
    99
    Points
    1390
    Quote Originally Posted by jie_xu View Post
    And this is the hex file

    :0200000480007A
    :2000000000000000700059B30000000000000000000000000 000000064B81E799B47E18668
    ...
    The hex file is writing on the Flash memory of your device, thus if the program does not work "without using PC" you have a problem in the code.

    Does the program works when started from the AURIX™ Development Studio in debug mode?

    BR,
    teoBits
    The views expressed here are my personal opinions, have not been reviewed or authorized by Infineon and do not necessarily represent the views of Infineon.

  2. #12
    Beginner Beginner jie_xu is on a distinguished road
    Join Date
    Mar 2020
    Posts
    10
    Points
    65
    Quote Originally Posted by teoBits View Post
    The hex file is writing on the Flash memory of your device, thus if the program does not work "without using PC" you have a problem in the code.

    Does the program works when started from the AURIX™ Development Studio in debug mode?

    BR,
    teoBits
    The program can work in debug mode,but when i choose run mode it will change to debug mode .

  3. #13
    Beginner Beginner jie_xu is on a distinguished road
    Join Date
    Mar 2020
    Posts
    10
    Points
    65
    Quote Originally Posted by teoBits View Post
    The hex file is writing on the Flash memory of your device, thus if the program does not work "without using PC" you have a problem in the code.

    Does the program works when started from the AURIX™ Development Studio in debug mode?

    BR,
    teoBits
    It can run in debug mode, but the program cannot be started automatically after power off, so will it be the program entry setting error?

  4. #14
    Advanced Advanced
    Infineon Employee
    Infineon Employee
    teoBits is on a distinguished road
    Join Date
    Nov 2019
    Posts
    99
    Points
    1390
    I'm sorry but it' difficult to help you with this level of details, can you explain better what your program is doing? can you attach the source code of it?

    BR,
    teoBits
    The views expressed here are my personal opinions, have not been reviewed or authorized by Infineon and do not necessarily represent the views of Infineon.

  5. #15
    Beginner Beginner jie_xu is on a distinguished road
    Join Date
    Mar 2020
    Posts
    10
    Points
    65
    Quote Originally Posted by teoBits View Post
    I'm sorry but it' difficult to help you with this level of details, can you explain better what your program is doing? can you attach the source code of it?

    BR,
    teoBits
    Thanks for your replay.
    This is the Cpu0_Main.c code:
    /************************************************** ************************************************** ******************
    * \file Cpu0_Main.c
    * \copyright Copyright (C) Infineon Technologies AG 2019
    *
    * Use of this file is subject to the terms of use agreed between (i) you or the company in which ordinary course of
    * business you are acting and (ii) Infineon Technologies AG or its licensees. If and as long as no such terms of use
    * are agreed, use of this file is subject to following:
    *
    * Boost Software License - Version 1.0 - August 17th, 2003
    *
    * Permission is hereby granted, free of charge, to any person or organization obtaining a copy of the software and
    * accompanying documentation covered by this license (the "Software") to use, reproduce, display, distribute, execute,
    * and transmit the Software, and to prepare derivative works of the Software, and to permit third-parties to whom the
    * Software is furnished to do so, all subject to the following:
    *
    * The copyright notices in the Software and this entire statement, including the above license grant, this restriction
    * and the following disclaimer, must be included in all copies of the Software, in whole or in part, and all
    * derivative works of the Software, unless such copies or derivative works are solely in the form of
    * machine-executable object code generated by a source language processor.
    *
    * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
    * WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
    * COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN
    * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
    * IN THE SOFTWARE.
    ************************************************** ************************************************** *****************/
    #include "Ifx_Types.h"
    #include "IfxCpu.h"
    #include "IfxScuWdt.h"
    #include "IfxPort.h"
    #include <stdio.h>

    IfxCpu_syncEvent g_cpuSyncEvent = 0;

    int 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_getCpuWatch dogPassword());
    IfxScuWdt_disableSafetyWatchdog(IfxScuWdt_getSafet yWatchdogPassword());

    /* Wait for CPU sync event */
    IfxCpu_emitEvent(&g_cpuSyncEvent);
    IfxCpu_waitEvent(&g_cpuSyncEvent, 1);
    IfxPort_setPinMode(&MODULE_P33, 6, IfxPort_Mode_outputPushPullGeneral);
    int count = 0;
    while(1)
    {
    for(int i = 0 ;i < 100 ; i++)
    {
    for(int j = 0 ;j < 100 ; j++)
    {
    for(int k = 0 ;k < 100 ; k++)
    {

    }
    }
    }
    IfxPort_setPinMode(&MODULE_P33, 6, IfxPort_Mode_inputPullUp);

    for(int i = 0 ;i < 100 ; i++)
    {
    for(int j = 0 ;j < 100 ; j++)
    {
    for(int k = 0 ;k < 100 ; k++)
    {


    }
    }

    }
    IfxPort_setPinMode(&MODULE_P33, 6, IfxPort_Mode_inputPullDown);

    }
    return (1);
    }




    And can you provide a demo?
    Thanks.

  6. #16
    Advanced Advanced
    Infineon Employee
    Infineon Employee
    teoBits is on a distinguished road
    Join Date
    Nov 2019
    Posts
    99
    Points
    1390
    Hello jie_xu,

    From the code, looks like you are trying to blink an LED with some nested loops used as delay, is it correct?
    If so, you cannot use the function IfxPort_setPinMode() to change the state of a port pin, instead you have to use the IfxPort_togglePin() or the IfxPort_setPinHigh()/IfxPort_setPinLow() functions.

    If you want a demo, you can take a look at the Blinky_LED_1 example, together with its tutorial.
    The example can also be directly imported in the AURIX™ Development Studio by using the tool: File >> Import... >> Infineon >> "AURIX Development Studio Project", select "Infineon Code Examples Repository" and select the code example to be imported.

    If you are interested in other modules and you want to start programming for AURIX™, get inspired by numerous trainings from here: AURIX™ Trainings.

    Finally, checkout the Getting Started guide for better understanding how the AURIX™ Development Studio works!

    BR,
    teoBits
    The views expressed here are my personal opinions, have not been reviewed or authorized by Infineon and do not necessarily represent the views of Infineon.

  7. #17
    Beginner Beginner jie_xu is on a distinguished road
    Join Date
    Mar 2020
    Posts
    10
    Points
    65
    Quote Originally Posted by teoBits View Post
    Hello jie_xu,

    From the code, looks like you are trying to blink an LED with some nested loops used as delay, is it correct?
    If so, you cannot use the function IfxPort_setPinMode() to change the state of a port pin, instead you have to use the IfxPort_togglePin() or the IfxPort_setPinHigh()/IfxPort_setPinLow() functions.

    If you want a demo, you can take a look at the Blinky_LED_1 example, together with its tutorial.
    The example can also be directly imported in the AURIX™ Development Studio by using the tool: File >> Import... >> Infineon >> "AURIX Development Studio Project", select "Infineon Code Examples Repository" and select the code example to be imported.

    If you are interested in other modules and you want to start programming for AURIX™, get inspired by numerous trainings from here: AURIX™ Trainings.

    Finally, checkout the Getting Started guide for better understanding how the AURIX™ Development Studio works!

    BR,
    teoBits
    Thanks for your help again.

    I have found my problem.I found that the LED I want to blink is also the DEBUG mode indicator. When I change the LED ,It can blink normally.

+ Reply to Thread

Tags for this Thread

Disclaimer

All content and materials on this site are provided “as is“. Infineon makes no warranties or representations with regard to this content and these materials of any kind, whether express or implied, including without limitation, warranties or representations of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. No license, whether express or implied, is granted by Infineon. Use of the information on this site may require a license from a third party, or a license from Infineon.


Infineon accepts no liability for the content and materials on this site being accurate, complete or up- to-date or for the contents of external links. Infineon distances itself expressly from the contents of the linked pages, over the structure of which Infineon has no control.


Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Usage Terms of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Usage Terms of this site. Infineon reserves the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.