请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
器件型号:TPS8802EVM主题中讨论的其他器件:TPS8802
工具/软件:
TI 团队大家好、
我观察到 TPS8802 EVM 存在异常行为。
我配置了 TPS8802 睡眠计时器 10 秒。 计时器到期后、INT_MCU引脚变为高电平以向 MCU 发出信号、并使 STATUS1 获取 SLP_DONE。
但是、我注意到、INT_MCU当我连续读取STATUS1寄存器(偏移= 0x01)时、该引脚仅从低电平转换为高电平。 如果我不读取STATUS1、该INT_MCU引脚保持锁存为高电平。
在显示 INT_MCU 行为的日志之后 一方 和 之间的比较 读取STATUS1寄存器:
------------------------ 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
以下寄存器 I 配置为基于 INT_MCU/中断的唤醒
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();
} 您能否澄清为什么会发生这种行为、以及 在到期后是否可以在不读取 STATUS1 寄存器的情况下将 INT_MCU 引脚保持高电平(因为我想将 MCU 与 I2C 外设一起完全置于睡眠状态)?
此致、
Pratik Panchal