Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: updated e2Studio and SSP version


Anchor
_Toc534961872
_Toc534961872
Anchor
_Toc9336765
_Toc9336765
Anchor
_Toc9939677
_Toc9939677
Anchor
_Toc51107427
_Toc51107427
RENESAS Synergy

...

Anchor
_Toc9336766
_Toc9336766
Anchor
_Toc9939678
_Toc9939678
Anchor
_Toc51107428
_Toc51107428
Development Environment

  • e2studio Version 7.5.4.0.0231
  • ssp Version 1.37.05

Anchor
_Toc9336767
_Toc9336767
Anchor
_Toc9939679
_Toc9939679
Anchor
_Toc51107429
_Toc51107429
Supported Hardware

...


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

Anchor
_Toc9336768
_Toc9336768
Anchor
_Toc9939680
_Toc9939680
Anchor
_Toc51107430
_Toc51107430
Adaption for customer hardware

...


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:

Anchor
_Toc9245064
_Toc9245064
Anchor
_Toc9335170
_Toc9335170
Anchor
_Toc9939867
_Toc9939867
Anchor
_Toc49258696
_Toc49258696
Figure 4 e2studio SPI properties

Anchor
_Toc9245065
_Toc9245065
Anchor
_Toc9335171
_Toc9335171
Anchor
_Toc9939868
_Toc9939868
Anchor
_Toc49258697
_Toc49258697
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.

Anchor
_Toc9245066
_Toc9245066
Anchor
_Toc9335172
_Toc9335172
Anchor
_Toc9939869
_Toc9939869
Anchor
_Toc49258698
_Toc49258698
Figure 6 ThreadX configuration

Anchor
_Toc9336769
_Toc9336769
Anchor
_Toc9939681
_Toc9939681
Anchor
_Toc51107431
_Toc51107431
Logging

...


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

Anchor
_Toc51107435
_Toc51107435
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

Anchor
_Toc51107436
_Toc51107436
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.

Anchor
_Ref21504822
_Ref21504822
Anchor
_Toc51107437
_Toc51107437
Raspberry Pi

...

  • 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

    Anchor
    _Toc51107440
    _Toc51107440
    Adaption to customer hardware


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

    Anchor
    _Toc51107441
    _Toc51107441
    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.