Other Parts Discussed in Thread: TPS8802
Tool/software:
Hello TI Team,
I have observed an unusual behavior with the TPS8802 EVM.
I configured the TPS8802 sleep timer for 10 seconds. After the timer expires, the INT_MCU pin goes high to signal the MCU and STATUS1 getting SLP_DONE.
However, I noticed that the INT_MCU pin only transitions from low to high when I continuously read the STATUS1 register (Offset = 0x01). If I do not read STATUS1, the INT_MCU pin remains latched high.
Following the log showing the INT_MCU behavior with and without reading the STATUS1 register:
------------------------ AFE in SLEEP MODE (><) <----- With Read Status register ------------------------ Sleep Timer Start... AFE is suspend for 11sec [0] INT_STATUS: 0 Status Value: 0 AFE is suspend for 11sec [1] INT_STATUS: 0 Status Value: 0 AFE is suspend for 11sec [2] INT_STATUS: 0 Status Value: 0 AFE is suspend for 11sec [3] INT_STATUS: 0 Status Value: 0 AFE is suspend for 11sec [4] INT_STATUS: 0 Status Value: 0 AFE is suspend for 11sec [5] INT_STATUS: 0 Status Value: 0 AFE is suspend for 11sec [6] INT_STATUS: 0 Status Value: 0 AFE is suspend for 11sec [7] INT_STATUS: 0 Status Value: 0 AFE is suspend for 11sec [8] INT_STATUS: 0 Status Value: 0 AFE is suspend for 11sec [9] INT_STATUS: 1 Status Value: 128 SLP_DONE AFE is suspend for 11sec [10] INT_STATUS: 0 Status Value: 0 ============================== -------------------------- AFE in SLEEP MODE (><) <---- without read Status register -------------------------- Sleep Timer Start... AFE is suspend for 11sec [0] INT_STATUS: 1 <----------------- getting INT_MCU bit High. AFE is suspend for 11sec [1] INT_STATUS: 1 AFE is suspend for 11sec [2] INT_STATUS: 1 AFE is suspend for 11sec [3] INT_STATUS: 1 AFE is suspend for 11sec [4] INT_STATUS: 1 AFE is suspend for 11sec [5] INT_STATUS: 1 AFE is suspend for 11sec [6] INT_STATUS: 1 AFE is suspend for 11sec [7] INT_STATUS: 1 AFE is suspend for 11sec [8] INT_STATUS: 1 AFE is suspend for 11sec [9] INT_STATUS: 1 AFE is suspend for 11sec [10] INT_STATUS: 1
Following register I configured for INT_MCU/interrupt based wakeup
void afe_i2c_sleep_timer(uint16_t sleep_time)
{
SetSleeptime = sleep_time;
// Mask all interrupts, enable INT_MCU
i2c_write_data(i2c_dev, TPS880X_REG_MASK, 0x7F); // SLP_DONEM = 0, STATUS_INT = 1 allows SLP_DONE flag to appear on INT_MCU pin
i2c_write_data(i2c_dev, TPS880X_REG_CONFIG1, 0x32); //SLP_MCU = SLP_BST = 0, SLP_ANALOG = 1
// TPS ---> MCU Interupt , INT_EN = 0
i2c_write_data(i2c_dev, TPS880X_REG_ENABLE1, 0x1D); // INT_EN = 0
if (sleep_time == 0) {
// Disable the Sleep timer
i2c_write_data(i2c_dev, TPS880X_REG_SLPTMR1, 0x00);
i2c_write_data(i2c_dev, TPS880X_REG_SLPTMR2, 0x00);
}
else
{
// Validate interval
if (sleep_time < DUALRAYSMOKEAFE_HAL_TIMING_ULPTIMER_MIN_INTERVAL_MS)
{
sleep_time = DUALRAYSMOKEAFE_HAL_TIMING_ULPTIMER_MIN_INTERVAL_MS;
}
else if (sleep_time > DUALRAYSMOKEAFE_HAL_TIMING_ULPTIMER_MAX_INTERVAL_MS)
{
sleep_time = DUALRAYSMOKEAFE_HAL_TIMING_ULPTIMER_MAX_INTERVAL_MS;
}
}
// MSB
i2c_write_data(i2c_dev, TPS880X_REG_SLPTMR1, sleep_time >> 8);
// LSB
i2c_write_data(i2c_dev, TPS880X_REG_SLPTMR2, sleep_time & 0xFF);
// TPS ---> MCU Interupt , INT_DIR = 0
i2c_write_data(i2c_dev, TPS880X_REG_ENABLE2, 0x85); // Put TPS8802 to sleep with SLP_EN = 1, LEDPIN_EN = LEDSEL = 1, INT_DIR = 0
printk("Sleep Timer Start...\n");
StartSleepTimerHandler();
} Could you please clarify why this behavior occurs, and Can I get INT_MCU pin high after expiry without read STATUS1 register (because I want to put MCU completely in sleep with I2C peripheral)?
Thanks & Regards,
Pratik Panchal