I am using TMS570LS1224 micro controller .and demo circuit 1941D and LTC6813 ic.
i am trying to read voltage .but i am able to read voltage of only few cells.
so, what should i do.
I am using TMS570LS1224 micro controller .and demo circuit 1941D and LTC6813 ic.
i am trying to read voltage .but i am able to read voltage of only few cells.
so, what should i do.
Hi,
You might want to check Cell Selection for ADC Conversion(CH) bits in ADCV command. These bits perform selective conversions of some channel.
Regards
hi sgarg,
i am waiting your reply.
Yes i have checked with STM32F429 development board.
it is working fine.
Hi Gautam,
Can you check SPI settings. TMS570LS1224 controllers might have different convention for the settings.
The SPI communication required by LTC681x should be 8 bit, Also, can you please try with POL.PHA(0,1) due to different conventions of your uC.A similar issue has been resolved due to these settings.
Hii Sgarg,
i have checked POL,PHA with all possible combination.
like 01,10,11,00
but if i do like this some cell voltage is coming like POL=0,PHA=1. and POL=1,PHA=0
and i already converted 32 into 8.i have sent you code in zip file.please can you review once.
spiSendData(spiREG3,&dataconfig1_t,tx_len,tx_Data);
if i put tx_len=4,then it is not working. here output is 0.000 like that.
but if tx_len=6 this is working.
working means i received same output which i have inserted.
Hi Gautam,
If you could just put specific part of the code which needs to be reviewed than it is okay with me.
the TX length for read command would be 4 bytes only. RX length of the data would be 8 bytes. Please ensure that IC is in wakeup state before you send the command.
Are you getting any PEC error for this data? Is it possible for you to check this on DSO and confirm the clock and CS patterns this is an unusual behavior and not possible from AFE side. Just to rule out other possibilities can you send clear cell register command before each ADCV and then confirm the values.
if i Put TX length for read command is 4 bytes.
It is not working.
when i put more and equal to 6 then it is working.
this is the file.
and i didn't understand about.
Is it possible for you to check this on DSO and confirm the clock and CS patterns this is an unusual behavior and not possible from AFE side.
and i have checked with LTC6813_clrcell(); command before adcv.but it 's still not working.
Hi,
Are you receiving PEC error in those measurements?
If initial measurements are not measured then this could be an issue with your wake-up method.
You can use PLADC command to make sure conversion is completed.
Regards
hii Sgarg,
when i put PLDAC command then it is showing 0xFF.
And Pec is coming 0x6c.
pec_error =0x06
while (1)
{
/* USER CODE END WHILE */
wakeup_idle(TOTAL_IC);
//delay_sec(1);
LTC6813_wrcfg(TOTAL_IC,bms_ic); // writes onto configuration register A
LTC6813_wrcfgb(TOTAL_IC,bms_ic); // writes onto configuration register B
//delay_sec(1);
delay_ms(5);
LTC6813_clrcell();
LTC6813_adcv(ADC_CONVERSION_MODE,ADC_DCP,CELL_CH_TO_CONVERT);
m=LTC681x_pladc();
//LTC6813_pollAdc();
LTC6813_rdcv(NO_OF_REG,TOTAL_IC,bms_ic);
delay_ms(5);
for (current_ic = 0 ; current_ic < TOTAL_IC; current_ic++)
{
for (i=0; i<bms_ic[0].ic_reg.cell_channels; i++)
{
voltage[i] =(bms_ic[current_ic].cells.c_codes[i]*0.0001);
//delay_ms(100);
}
}
}
/* USER CODE END */
}
hii Sgarg,
when i put PLDAC command then it is showing 0xFF.
And Pec is coming 0x6c.
pec_error =0x06
while (1)
{
/* USER CODE END WHILE */
wakeup_idle(TOTAL_IC);
//delay_sec(1);
LTC6813_wrcfg(TOTAL_IC,bms_ic); // writes onto configuration register A
LTC6813_wrcfgb(TOTAL_IC,bms_ic); // writes onto configuration register B
//delay_sec(1);
delay_ms(5);
LTC6813_clrcell();
LTC6813_adcv(ADC_CONVERSION_MODE,ADC_DCP,CELL_CH_TO_CONVERT);
m=LTC681x_pladc();
//LTC6813_pollAdc();
LTC6813_rdcv(NO_OF_REG,TOTAL_IC,bms_ic);
delay_ms(5);
for (current_ic = 0 ; current_ic < TOTAL_IC; current_ic++)
{
for (i=0; i<bms_ic[0].ic_reg.cell_channels; i++)
{
voltage[i] =(bms_ic[current_ic].cells.c_codes[i]*0.0001);
//delay_ms(100);
}
}
}
/* USER CODE END */
}