Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Version

Changes

1.0

Initial version

1.1

Clarification of naming

1.2

List of components and examples

Table of Contents

Introduction

uGOAL describes a software package, which allows integration of of the irj45/SoM module into applications without using a full GOAL framework platform. By stripping down the required dependencies from the GOAL industrial communication framework, integration is possible into a wide range of platforms from a simple ATMEGA 8-bit CPU with 2KB of RAM up to a linux PC.

...

Function

Signature

Remark

plat_init

Code Block
languagec
void plat_init(
    void
);  

This function is called upon start of the application. It is required to initialize the required hardware peripherals here:

  • SPI

  • Timer

  • I2C (optional)

  • Memory HEAP

plat_spiTransfer

Code Block
int plat_spiTransfer(
    const char *txBuf,                          /**< [in] transmission buffer */
    char *rxBuf,                                /**< [out] receive buffer */
    int size                                    /**< size of valid buffer sizes */
);

This function needs to transfer the given data (txBuf) with a length of size to the CCM module. The response data needs to be propagated into the rxBuf buffer. Only the amount of data (size) is allowed to write into rxBuf.

This function is called cyclically by the uGOAL framework.

plat_ledSet

Code Block
languagec
int plat_ledSet(
    uint32_t state                              /**< led state field */
);

This function can be used to set LED states acquired from the CC module, which may be required for some fieldbus protocol implementations.

plat_heapAllocDone

Code Block
void plat_heapAllocDone(
    void
);

This function is called when dynamic memory allocation is done. It can be used to evaluate the memory utilisation.

plat_getMsTimer

Code Block
GOAL_TIMESTAMP_T plat_getMsTimer(
    void
);

This function needs to return the number of milliseconds from start of the system. It is needed for timed operations and timeouts.

Multitasking

The software delivery does not specifically consider issues of multi tasking systems. Thus if one wants to integration the code into a multitasking application, all uGOAL relevant functions should be concentrated and called from one single task. Data exchange with other tasks should be done in a protected way (locking, messages, semaphores, queues). This is not scope of the software delivery.

Configuration

Following table shows the most important configuration options of the software. Those are defined with a default value in ugoal/ugoal_default.h.

...