SBC_DRIVER READ REGISTER.

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

SBC_DRIVER READ REGISTER.

793件の閲覧回数
franklin08
Contributor I

 I succeeded in running the example program given in the SBC driver that reads the SBC_FS26_FS_STATES_ADDR register. However, I tried to read SBC_FS26_M_REG_FLG_ADDR register that flags over current event for the converters, LDOS' and TRKS' using the below code but I keep getting FALSE. I had expected u16ReadData variable to give 0x0000, instead it gives 1101001001101111 from the expression tab. Please is there something wrong with my code? 

 

eReturnValue |= Sbc_fs26_ReadRegister(TRUE,SBC_FS26_M_REG_MSK_ADDR , &rxData);


if((eReturnValue != E_OK) || (rxData.u16ReadData != SBC_FS26_M_REG_MSK_DEFAULT ))
{
bPass = FALSE; 

 


}

0 件の賞賛
返信
1 返信

743件の閲覧回数
TomasVaverka
NXP TechSupport
NXP TechSupport

Hello,

The value you shared does not make sense at all.

If you have a logic analyzer, could you please share the SPI traffic illustrating the read of the M_REG_FLG?

What is the value of the eReturnValue before reading the M_REG_FLG register?

I suppose you should use either:

eReturnValue = 0;

eReturnValue |= Sbc_fs26_ReadRegister(TRUE,SBC_FS26_M_REG_MSK_ADDR , &rxData);

or:

eReturnValue = Sbc_fs26_ReadRegister(TRUE,SBC_FS26_M_REG_MSK_ADDR , &rxData);

BR, Tomas

 

0 件の賞賛
返信