There are three IOP messages related to analog pin in AN1139.
Message Name
ID
Source
Description
iop_SetAnalogPinNotify
0xD300
Host
Configure automatic reporting of analog pin.
iop_GetAnalogPin
0xD301
Host
Report current analog pin value.
iop_AnalogPinValue
0xA301
CP2615
Current analog pin value
These IOP messages are intended to be used for CP2615 GPIO.8/ADC analog pin only, see AN1139 for more details about the format of these messages.
When USB host sends these API commands, the first parameter 'PinNumber' for iop_SetAnalogPinNotify (0xD300) and iop_GetAnalogPin (0xD301) must be set to 0. It is invalid for the two commands if the pin number is set to other values.
The ADC analog value message returned by iop_AnalogPinValue looks as below:
0x000D is the total message length for this message (header + message payload)
0xA301 is the ID of iop_AnalogPinValue message
pp is the analog pin number, here it is 0x00
vv vv is the current value read from the analog pin, 10-bit right-justified, full-scale VDD corresponds to 0x03FF.
tt tt tt tt is 32-bit timestamp, MSB, 1 ms resolution
The CP2615 GPIO pins can be configured using Xpress Configurator in Simplicity Studio. Ensure the GPIO.8 is set as ADC input when using these IOP messages, otherwise host will not receive analog notification if it is configured as GPIO function, although the GPIO.8 is set to ADC input by default.