Table of Contents Index NMS Glossary Previous Page Next Page (Page 4 of 29 in this chapter) Version


swiConfigBoardClock

Description

Establishes the clock source for an MVIP board.

Prototype

DWORD swiConfigBoardClock ( SWIHD swihd,
SWI_CLOCK_ARGS *args)

swihd Handle returned by swiOpenSwitch.

args Pointer to a clock parameter structure for configuring the MVIP board clock. The SWI_CLOCK_ARGS structure is:

typedef struct
{
DWORD size;
DWORD clocktype;
DWORD clocksource;
DWORD network;

union
{
struct
{
DWORD h100clockmode;
DWORD autofallback; DWORD netrefclockspeed; DWORD fallbackclocksource; DWORD fallbacknetwork; }h100;
} ext; /* specific extensions per board based on clocktype */
} SWI_CLOCK_ARGS;

See the Details section for a description of these fields.

Return Values

Events

Details

This function establishes the clock source for a CT Bus board. This function supports clock configuration for all standard MVIP boards, H.100/H.110, and future generations of CT Bus boards.

Note: If you open a switch and call swiConfigSec8KClock without calling swiConfigBoardClock at least once, the clock source is changed to OSC. To prevent this, call swiConfigBoardClock before calling swiConfigSec8KClock for the first time on a particular switch handle.

The size, clocktype, clocksource, and network fields of the SWI_CLOCK_ARGS structure are identical across all board types:
Field

Description

size

Specifies the number of bytes contained in the structure. If size is less than the size of SWI_CLOCK_ARGS, the command will only use the number of bytes specified by size. If size is greater than the size of SWI_CLOCK_ARGS, size will be set to the size of SWI_CLOCK_ARGS, and the command will use this number of bytes.

clocktype

Specifies the MVIP standard to which clocking on the board applies.

Acceptable clocktype values are:
MVIP95_STD_CLOCKING
MVIP95_H100_CLOCKING

clocksource

Specifies where the clock reference originates.

Acceptable values for clocksource are:
MVIP95_SOURCE_INTERNAL
MVIP95_SOURCE_SEC8K
MVIP95_SOURCE_MVIP

Additional values for clocksource for H.100/H.110 boards are:
MVIP95_SOURCE_NETWORK
MVIP95_SOURCE_H100_A
MVIP95_SOURCE_H100_B
MVIP95_SOURCE_H100_NETREF
MVIP95_SOURCE_H100_NETREF_1
MVIP95_SOURCE_H100_NETREF_2

network

Specifies the device source for the MVIP clock signals.
Acceptable values for network are 1 to n where n is the number of devices on the specified board capable of being a clock source. A value for network is valid only when clocksource is equal to MVIP95_SOURCE_NETWORK.

The extension section of the SWI_CLOCK_ARGS structure is a union that currently has a structure for H.100/H.110 boards. Further evolution of MVIP and CT Bus standardization work will modify this part of the SWI_CLOCK_ARGS structure.

Field

Description

h100clockmode

Specifies the board's control of the H.100/H.110 clocks.

Acceptable values for h100clockmode are:

MVIP95_H100_SLAVE

MVIP95_H100_MASTER_A

MVIP95_H100_MASTER_B

MVIP95_H100_STAND_ALONE

autofallback

Specifies whether the board is to automatically switch to fallback mode and become a slave to the alternate H.100/H.110 clock. Acceptable values for autofallback are:

MVIP95_H100_DISABLE_AUTO_FB

MVIP95_H100_ENABLE_AUTO_FB

netrefclockspeed

Specifies the speed of the NETREF clock signal. Acceptable values are:

MVIP95_H100_NETREF_8KHZ

MVIP95_H100_NETREF_1544MHZ

MVIP95_H100_NETREF_2048MHZ

fallbackclocksource

Specifies the clock reference to be used when an automatic clock fallback occurs. This field is ignored unless autofallback is set to MVIP95_H100_ENABLE_AUTO_FB. Acceptable values are the same as for clocksource.

fallbacknetwork

Specifies the on-board source of an external network timing for the fallback reference when there are multiple external network connections to the board and fallbackclocksource is set to MVIP95_SOURCE_NETWORK. Acceptable values are:

1..n where n is the number of devices on the specified board capable of being a clock source.

For H.100/H.110 boards:

Refer to Chapter 4 for more information about configuring clocks.

If CTAERR_DRIVER_ERROR is returned, call swiGetLastError to retrieve the MVIP device error code.

See Also

swiConfigSec8KClock, swiGetBoardClock, swiGetLastError, swiGetTimingReference, swiOpenSwitch

Example


void myAGT1ClockFallback(SWIHD swihd)
{
SWI_CLOCK_ARGS boardclock;

/* Make AG-T1 sync off SEC8K */
boardclock.size = sizeof(SWI_CLOCK_ARGS);
boardclock.clocktype = MVIP95_STD_CLOCKING;
boardclock.clocksource = MVIP95_SOURCE_SEC8K;
swiConfigBoardClock(t1hd, &boardclock);
}


Table of Contents Index NMS Glossary Previous Page Next Page (Page 4 of 29 in this chapter) Version


Want to send us feedback on our documentation? Email: Tech_Pubs@nmss.com
Copyright © 2000, Natural MicroSystems, Inc. All rights reserved.