Other Parts Discussed in Thread: MSP430F5659,
Tool/software: WEBENCH® Design Tools
Hi Team,
I'm using DAC161S997 evaluation board and interfaced SPI with MSP430F5659.
I'm able to set the DAC value like 15mA but DAC not maintaining the looped current 15mA continuously its getting down. If i send NOP command continuously i'm able to get the 15mA looped current.
But in my application its difficult to provide handshake continuously like sending NOP(<100ms) to keep alive because this i want to disable SPI timeout permanently to achieve 15mA looped current continuously
I'm trying to Configure the ERR-CONFIG Register to disable the SPI Timeout but it's not working. Please help me to get out of this issue
Please check below code for reference.
void Dac161s997TestSetup(void)
{
unsigned short errValue;
initializeUSCI_B1_DAC161(enSpiClock_1MHZ);
DAC161_Write_Regs (0xF1, DAC161_ERR_CONFIG_REG, 2); //spi timeout disabled
errValue = DAC161_CONVERT_ERR_VALUE(4000) & 0x7f00;
DAC161_Write_Regs (&errValue, DAC161_ERR_LOW_REG, 2);
errValue = DAC161_CONVERT_ERR_VALUE(20000) & 0xff00;
if (errValue < 0x80)
errValue = 0x80;
DAC161_Write_Regs (&errValue, DAC161_ERR_HIGH_REG, 2);
DelayInMs(10); //Dac161s997TestSetup
DAC161_Nop();
DelayInMs(10); //Dac161s997TestSetup
Dac161s997SetValue(15000);
while(1);
//while(1)
//{
// DAC161_Nop();
//}
}
Thanks,
Krishna