IO Device:F81966 LPC DIO under Linux console

From LEXWiKi

Revision as of 16:13, 26 August 2025 by Jay-chen (Talk | contribs)
(diff) ←Older revision | Current revision (diff) | Newer revision→ (diff)
Jump to: navigation, search

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