Renesas


Renesas Electronics Corporation (TSE: 6723), the world's number one supplier of microcontrollers, is a premier supplier of advanced semiconductor solutions including microcontrollers, SoC solutions and a broad range of analog and power devices.

You are viewing an older revision! See the latest version

GR PEACH Getting Started

This page is for GR-PEACH rev.C.
If your GR-PEACH is rev.B, go to Information of GR-PEACH rev.B. (To identify GR-PEACH revision, see here.)

Preparation

Install the USB serial communication driver

For Windows(R) user:

  1. Connect GR-PEACH and PC with USB cable.
  2. After the mount GR-PEACH as "MBED" volume label, install this driver.

Add compiler for GR-PEACH

  1. The root folder of GR-PEACH mass storage drive includes "mbed.htm" .
  2. This file jumps to the site of GR-PEACH when double clicked.
  3. You can use mbed compiler for GR-PEACH after clicking "Add to your compiler" button.
    /media/uploads/ShinjiYamano/jpn_gettingstarted010.png

Build and Run

How to import, compile, and run.

  1. Click "Import Program" button in mbed site.
  2. Check "Update all libraries to the latest version", and click "Import" button.
  3. Get the source code to click "Import" button.
  4. Select "mbed" library, and delete "mbed" library.
    /media/uploads/RyoheiHagimoto/delete-mbed.png
  5. import library below.

    Import librarymbed-src_GR-PEACH_rev_c

    Fork of mbed-src. GR-PEACH revision c use only. 新ボード(GR-PEACH revision c)の端子変更を反映させたmbed-srcです。 2014年11月のProducer meetingで配布したボード(revision B)ではご利用になれません。

  6. Create binary file to click the "Compile" button.
    /media/uploads/RyoheiHagimoto/build.png
  7. When compile is finished, binary file is downloaded using browser function.
    Copy this file to mbed drive.
    For Window user: drag and drop.
    For Mac user : Refer here
  8. When GR-PEACH's reset button is pushed or reconnect USB cable, the program runs.

Follow the procedure of "How to import, compile, and run". The program to import is below.

Import programmbed_blinky

The example program for mbed pin-compatible platforms


Use A/D converter

Follow the procedure of "How to import, compile, and run". The program to import is below.

Import programAnalogIn-HelloWorld

Hello world program for mbed SDK AnalogIn API


Use Serial Peripheral Interface(SPI)

  1. Follow the procedure of "How to import, compile, and run". The program to import is below.

    Import programSPI_HelloWorld_Mbed

    SPI Hello World

  2. Before compile, edit main.cpp as below.

A part of main.cpp to delete

SPI spi(p5, p6, p7); // mosi, miso, sclk
DigitalOut cs(p8);


A part of main.cpp to add

SPI spi(D11, D12, D13);   // mosi, miso, sclk
DigitalOut cs(D10);


Use microSD

  1. Follow the procedure of "How to import, compile, and run". The program to import is below.
    During importing, the dialog appears.
    **DO NOT CHECK the "Update all libraries to the latest version".**

    Import programSDFileSystem_HelloWorld

    SD File System Hello World

  2. Before compile, edit main.cpp as below.

A part of main.cpp to delete

SDFileSystem sd(p5, p6, p7, p8, "sd"); // the pinout on the mbed Cool Components workshop board


A part of main.cpp to add

SDFileSystem sd(P8_5, P8_6, P8_3, P8_4, "sd");


Use Ethernet

  1. Follow the procedure of "How to import, compile, and run". The program to import is below.

    Import programTCPSocket_HelloWorld

    TCP Socket Hello World with Ethernet

  2. To specify MAC address, add fllowing function to main.cpp.

Specify MAC address

// set mac address
void mbed_mac_address(char *mac) {
    mac[0] = 0x00;
    mac[1] = 0x02;
    mac[2] = 0xF7;
    mac[3] = 0xF0;
    mac[4] = 0x00;
    mac[5] = 0x00;
}

Use GR-PEACH as USB Device

  1. Follow the procedure of "How to import, compile, and run". The program to import is below.

    Import programUSBMouse_HelloWorld

    USBMouse Hello World

    If you want to use a function other a mouse, please see USBDevice page.

Use USB Host

  1. To supply VBUS, please close JP3.
  2. Follow the procedure of "How to import, compile, and run". The program to import is below.

    Import programUSBHostMouse_HelloWorld

    USBHostMouse Hello World

    If you want to use a function other a mouse, please see USBHost page.

Use I2C

  1. To pull up I2C signals, please close jumpers. Platform page shows which jumper is need to close.
  2. Follow the procedure of "How to import, compile, and run". The program to import is below.

    Import programI2C_HelloWorld_Mbed

    Hello World for I2C

  3. Before compile, edit main.cpp as below.

A part of main.cpp to delete

I2C i2c(p28, p27);


A part of main.cpp to add

I2C i2c(I2C_SDA, I2C_SCL);

All wikipages