I was trying to read the status register of LTC6813, where the status reg RDSTATA (0x0010) and REDSTATB (0x0012) always returns as 0xFF and the PEC also as 0xFF.
Apart from status register all other commands are working fine. I just wanted to read the die temperature, sum of cell measurement and other flags.
Is there any precondition to read the status registers?
The command sequence for Reading status registers is
Wake up :- Ensure the system is awake before sending ADC conversion command
ADSTAT :- ADC conversion will start on this command
PLADC :- To poll if ADC conversion is complete, alternatively you can wait for appropriate time duration.
Wake up idle :- If using iso-SPI. ensure it is in stand by mode.
RDSTATA, RDSTATB :- ADC read commands
In your particular case as PEC is also 0xFF. This implies LTC6813 didn't communicate at all to that command.
Can you check if the command is being sent with correct PEC and above sequence if followed.
Link for the reference code:- https://www.analog.com/media/en/simulation-models/linduino/LTC6813.zip
here is a snapshot of the same test from the sketchbook code which we tested on our setup.
The issue got resolved. As I was calculating the PEC wrong, where the overflow is not taken care properly.
Thanks for the detailed procedure.