TI E2E 英文论坛海量技术问答的中文版全新上线,可点击相关论坛查看,或在站内搜索 “参考译文” 获取。

This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

读不到电池容量

Other Parts Discussed in Thread: TPS62730

你好,ti工程师

我根据论坛的电量检测帖子,做如下处理:

 //我是P0_0检测

 P0SEL = 0x01;

P0DIR = 0xFD;

  P1 = 0;

.........

if ( events & KFD_BATTERY_CHECK_EVT )
  {

    
HCI_EXT_MapPmIoPortCmd( HCI_EXT_PM_IO_PORT_NONE, HCI_EXT_PM_IO_PORT_PIN0 );//我是P0_0检测

//Set P0.0 to low
P0 &= 0xFE;
#endif   
    // Restart timer
    if ( BATTERY_CHECK_PERIOD )
    {
      osal_start_timerEx( keyfobapp_TaskID, KFD_BATTERY_CHECK_EVT, BATTERY_CHECK_PERIOD );
    }

    // perform battery level check

level = battMeasure();

//Set P0.0 to high
P0 |= 0x01;

// Enable stack to toggle bypass control on TPS62730 (DC/DC converter)

HCI_EXT_MapPmIoPortCmd( HCI_EXT_PM_IO_PORT_P0, HCI_EXT_PM_IO_PORT_PIN0 );//我是P0_0检测


    return (events ^ KFD_BATTERY_CHECK_EVT);
  }

外部电阻分压!是用2m,3m欧姆,

P0_0电压测量1.1v

level = battMeasure();测试不到电量

谢谢!

lincoln