Hi CaoRq:
I have a same problem with you,
if I pull up CS_B/WAKE_UP pin then pull down it again after READY/INT pin pull up, the response for NBP8 is always 0x1002. If not, I always get 0x2002.
The following is my code
void NBP8_WakeupAndCheck(void)
{
uint8_t regval = STD_LOW;
uint8_t result;
uint16_t TxChBuf[1];
uint16_t RxChBuf[1];
Dio_WriteChannel(DioConf_DioChannel_LPSPI5_PCS3, STD_LOW);
regval = Dio_ReadChannel(DioConf_DioChannel_PS_READY);
while(regval == 0)
{
Printf("DioConf_DioChannel_PS_READY = %d\r\n", regval);
}
Printf("DioConf_DioChannel_PS_READY0 = %d\r\n", regval);
Dio_WriteChannel(DioConf_DioChannel_LPSPI5_PCS3, STD_HIGH);
//Osif_Wait(100);
Dio_WriteChannel(DioConf_DioChannel_LPSPI5_PCS3, STD_LOW);
//Osif_Wait(10);
//TxChBuf[0] = NBP8_FW_DER;
TxChBuf[0] = NBP8_SPIOPS;
Spi_SetupEB(SpiConf_SpiChannel_SpiChannel_PressureSensor, TxChBuf, RxChBuf, sizeof(TxChBuf));
result = Spi_SyncTransmit(SpiConf_SpiSequence_SpiSequence_PressureSensor);
//Osif_Wait(10);
Dio_WriteChannel(DioConf_DioChannel_LPSPI5_PCS3, STD_HIGH);
if (result == E_OK) {
Printf("RxChBuf[0] = 0x%x\r\n", RxChBuf[0]);
//Printf("RxChBuf[1] = 0x%x\r\n", RxChBuf[1]);
}
}
Do you know how to fix this?
Thanks
BR, BillWen