S5D9 HowTo: Build Blinky from Source with Synergy and e2 Studio


#1

Blinky Build and Install

blinky builds

Flash the blinky.srec directly to the board.

To use J-Flash Lite, I need to identify the specific Renesas device (MCU), I’m going to start off with first identifying the S5D9 version used.

It seems likely that the MCU is:

R7FS5D97E2A01CLK

Using J-Flash Lite to Transfer the .srec

Connect J-Flash Lite Segger debugger board to S5D9 board.

Windows installs J-Link driver automatically.

I updated the driver.

Selecting Renesas Device R7FS5D97E

Using JTAG interface

Selecting my .srec to upload

Flash to board works. Blinky works.

Success

Modifying Blinky rate.

In hal_entry.c change the bsp_delay_units_t to your favorite millisecond delay. I’m using 500ms delay.

Modifying Which LED Blinks

in hal_entry.c comment out the for loop that displays all LEDs and select the LEDs you want to blink with one or more of these array elements:

  • leds.p_leds[0]
  • leds.p_leds[1]
  • 'leds.p_leds[2]`

Alternating Blink between two LEDs

All LEDs are off when the board boots. If I set the first LED to true, then led[0] and led[2] will alternate.

 bool level_0 = true;

    while(1)
    {


        /* Determine the next state of the LEDs */
        if(IOPORT_LEVEL_LOW == level)
        {
            level = IOPORT_LEVEL_HIGH;
        }
        else
        {
            level = IOPORT_LEVEL_LOW;
        }

        /* Update all board LEDs */
//        for(uint32_t i = 0; i < leds.led_count; i++)
//        {
//            g_ioport.p_api->pinWrite(leds.p_leds[i], level);
//        }

        g_ioport.p_api->pinWrite(leds.p_leds[2], level);
        g_ioport.p_api->pinWrite(leds.p_leds[0], level_0);

        if(level_0)
        {
            level_0 = false;
        }
        else
        {
            level_0 = true;
        }

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

S5D9 IoT Fast Prototyping Kit Tutorials
#2

Thanks Craig for putting this together. How do I obtain a J-link lite debugger? Are these available from Renesas? Regards, Leon


#3

I have an updated guide here:

https://codetricity.github.io/s5d9-hacking/synergy/custom/

J-Link Software is here:

https://www.segger.com/downloads/jlink/

If you need the physical board in the picture, we may be able to send you one for free if you’re willing to write up a tutorial of your experiences. Contact @jcasman for more information is you need the debugger board.

The board I’m referring to is on the right of the picture below.

you may be able to get this on eBay for $11 to $17.

Important: I don’t know which debugger boards will work with the S5D9. We are trying to contact Renesas to get more information. Unless you have prior experience with these debugger boards. Please wait before you buy one.

The one I’m using was in the S3A7 IoT Fast Prototyping Kit, which is a $157 kit with board, battery, cables, debugger, and discrete sensors. We have some units that were only used once for training. If you write a HowTo tutorial, maybe Jesse can send you a full kit for free that includes the debugger.