OpenDev FanEmu 2
Firmware Version
Applicable firmware versions: 1.0Z
Device modes
The device can work in two modes:
- Automatic mode (the default) - the measured duty cycle of the CTRL signal determines the effective RPM value, coded by the SENSE signal
- Manual mode - the SENSE signal is determined by the values, input via the respective commands.
- Host-to-Device command data must end with a line-feed character (ASCII code 10/0x0A)
- Command data is case-sensitive
- Device-to-Host reply data is delimited by a line-feed character.
- Empty data frames are permitted and silently ignored.
- All integer parameters are passed as decimal numbers.
Syntax
|
|
Request |
I\n |
Reply |
I<firmware information>\n |
Example
|
|
Request |
I\n |
Reply |
IOD-FAN-EMU (CDC) 1.0Z Mar 23 2020\n |
Current RPM value (percent)
Syntax
|
|
Request |
p\n |
Reply |
p<duty>\n |
Example
(current duty is 50%)
Current RPM value
Syntax
|
|
Request |
r\n |
Reply |
r<rpm>\n |
Example
|
|
Request |
r\n |
Reply |
r3000\n |
(SENSE channel currently outputs signal, equivalent to 3000 rpm)
Full RPM value
Syntax
|
|
Request |
R\n |
Reply |
R<rpm>\n |
Example
|
|
Request |
R\n |
Reply |
R6800\n |
(Current configuration value is 6800 rpm)
Device settings
Note: these are runtime settings. They can be changed via the respective commands listed below. In order to make them permanent, issue the 'Write settings' command.
Syntax
|
|
Request |
F\n |
Reply |
F<flags>,<full_rpm>,<min_duty>\n |
The device has 3 configuration parameters:
flags
- a bit field:
0x01
- if set, the CTRL signal polarity is reversed
0x02
- if set, the manual control mode is activated
full_rpm
- the maximum rpm value that will be output to the SENSE pin when the CTRL signal duty cycle is 100%. Valid range is
min_duty
- (for automatic mode only) - the minimum output RPM value is full_rpm * min_duty / 100
The default values are:
flags = 0
full_rpm = 6800
min_duty = 10
Example
|
|
Request |
F\n |
Reply |
F0,6800,10\n |
Set configuration flags
Syntax
|
|
Request |
L<value>\n |
Reply |
L<value>\n |
Example
|
|
Request |
L\n |
Reply |
L0\n |
Request |
L2\n |
Reply |
L2\n |
Set the full rpm value
Valid values are 0..9000
Syntax
|
|
Request |
T<value>\n |
Reply |
T<value>\n |
Example
|
|
Request |
T\n |
Reply |
T6800\n |
Request |
T5000\n |
Reply |
T5000\n |
Set the minimum duty value
Valid values are 0..30
Syntax
|
|
Request |
M<value>\n |
Reply |
M<value>\n |
Example
|
|
Request |
M\n |
Reply |
M10\n |
Request |
M23\n |
Reply |
M23\n |
Set the RPM value
Manual mode only
Valid values are 0..9000
Syntax
|
|
Request |
r<value>\n |
Reply |
r<value>\n |
Example
|
|
Request |
r1500\n |
Reply |
r1500\n |
Set the RPM percentage
Manual mode only
The previous command sets the immediate value. This command sets the rpm as a percent of the configured full rpm value.
Valid values are 0..100
Syntax
|
|
Request |
p<value>\n |
Reply |
p<value>\n |
Example
|
|
Request |
p80\n |
Reply |
p80\n |
Device voltage and temperature
The temperature value is in degrees centigrade, the voltage is in millivolts. Note: these are the temperature and the voltage of the MCU core. They do not reflect the ambient temperature and the fan input voltage respectively.
Syntax
|
|
Request |
t\n |
Reply |
t<temperature>,<voltage>\n |
Example
|
|
Request |
t\n |
Reply |
t29,3300\n |
Device reboot
Syntax
|
|
Request |
X\n |
Reply |
no reply |
Firmware update
Puts the device in the DFU bootloader mode
Syntax
|
|
Request |
D\n |
Reply |
no reply |