Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Added Note about Debugging Options per Makesystem.

...

Following table shows the basic structure of the SPI frame.

Range

Length

Description

0 .. 3

4 byte

MCTC SPI header

4 .. 76

73 byte

cyclic data (data mapper)

77 .. 126

50 byte

RPC data

127

1 byte

reserved

The block MCTC SPI Header contains the following elements:

...

The RPC synchronisation follows a state machine with the following states:

State

Description

GOAL_MI_MCTC_RPC_STATE_INIT

Initial state

Entered initially or in error case

GOAL_MI_MCTC_RPC_STATE_SYNC_REQ

Initial request state

Entered after INIT state

GOAL_MI_MCTC_RPC_STATE_SYNC_ACK_LOCAL

Initial acknowledge state

Entered after SYNC REQ state

GOAL_MI_MCTC_RPC_STATE_SYNC_ACK_REMOTE

Initial sync request was acknowledged

Entered if SYNC request was acknowledged, the peer module received our request!

GOAL_MI_MCTC_RPC_STATE_RUN_ONCE

Setup state after Sync

Entered when SYNC was successful

GOAL_MI_MCTC_RPC_STATE_RUN

Normal operating state

Entered after SYNC is done

So if the state GOAL_MI_MCTC_RPC_STATE_SYNC_ACK_REMOTE is entered, the communication module received the frames sent by the application controller.

...

Code Block
languagec
/* for debugging purpose disable any timeout detection on the peer */
#define CONFIG_UGOAL_TIMEOUT_RPC 0
#define CONFIG_UGOAL_TIMEOUT_MEDIA 0

or using the make system, using the command in a project directory, like ugoal/projects/ugoal/02_profinet/gcc:

Code Block
languagec
user: ~/.../02_profinet/gcc: make debug
removed directory: build/
 *** Debugging Mode enabled ***

and building the project:

Code Block
user: ~/ugoal/projects/ugoal/02_profinet/gcc: make PLATFORM=stm32f429zi

 *** Debugging Mode enabled - note that: ***
    > this mode should only be used for debugging purposes
    > peer-loss detection on application controller is disabled
    > logging might be enabled

 *** Disabling per 'make debug' ***

platform pre
[CC] plat/stm32/plat.c
...
Info

To switch the Debugging Mode off, use ‘make debug’ too

For GOAL based application, following code needs to be called before any other functions. So best place the following calls in appl_init():

...