Skip to main content

TestMostWriteReg

Valid for: CANoe DE

Function Syntax

long TestMostWriteReg(long aChannel, long aChip, dword aOffset, dword aRegDataLen, BYTE aRegData[], unsigned long aTimeout);

Description

Writes one or several chip registers in the MOST hardware and waits for the result. If the operation is successful, the written register values can be read out using TestMostRegGetData.

Parameters

  • aChannel: Channel connected to the hardware.
  • aChip: MOST hardware chip ID. Possible values are:
    • 1 : OS814 (other chips cannot be accessed as of yet)
  • aOffset: First register address.
  • aRegDataLen: Number of registers to be read (maximum 16 bytes with VN2600/VN2610).
  • aRegData[]: Data buffer with data to write (minimum size aRegDataLen).
  • aTimeout: Maximum time that should be waited [ms] (Transmission of 0: no timeout monitoring; test module waits infinitely long).

Return Values

  • -2: Resume based on Constraint Violation
  • -1: General error e.g. the functionality is not available
  • 0: Resume based on Timeout
  • 1: Resume based on occurred event

Example

TestMostReadRegTestMostRegGetData