Targets


RENESAS Synergy


Development Environment

  • e2studio Version 7.5.1
  • ssp Version 1.7.5

Supported Hardware

Renesas S7G2-SK


https://www.renesas.com/kr/en/products/synergy/hardware/kits/sk-s7g2.html

  • SPI Channel: 8

    Function

    Pin

    SPI MISO

    IOPORT_PORT_01_PIN_04

    SPI MOSI

    IOPORT_PORT_01_PIN_05

    SPI SCK

    IOPORT_PORT_01_PIN_06

    SPI CS

    IOPORT_PORT_05_PIN_07

    RESET

    IOPORT_PORT_06_PIN_14

    Table 43 SPI Pinning used on Renesas S7G2-SK Board

  • UART Channel: 2


Function

Pin

RXD

IOPORT_PORT_03_PIN_01

TXD

IOPORT_PORT_03_PIN_02

Table 44 UART Pinning used on Renesas S7G2-SK Board

Arrow Aris


https://www.arrow.de/campaigns/aris

  • SPI Channel: 0

    Function

    Pin

    SPI MISO

    IOPORT_PORT_04_PIN_10

    SPI MOSI

    IOPORT_PORT_04_PIN_11

    SPI SCK

    IOPORT_PORT_04_PIN_12

    SPI CS

    IOPORT_PORT_02_PIN_03

    RESET

    IOPORT_PORT_05_PIN_05

    Table 45 Pinning used on Arrow ARIS Board

  • UART Channel: 7


Function

Pin

RXD

IOPORT_PORT_04_PIN_02

TXD

IOPORT_PORT_04_PIN_01

Table 46 UART Pinning used on Arrow ARIS Board

Adaption for customer hardware


To apply the provided irj45 AC examples to a customer hardware, at least the following properties must be adapted to this board.
Since the applications base on the GOAL middleware, the proper way to adapt the example to a new hardware would be to create a board specific goal_target_board module.
The following chapters show where adaption is required:

SPI configuration


In goal_target_board.h there is a configuration option for the chip select pin of the SPI interface. This needs to be adapted to the target hardware:
/****************************************************************************/  
/ Configuration /  
/****************************************************************************/  
#define GOAL_DRV_SPI_CS_PIN       IOPORT_PORT_05_PIN_07 /*< SPI chip select pin /  
In goal_target_board.c within the function goal_tgtBoardInit the SPI driver is registered.
/ register SPI driver /  
res = goal_drvSpiSynReg(GOAL_ID_DEFAULT, 8);  
if (GOAL_RES_ERR(res)) {  
    goal_logErr("failed to register Synergy SPI driver");  
    return res;  

The second parameter of goal_drvSpiSynReg defines the SPI channel to use.
Configuration of the SPI needs to be done in e2studio:

Figure 4 e2studio SPI properties

Figure 5 e2studio SPI pinning

LED control


The goal middleware provides mechanism for LED control. The board files of the example code contain registration of a driver for the irj45 shield, which contains several LEDs. The driver, located in "plat\drv\led\iic\synergy7_irj45shield" controls the LEDs on this additional board, which are connected by an I2C bus.
#if GOAL_CONFIG_DRV_LED_IIC_SYNERGY7_irj45SHIELD == 1  
    / register LED driver /  
    if (GOAL_RES_OK(res)) {  
        res = goal_drvLedIicSynergy7irj45shieldReg(  
            LEDS_OFF, GOAL_ID_MA_LED_DEFAULT);  
    }  
  
    if (GOAL_RES_OK(res)) {  
        res = goal_maLedGetById(&pMaLed, GOAL_ID_MA_LED_DEFAULT);  
    }  
  
    if (GOAL_RES_OK(res)) {  
        goal_maLedRegisterLed(pMaLed, GOAL_MA_LED_LED1_RED, 0);  
        goal_maLedRegisterLed(pMaLed, GOAL_MA_LED_LED1_GREEN, 2);  
        goal_maLedRegisterLed(pMaLed, GOAL_MA_LED_LED2_RED, 4);  
        goal_maLedRegisterLed(pMaLed, GOAL_MA_LED_LED2_GREEN, 6);  
        goal_maLedRegisterLed(pMaLed, GOAL_MA_LED_ETHERCAT, 8);  
        goal_maLedRegisterLed(pMaLed, GOAL_MA_LED_PROFINET, 10);  
        goal_maLedRegisterLed(pMaLed, GOAL_MA_LED_MODBUS, 12);  
        goal_maLedRegisterLed(pMaLed, GOAL_MA_LED_ETHERNETIP, 14);  
        goal_maLedRegisterLed(pMaLed, GOAL_MA_LED_CANOPEN, 16);  
    }  
#endif  
For a customer hardware a board specific driver should be implemented and registered accordingly.

Timer


The GOAL middleware requires a timer, which periodically calls the function goal_targetTimerCallback each millisecond. This timer is also initiated within the e2studio project.

ThreadX


The e2studio projects for the irj45 requires HWOS features of ThreadX. The reach a specific resolution the ThreadX property "Timer Ticks Per Second" was increased to 1000.

Figure 6 ThreadX configuration

Logging


There are multiple possibilities for logging. Once the SPI, thus RPC communication is established, log messages of the AC can be transferred to the CC. Therefore, these messages can be seen using the Management tool. This possibility is enabled using an RPC function (see chapter 6.1.7).
For the Synergy S7G2SK a USB to Serial Adapter is required, e.g. the FTDI:
https://www.ftdichip.com/Support/Documents/DataSheets/Cables/DS_TTL-232RG_CABLES.pdf
To use the UART on Synergy S7G2SK, please check the user manual:
https://www.renesas.com/us/en/doc/products/renesas-synergy/doc/r12um0004eu0100_synergy_sk_s7g2.pdf
Please set jumper J9 to 3-5 and 4-6 (RS485 mode). Then the UART TX line from the
Synergy CPU will be connected to Pin 4 of J10. This is where the RX line from
the USB-Serial converter needs to be connected.
The UART is initialized with a baudrate of 115200 bps, 8 databits, no paritiy, 1 stop bit and no handshake. The connection provides both UART signals with 3.3 Volt level.

STM32

Development Environment


  • STM Cube IDE 1.0


Supported Hardware


Nucleo-STM32F429ZI


https://www.st.com/en/evaluation-tools/nucleo-f429zi.html

  • SPI Channel: 1

    Function

    Pin

    SPI MISO

    GPIO A / PIN 6

    SPI MOSI

    GPIO A / PIN 7

    SPI SCK

    GPIO A / PIN 5

    SPI CS

    GPIO D / PIN 14

    RESET

    GPIO F / PIN 13

    Table 47 SPI Pinning used on Nucleo-STM32F429ZI Board

  • UART Channel: 3


Function

Pin

RXD

GPIO C / PIN 9

TXD

GPIO C / PIN 8

Table 48 UART Pinning used on Nucleo-STM32F429ZI Board

Adaption to customer hardware


SPI:
See driver in plat/drv/spi/stm32f4xx
UART:
See driver in plat/drv/uart/stm32fxxx
LED:
See driver in plat/drv/led/iic/stm32f4xx_ccmshield.c|h

Logging


There are multiple possibilities for logging. Once the SPI, thus RPC communication is established, log messages of the AC can be transferred to the CC. Therefore, these messages can be seen using the Management tool. This possibility is enabled using an RPC function (see chapter 6.1.7).
Beside that local logging is possible using a UART. For the examples, the provided USB-UART Converter on the debugging interface is supported and UART logging is enabled by default.
The UART is initialized with a baudrate of 115200 bps, 8 databits, no paritiy, 1 stop bit and no handshake.

Raspberry Pi

Development Environment


  • Raspberry Pi with raspian version 9 (stretch)


Supported Hardware


  • Tested on raspberry pi 1 and 3


  • SPI Channel: 1

    Function

    Pin

    SPI MISO

    GPIO 9

    SPI MOSI

    GPIO 10

    SPI SCK

    GPIO 11

    SPI CS

    GPIO 8

    RESET

    GPIO 13

    Table SPI Pinning used on raspberry pi

    Adaption to customer hardware


    SPI:
    See driver in plat/drv/spi/linux
    LED:
    See driver in plat/drv/led/iic/iic_linux

    Logging


    There are multiple possibilities for logging. Once the SPI, thus RPC communication is established, log messages of the AC can be transferred to the CC. Therefore, these messages can be seen using the Management tool. This possibility is enabled using a RPC function (see chapter 6.1.7).
    Beside that logging is possible to the console. Using the RPC function appl_ccmLogToAcEnable() also log messages from the CC module can be seen here.