IO Device:F81966 LPC DIO under Linux console

From LEXWiKi

(Difference between revisions)
Jump to: navigation, search
(Introduction F81966 DIO)
Current revision (16:13, 26 August 2025) (edit) (undo)
(hardware monitor test in 3I130DW)
 
(19 intermediate revisions not shown.)
Line 1: Line 1:
[[Category:AllowPages]]
[[Category:AllowPages]]
== The Sample code source you can download from ==
== The Sample code source you can download from ==
-
 
+
<!--
<Google Drive>
<Google Drive>
Line 14: Line 14:
[https://drive.google.com/file/d/1YNIuL2erP1zZbBHSq8a-yj4PtVyBeQgS/view?usp=sharing F81966_LIB_v1.1L_x86]
[https://drive.google.com/file/d/1YNIuL2erP1zZbBHSq8a-yj4PtVyBeQgS/view?usp=sharing F81966_LIB_v1.1L_x86]
[https://drive.google.com/file/d/1Pg53LOhnpjrsgptcKI10wfQOhsUxYE5J/view?usp=drive_link F81966_LIB_v1.1L_x64]
[https://drive.google.com/file/d/1Pg53LOhnpjrsgptcKI10wfQOhsUxYE5J/view?usp=drive_link F81966_LIB_v1.1L_x64]
 +
-->
<FTP>
<FTP>
Source file:
Source file:
-
[ftp://ftp.lex.com.tw/Engineer/SoftSupport/AP_Module/F81966_LPC_DIO/Linux_console/F81966_DIO_v1.1_Src_L.tar.gz F81966_DIO_v1.1L_Src]
+
[ftp://ftp.lex.com.tw/Engineer/SoftSupport/AP_Module/F81966_LPC_DIO/Linux_console/F81966_LPC_Utility_L_src.zip F81966_LPC_Utility_L_src]
Binary file:
Binary file:
-
[ftp://ftp.lex.com.tw/Engineer/SoftSupport/AP_Module/F81966_LPC_DIO/Linux_console/F81966_DIO_v1.1_Bin_x32_L.tar.gz F81966_DIO_v1.1L_Bin_x86]
+
[ftp://ftp.lex.com.tw/Engineer/SoftSupport/AP_Module/F81966_LPC_DIO/Linux_console/F81966_LPC_Utility_L.zip F81966_LPC_Utility]
-
[ftp://ftp.lex.com.tw/Engineer/SoftSupport/AP_Module/F81966_LPC_DIO/Linux_console/F81966_DIO_v1.1L_Bin_x64.zip F81966_DIO_v1.1L_Bin_x64]
+
F81966 Libary :
F81966 Libary :
-
[ftp://ftp.lex.com.tw/Engineer/SoftSupport/AP_Module/F81966_LPC_DIO/Linux_console/F81966_LIB_v1.1_x32_L.tar.gz F81966_LIB_v1.1L_x86]
+
[ftp://ftp.lex.com.tw/Engineer/SoftSupport/AP_Module/F81966_LPC_DIO/Linux_console/libF81966_bin_x86_64.zip libF81966_bin_x86_64]
-
[ftp://ftp.lex.com.tw/Engineer/SoftSupport/AP_Module/F81966_LPC_DIO/Linux_console/F81966_LIB_v1.1L_x64.zip F81966_LIB_v1.1L_x64]
+
== MB Support List==
== MB Support List==
Line 38: Line 37:
{|class = 'sortable' border="2" cellpadding="4" cellspacing="0" style="margin: 1em 1em 1em 0; border: 1px #aaa solid; border-collapse: collapse;" id='506'
{|class = 'sortable' border="2" cellpadding="4" cellspacing="0" style="margin: 1em 1em 1em 0; border: 1px #aaa solid; border-collapse: collapse;" id='506'
|- bgcolor = #ccccff
|- bgcolor = #ccccff
-
!Ivybridge!!BayTrail !!Apollo Lake !!Skylake/Kabylake!!Coffee Lake!!Whiskey Lake!!AMD!!Card!!Elkhart Lake
+
!Elkhart Lake!!Raptor Lake
|-
|-
|
|
-
2I847H
+
2I640CW
-
3I847A/D/CW/NX/NM/HW
+
-
3I770A/CW
+
-
CI847A/C CI770A/C
+
|
|
-
1I385A/H 1I386H
+
3I130TW
-
2I380A 2I385A/CW 2I380NX 2I385BW/EW/HW/PW 2I386EW 2I382A 2I382DW
+
-
3I380A/CW/NX
+
-
ST385W/AW/CW
+
-
|
+
-
2I390CW 2I392CW
+
-
3I390AW 3I390NX 3I393NX
+
-
PM390CW
+
-
|
+
-
2I610DW/HW 2I612CW
+
-
3I610DW 3I612DW 3I170DW/HW/NX
+
-
ST610W
+
-
CI170A/C
+
-
PM610DW PM170DW
+
-
|
+
-
CI370DW
+
-
|
+
-
2I810D 3I810DW
+
-
|
+
-
3A100DW
+
-
|
+
-
CIO116-G
+
-
E691A
+
-
|
+
-
2I640DW
+
|-class='sortbottom'
|-class='sortbottom'
Line 76: Line 48:
[{{SERVER}}/lexwiki/index.php?title=Special:TableEdit&id=f777871962f1c0432784d4e0e73802b8.1125.E5be5052285e42&page=1125&pagename={{FULLPAGENAMEE}} edit table]
[{{SERVER}}/lexwiki/index.php?title=Special:TableEdit&id=f777871962f1c0432784d4e0e73802b8.1125.E5be5052285e42&page=1125&pagename={{FULLPAGENAMEE}} edit table]
<!--box uid=f777871962f1c0432784d4e0e73802b8.1125.E5be5052285e42-->
<!--box uid=f777871962f1c0432784d4e0e73802b8.1125.E5be5052285e42-->
-
== Introduction F81966 DIO==
+
 
 +
== Introduction F81966 CIO==
[[Image:F81966_Linux_help.png]]<br>
[[Image:F81966_Linux_help.png]]<br>
-
#Start test Button,Send bits one by one and one by one receive
+
#Use GET_CIO_INPUT to get the digital input data
-
#CIO116 mode for CIO116 module use
+
#Use SET_CIO_OUTPUT_DATA to set digital output data
-
#Set time countdown,If the end of the countdown, the trigger signal to reboot
+
#Single bit setting can use SetCIOXBit0, SetCIOXBit1
-
#Enable loop ,Continuously reset the WDT to ensure that when the system is normal, the restart signal will not be triggered
+
#Read a single bit using GetCIOXBit
 +
# Enable WDT and continuously reset WDT to ensure that the restart signal will not be triggered when the system is normal
-
== F81966_DLL Function ==
+
== libF81966.so Function ==
<pre>
<pre>
-
bool F81966_OPEN();
+
bool F81966_OPEN();
-
void F81966_Init();
+
void F81966_Init();
-
void F81966_LPC_Write(BYTE LDNData, BYTE reg, BYTE value);
+
-
BYTE F81966_LPC_Read(BYTE LDNData, BYTE reg);
+
-
void F81966_LPC_Digital_Write_LOW(BYTE byteValue);
+
-
void F81966_LPC_Digital_Write_HIGH(BYTE byteValue);
+
-
BYTE F81966_LPC_Digital_Read_LOW();
+
-
BYTE F81966_LPC_Digital_Read_HIGH();
+
-
void F81966_LPC_Set_WDT_Enable(BYTE byteValue);
+
-
void F81966_LPC_Set_WDT_Disable();
+
-
void EntryLPC();
+
-
void ExitLPC();
+
-
</pre>
+
-
=== Digital Input/Ooutput test===
+
-
<font Size="5"><font color=#FF0000>Note when using the following boards:2I110D</font></font><br />
+
BYTE GET_CIO_INPUT(int CIO_Number);
-
<font Size="5"><font color=#FF0000>CIO1 needs to be controlled by CIO3</font></font><br />
+
BYTE GET_CIO_OUTPUT_DATA(int CIO_Number);
-
<br />
+
BYTE SET_CIO_OUTPUT_DATA(int CIO_Number, BYTE byteValue);
-
[[Image:F81966_io_define.jpg]]<br>
+
 
 +
BYTE GetCIOXBit(int CIO_Number, BYTE bitPosition);
 +
BYTE SetCIOXBit0(int CIO_Number,BYTE byteValue, BYTE bitPosition);
 +
BYTE SetCIOXBit1(int CIO_Number,BYTE byteValue, BYTE bitPosition);
 +
 
 +
void F81966_LPC_Set_WDT_Enable(BYTE byteValue);
 +
void F81966_LPC_Set_WDT_Disable();
 +
 
 +
float GetVoltage(DWORD dwAddrVal);
 +
int GetTemperature(DWORD dwAddrVal);
 +
 
 +
</pre>
 +
=== test_F81966 CIO Input/Ooutput ===
'''sample code'''
'''sample code'''
<pre>
<pre>
-
Set CIO1 CIO2 Digital Output all high
+
Set CIO1 Digital Output all bit low
-
F81966_LPC_Digital_Write_LOW(256);
+
test_F81966 write 0xf;
-
Set CIO1 CIO2 Digital Output all low
 
-
F81966_LPC_Digital_Write_LOW(0);
 
-
Set CIO1 Digital Output bit 4 high
+
Set CIO2 Digital Output all bit low
-
F81966_LPC_Digital_Write_LOW(16);
+
test_F81966 write 2 0x0;
-
Set CIO2 Digital Output bit 10 high
+
Set CIO3 Digital Output all bit high
-
F81966_LPC_Digital_Write_HIGH(4);
+
test_F81966 write 3 0xf;
 +
 
 +
Get CIO4 Digital Input
 +
test_F81966 read 4;
</pre>
</pre>
<pre>
<pre>
-
Read Din
+
read bit position
-
value = F81966_LPC_Digital_Read_LOW();
+
test_F81966 getbit 1 1
 +
 
 +
write bit position
 +
test_F81966 setbit 1 0 1
</pre>
</pre>
=== Watch Dog test===
=== Watch Dog test===
'''sample code'''<br>
'''sample code'''<br>
 +
test_F81966 getbit 1 1
<pre>
<pre>
Set WDT 10 sec
Set WDT 10 sec
-
F81966_LPC_Set_WDT_Enable(10);
+
test_F81966 wdt enable 10;
</pre>
</pre>
<pre>
<pre>
Disable WDT
Disable WDT
-
F81966_LPC_Set_WDT_Disable();
+
test_F81966 wdt disable;
 +
</pre>
 +
 
 +
=== hardware monitor test in 3I130DW ===
 +
<pre>
 +
關於vbat ,目前板子上由Super IO 讀的vbat 無法達到偵測的功能
 +
 
 +
1. 開機期間即使鈕扣電池拔掉後,Super IO仍然可以讀到vbat (鈕扣電池電量) , 因為是電路設計的關係導致這樣的結果,此時讀到的不是鈕扣電池電量而是主板的電
 +
 
 +
2. 關機之後SUPER IO 沒有供電可以讀到鈕扣電池的電量
</pre>
</pre>

Current revision

Contents

The Sample code source you can download from

<FTP>

Source file: F81966_LPC_Utility_L_src

Binary file: F81966_LPC_Utility

F81966 Libary : libF81966_bin_x86_64

MB Support List

Elkhart LakeRaptor Lake

2I640CW

3I130TW

edit table

Introduction F81966 CIO

Image:F81966_Linux_help.png

  1. Use GET_CIO_INPUT to get the digital input data
  2. Use SET_CIO_OUTPUT_DATA to set digital output data
  3. Single bit setting can use SetCIOXBit0, SetCIOXBit1
  4. Read a single bit using GetCIOXBit
  5. Enable WDT and continuously reset WDT to ensure that the restart signal will not be triggered when the system is normal

libF81966.so Function

bool F81966_OPEN();
void F81966_Init();

BYTE GET_CIO_INPUT(int CIO_Number);
BYTE GET_CIO_OUTPUT_DATA(int CIO_Number);
BYTE SET_CIO_OUTPUT_DATA(int CIO_Number, BYTE byteValue);

BYTE GetCIOXBit(int CIO_Number, BYTE bitPosition);
BYTE SetCIOXBit0(int CIO_Number,BYTE byteValue, BYTE bitPosition);
BYTE SetCIOXBit1(int CIO_Number,BYTE byteValue, BYTE bitPosition);

void F81966_LPC_Set_WDT_Enable(BYTE byteValue);
void F81966_LPC_Set_WDT_Disable();

float GetVoltage(DWORD dwAddrVal);
int GetTemperature(DWORD dwAddrVal);

test_F81966 CIO Input/Ooutput

sample code

Set CIO1 Digital Output all bit low
test_F81966 write 0xf;


Set CIO2  Digital Output all bit low
test_F81966 write 2 0x0;

Set CIO3 Digital Output all bit high
test_F81966 write 3 0xf;

Get CIO4 Digital Input 
test_F81966 read 4;

read bit position
test_F81966 getbit 1 1

write bit position
test_F81966 setbit 1 0 1

Watch Dog test

sample code
test_F81966 getbit 1 1

Set WDT 10 sec
test_F81966 wdt enable 10;
Disable WDT
test_F81966 wdt disable;

hardware monitor test in 3I130DW

關於vbat ,目前板子上由Super IO 讀的vbat 無法達到偵測的功能

1. 開機期間即使鈕扣電池拔掉後,Super IO仍然可以讀到vbat (鈕扣電池電量) , 因為是電路設計的關係導致這樣的結果,此時讀到的不是鈕扣電池電量而是主板的電

2. 關機之後SUPER IO 沒有供電可以讀到鈕扣電池的電量
Personal tools