PCA2129 problem in OSF value

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

PCA2129 problem in OSF value

338 次查看
mouaiadsalaas
Contributor I

hello .

I have a problem when i read seconds register of PCA2129 the osf bit is always 1 so that make my recieved data are not right so can you please tell me how to set that bit 0 ?? or what should i do to solve this problem so osf would not be 1 

I am using SPI protocol in TMS570LS07 mcu with PCA2129 and I am sending TX_DATA[0]=0xA3;to read seconds register 

 

uint16_t TX_DATA[100];
uint16_t RX_DATA[100];


uint8_t readsecondsRegister() {
gioSetBit(spiPORT1, 0U, 0);
TX_DATA[0]=0xA3;
spiTransmitData(spiREG1, &dataconfig1_t, 1, (uint16_t*)&TX_DATA[0]);
spiReceiveData(spiREG1, &dataconfig1_t, 1, (uint16_t*)&RX_DATA[0]);
gioSetBit(spiPORT1, 0U, 1);
return (uint8_t)RX_DATA[0];
}

 

标记 (3)
0 项奖励
0 回复数