Blinky example Not working

I am running the blinky example on my renesas setup.
Setup details:

RZ/T Series for Real-Time Control

RZ Family

***-Bit & 32-Bit Arm®

-Based High-End MPUs

- Device(R9A07G074M04GBG)

Issue: I am able to create project, build project and able to load the project as well, but I dont see any change in led's blinking pattern.
If delay is increased/decreased, then there is no change in frequency of LED blinking.
LED's behave likes board reboot.

Project creation:

File --> New --> Renesas C/C++ Project --> Renesas RZ --> Renesas RZ/T C/C++ FSP Project --> Project Name --> FSP Version(2.2.0) --> Board(RSK+RZT2L (RAM execution without flash memory)) --> Device(R9A07G074M04GBG) --> Core (CR52_0) --> Language(C) --> IDE Project type(e2 studio managed Build) --> executable --> Bare metal blinky

Please assist how to run blinky and how to change the LED blinking patterns after changing delays.

  • yes, I tried all the mentioned things from above link.
    If we do change the SW4 setting as per the manual, code even not enter into the main.

    So again I changed the SW4 setting like:
    SW4: 1-2 ON
               3-4 OFF
               5-6 ON
               7-8 OFF

    I am creating project using: Board(RSK+RZT2L (RAM execution without flash memory)).

    I want to control LEDS from my blinky application.
    Please suggest All switch settings accordingly.

  • Hi asd,
    Please share more info about your issue.
    Maybe, you have a problem with the debugging?
    Did you use the J-Link OB debugger?
    Please see on p.14 from the shared link.
    Can you also share the log from the debugger?
    Kind Regards.

  • I have not a problem with debugging.
    I am not able to change the LED blinking pattern.
    Default LEDs blink for 1second delay.
    I want to the delay and upon this LEDs blinking pattern should chnage right??
    But  I am not able to do that.
    In below code when I change the value of  "bsp_delay_units", then led blinking frequency should change, but I dont see that on actual leds present on board.

    Also if I comment out the below line from below function, LEDs state should remains constant right?
    "R_BSP_PinToggle((bsp_io_region_t) leds.p_leds[i][1], (bsp_io_port_pin_t) leds.p_leds[i][0]);"
    But I also dont see that. 
    Even if I comment out the "R_BSP_PinToggle" and "R_BSP_SoftwareDelay" functions from halEntry, LED state should not change.
    And that is the Issue I am facing. I have no control over LEds.
    Here LEDs means I am refering USer leds especially LED1 and LED3.


    Refer the code snippet here:

    typedef enum
    {
    BSP_DELAY_UNITS_SECONDS = 1000000, ///< Requested delay amount is in seconds
    BSP_DELAY_UNITS_MILLISECONDS = 1000, ///< Requested delay amount is in milliseconds
    BSP_DELAY_UNITS_MICROSECONDS = 1 ///< Requested delay amount is in microseconds
    } bsp_delay_units_t;

    void hal_entry (void)
    {
    #if defined(BSP_MCU_GROUP_RZT2H)
    #if (defined(BSP_CFG_CORE_CR52) && (0 == BSP_CFG_CORE_CR52))

    /* Set "1" to CA550_CTRL. */
    R_MPU_AC->CPU_CTRL |= 0x00000100;
    #endif
    #endif

    /* Define the units to be used with the software delay function */
    const bsp_delay_units_t bsp_delay_units = BSP_DELAY_UNITS_MILLISECONDS;

    /* Set the blink frequency (must be <= bsp_delay_units */
    const uint32_t freq_in_hz = 2;

    /* Calculate the delay in terms of bsp_delay_units */
    const uint32_t delay = bsp_delay_units / freq_in_hz;

    /* LED type structure */
    bsp_leds_t leds = g_bsp_leds;

    /* If this board has no LEDs then trap here */
    if (0 == leds.led_count)
    {
    while (1)
    {
    ; // There are no LEDs on this board
    }
    }

    /* This code uses BSP IO functions to show how it is used.*/
    /* Turn off LEDs */
    for (uint32_t i = 0; i < leds.led_count; i++)
    {
    R_BSP_PinClear((bsp_io_region_t) leds.p_leds[i][1], (bsp_io_port_pin_t) leds.p_leds[i][0]);
    }

    while (1)
    {
    /* Toggle board LEDs */
    for (uint32_t i = 0; i < leds.led_count; i++)
    {
    R_BSP_PinToggle((bsp_io_region_t) leds.p_leds[i][1], (bsp_io_port_pin_t) leds.p_leds[i][0]);
    }

    /* Delay */
    R_BSP_SoftwareDelay(delay, bsp_delay_units);
    }

    }

    Also i am getting below warning after flashing the FW on board.

    Warning: The Operating Frequency needed to perform the Run-Break Time Measurement could not be calculated.

    Warning: Please go to Debug Tool Settings and set the Operating Frequency[MHz].





  • Also I want the Guidance about how to run UART and How to see prints??
    How to create project for this?/

  • HI asd,
    Probably, you do not re-build and re-debug your code.
    The Warning is normal.
    You can use an example program for SCI UART from this package RZ/T2L Group Example Program
    Kind Regards.

  • I am rebuilding the applicatio, infact I am doing clean all, build and debug again and again.

    Now in above provided example, I am using "RZT2L_RSK_sci_uart_Rev200", but In that i can see code is not entered into the main --> hal_entry

  • Also what should be the setting for debugger setting for above mentioned example:

    "Reset after Download"

    "Set CPSR(5bit) after Download" 


    I tried below both still I am not able to see code enters into the main.

    "Reset after Download" --> No

    "Set CPSR(5bit) after Download" --> Yes

    "Reset after Download" --> Yes

    "Set CPSR(5bit) after Download" --> No

  • I am not able to see example enters into the main.

    "Reset after Download" --> No

    "Set CPSR(5bit) after Download" --> Yes


    With above debugger setting I can see program break at "system_init();"in startup_core.c .
    But after this when I press resume button, I cant see program at main or hal entry.
    I used breakpoint in main and in hal_entry to check the program flow.

    But after "system_init();"in startup_core.c, resume press, program flow is just disappeared.

  • Basically, I am using "RZT2L_RSK_sci_uart_Rev200" program iven by you, and this program doesnt go beyond "system_init();"in startup_core.c.
    It is stuck in system_init itself.
    And I already saw couple of application given by renesas are not entering into main.
    encout program is the another example

  • Please suggest a fix for this. I am blocked now.

  • Hi asd,
    It is better to start with a very basic example - like blinky sample to make sure you are using correctly the e2studio and the debugger and in the next step you should try the other samples.
    So, to begin with follow the instructions mentioned in document : RZ/T2, RZ/N2 Getting Started with Flexible Software Package section 2.4.2 RSK+RZT2L if you have the RSK RZT2Land then in the section 4 to build and debug the blinky application. Normally, you should you see the RSK+RZ/T2L: LED0-6 blinking.
    Kind Regards.

  • I used that one as well, you can see my previous responses.

    When I used the blinky example, LEDs are blinking but I am not able change the frequency of of led blinking, so not sure about which code is running that time. When we do reboot LEDs are still blinking so it might be the some default code is running.

    From blinky example I am not able to change the frequency. So please help here then 

  • Hi asd,
    I can see from the code you shared that you modified the code.
    Please try with the code/ example as it is.
    If it works then try to change the delay or bsp_delay_units and see if it changes.
    Of course, you need to rebuild and debug every time.
    You can add some breakpoints inside while loop to make sure debugging is working.

    Refer the code snippet here:

    typedef enum
    {
    BSP_DELAY_UNITS_SECONDS = 1000000, ///< Requested delay amount is in seconds
    BSP_DELAY_UNITS_MILLISECONDS = 1000, ///< Requested delay amount is in milliseconds
    BSP_DELAY_UNITS_MICROSECONDS = 1 ///< Requested delay amount is in microseconds
    } bsp_delay_units_t;

    void hal_entry (void)
    {
    #if defined(BSP_MCU_GROUP_RZT2H)
    #if (defined(BSP_CFG_CORE_CR52) && (0 == BSP_CFG_CORE_CR52))

    /* Set "1" to CA550_CTRL. */
    R_MPU_AC->CPU_CTRL |= 0x00000100;
    #endif
    #endif

    Kind Regards.