System Controller Usb Serial Commands; I/O Control Requests/Answers - Kontron MSM-LP User Manual

Table of Contents

Advertisement

4.2

System Controller USB Serial Commands

Note:
"System Controller USB" function must be enabled in the BIOS setup for using the ADC and PWM functions.
MSM-LP on-board 4-channel ADC and 2-channel PWM are accessible over a USB-serial port interface.
»
In the Windows Device Manager it is represented as "KCC ADC/PWM Control Serial Interface". For a driver
installation under Windows, the "KCCUSBserial.inf" file is required.
»
For Linux this interface does not require any drivers and is listed in the system as the "ttyACM0" serial port.
»
Communication with ADC/PWM can be organized over the standard serial asynchronous protocol.
»
Every control request consists of a 4 Byte package, with the leading (synch) Byte always 0x15.
The number of Bytes in the answer is variable and depends on the request.
»

4.2.1 I/O Control Requests/Answers:

4 Byte Command
Parameters
'\x15','a','c',N
N-channels mask
{0x15,0x61,0x63,N}
N=0 – stop measurement
N=0x01...0x0F define which
channels 0...3 will be
measured
'\x15','a','s',N
N-channels mask
{0x15,0x61,0x73,N}
N=0 – stop measurement
N=0x01...0x0F define which
channels 0...3 will be
measured
'\x15','p','a','e'
{0x15,0x70,0x61,0x65}
'\x15','p','a','d'
{0x15,0x70,0x61,0x64}
'\x15','p','b','e'
{0x15,0x70,0x62,0x65}
'\x15','p','b','d'
{0x15,0x70,0x62,0x64}
'\x15','w','a',N
N – PWM value
{0x15,0x77,0x61,N}
'\x15','w','b',N
N – PWM value
{0x15,0x77,0x62,N}
'\x15','f','v','r'
{0x15,0x66,0x76,0x72}
26
Description
Start cyclic ADC measurement when ADC measures all channels
defined in the mask field, the controller sends an answer:
'\x15','D',VS...VE {0x15,0x44,VS...VE} ,
where VS is the Byte value of the first defined channel and VE is the
Byte value of the last defined channel.
The measurement/answer will repeat until the controller receives a
stop command ('\x15','a','c',0).
The number of received Bytes defined by the channels mask.
Example: mask N=0x05, ADC will measure on Channels 0 and 2 and
send a 4 Byte answer '\x15','D',V0,V2, where V0 and V2 are results
of the measurement on the appropriate channels.
Start single shot ADC measurement when ADC measures all channels
defined in the mask field, the controller sends an answer:
'\x15','D',NS...NE {0x15,0x44,VS...VE}
where VS is the Byte value of the first defined channel and VE is the
Byte value of the last defined channel.
A non-cycled variant of the command above.
The number of received Bytes defined by the channels mask.
Enable PWM Channel A.
Disable PWM Channel A.
Enable PWM Channel B.
Disable PWM Channel B.
Set PWM value on Channel A (PWM must be enabled).
Set PWM value on Channel B (PWM must be enabled).
Get firmware version.
Answer: '\x15','V','M','S','M','L','P','_','0','6',0
The answer is always 11 Bytes, '\x15','V' - answer prefix, 8 Bytes of
the firmware version and a final Byte 0.
MSM-LP / Special Features
www.kontron.com

Advertisement

Table of Contents
loading

Table of Contents