| 전자부품 데이터시트 검색엔진 |
|
AN2511 데이터시트(PDF) 23 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
AN2511 데이터시트(HTML) 23 Page - STMicroelectronics |
|
23 / 43 page ![]() AN2511 PMBus commands and source code Doc ID 13286 Rev 2 23/43 PCOR = CONTROL ; PCDR = CONTROL ; /*----------------------- Alert Interrupt configuration --------------------- ----------*/ EnableInterrupts; /* Resets interrupt mask */ MISCR1 = 0x10 ; /* EI0 on falling edge low level for Alert interrupt */ /*---------------------PMBus communication configuration-------------------*/ while (1) { /* I2C configuration: ST7 I2C address 0x30, communication speed 100kHz */ PMBus_Init (SMBs_MISC, SLAVEADD, 0x40, 0x23); /* Checking if an alert signal is received from slave */ if (SMBus_Mode & SMB_ARA) { /* ST7 I2C sends the alert response address to check which slave alerted */ PMBus_Err = SMBm_ReceiveByte (ALERTRESPONSEADD, Data_Buff); /* Alerted slave address will be used for any further communication */ PMBus_SlaveAdd = *Data_Buff ; SMBus_Mode &= (unsigned char) ~SMB_ARA ; } Command_Code = 0x01; /* User should enter the PMBus command code here */ PMBus_CommandWrite (Command_Code); /* Writes data from Data_Buff */ Command_Code = 0x02; /* User should enter the PMBus command code here */ /* Read data and store it in Data_Buff */ PMBus_CommandRead (Command_Code); if (SMB_Err_Status) { /* I2C status register read to clear any errors */ SMB_Err_Status = I2CSR2 ; SMB_Err_Status = 0 ; } } /* End of while (1) */ } /* End of main */ 3.4 Limitations 1. The SMBus driver used in this application note is tested only for write word, read word and write block protocols with PEC disabled. 2. The SMBus driver doesn't meet the clock low extending feature of SMBus v1.1 due to the limitation of the I2C peripheral. 3. In case of PEC, when slave is acting as receiver, the ACK bit is not disabled if the PEC received from master transmitter is different from slave. It is stored in the user address as the last byte. It is the responsibility of the user to check the master PEC with the slave PEC to decide on data validity. |
|
링크 URL |
| ALLDATASHEET 가 귀하에 도움이 되셨나요? [ DONATE ] |
Alldatasheet는? | 광고문의 | 운영자에게 연락하기 | 개인정보취급방침 | 링크 투 데이터시트 | 링크교환 | 제조사별 검색 All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |