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.

[参考译文] CC1352R:复位源6 -仅在对器件重新编程后消失

Guru**** 2575885 points
Other Parts Discussed in Thread: CC1352R

请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/wireless-connectivity/sub-1-ghz-group/sub-1-ghz/f/sub-1-ghz-forum/928264/cc1352r-reset-source-6---goes-away-only-after-reprogramming-of-device

器件型号:CC1352R

我们使用的是 CC1352R 和传感器控制器。

传感器控制器有两个任务,只有一个任务处于活动状态(这是在生产中配置的)

有趣的是、一旦第一个任务的一切正常、第二个任务就会出现以下问题:

-为器件加电-复位源= 1

-将器件复位一次(使用 RESET 引脚进行硬件复位)-使用复位源1加电

-设备启动,到达传感器控制器节拍激活,然后进入 复位源= 6的重复复位

-重置不会消失,即使我关闭设备电源并再次通电,它也会直接进入重置

系统复位(复位源= 6)最可能与以下代码行相关(其中我启用传感器控制器节拍)

scifStartRtcTicksNow (0x00010000);

当我注释掉这一行时,没有重复复位,但传感器控制器不工作(不是刻度)

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    Yaron、您好!  

    指派专家进行评论。  

    谢谢、  
    ELIN  

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    Yaron、您好!

    您能否共享您在第二个任务中运行的代码、以及 SCE 如何与 ARM 软件交互? 您能否分享您正在使用的 SDK 版本、以及您是否正在使用我们的任何示例?

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    你(们)好、M-W
    -指向代码 drive.google.com/.../view 的链接

    - SCE 交互是通过共享内存(由 SCS 自动生成)进行的,ARM 从 SCE 读取结果。 没有 ARM 到 SCE 命令

    - SDK 版本 cc13x2_26x2_SDK_3_40_00_02

    -

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    Yaron、您好!

    很遗憾、我无法访问代码、因为链接不是公开的(并且我无法使用 TI 帐户登录 Google)。 如果您可以将其公开、这样会有所帮助、如果您不想与之共享公共链接、请随时向我发送一个带该链接的 DM。  

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    以下是作为 scp 文件复制粘贴的代码:




    1

    CC1352R1F3
    QFN48 7x7 RGZ
    e
    1

    0
    TI-RTOS

    2000年



    ELSE switch to active state
    Active state: measure capacitor voltage and set DAC voltage to set input current according to temperature
    if capacitor voltage is above 3.9V switch to idle state]]>
    4.
    16.
    -2211.
    2370
    909
    0x0001
    0x00
    0001.
    0
    0
    16.
    627)
    680
    690
    3500
    3800
    3950.
    1
    0
    0
    0
    0
    EXIT_NORMAL
    0
    0
    0
    0
    0
    0
    0
    2370
    909
    TaskCapacitorCharger
    10.
    0
    0
    0
    0
    0
    0
    0
    0
    0
    0
    0
    2048
    2150
    scale_facter_VFB_90K_237K
    11431.
    7756.
    100
    1
    10.
    200
    5.
    State_Idle
    0
    0







    0
    DIO28









    0
    DIO26.




















    -1
    0
    0
    0
    DIO11.




































    0
    1







    8.

    0
    20.




































    2.
    1
    0
    1









    0
    -1
    0
    0
    0
    0

















    64
    11.
    64









    output.adcTemp = 0;
    accReset();
    for (U16 n = 0; n < (1 << avg_shift ); n++) {
    adcGenManualTrigger();
    adcReadFifo(output.adcTemp);
    accMac16s16u(output.adcTemp, factor);
    }
    accGet16(result_shift; output.adcValue );
    }


    adcEnableSync(ADC_REF_FIXED,ADC_SAMPLE_TIME_170_US, ADC_TRIGGER_MANUAL);
    // measure battery voltage for telemetry
    adcSelectIntInput(ADC_INPUT_VDDS);
    sample_and_acc(2,13,scale_factor_1);
    output.adcBatteryVoltage = output.adcValue;
    adcSelectGpioInput(AUXIO_A_VBAT_SENSE);

    // -------------------- state Idle -----------------------------------

    if (state.ChargerState == State_Idle) {
    // DAC disable
    refdacStopOutput();
    refdacDisable();
    //ADC enable
    // adcEnableSync(ADC_REF_FIXED, ADC_SAMPLE_TIME_1P37_MS, ADC_TRIGGER_MANUAL);

    // Configure FB as analog input
    adcSelectGpioInput(AUXIO_A_VFB_CHG_CONTROL);
    // Disable DC-DC: EN = 0
    gpioClearOutput(AUXIO_O_POWER_EN);
    fwDelayUs(20000);
    sample_and_acc(Avg_exp , ((15-Avg_exp)+4), scale_factor_Vfb);
    // Measure voltage on FB pin
    // Average 16 time
    // output.adcValue = 0;
    // output.adcTemp = 0;
    // for (U16 n = 0; n < Avg_num; n++) {
    // adcGenManualTrigger();
    // adcReadFifo(output.adcTemp);
    // output.adcValue += output.adcTemp;
    // }
    output.adcVcap = output.adcValue;
    // shut down ADC
    adcDisable();
    // do the trasmit input logic
    if (output.adcVcap < cfg.adcVcap3500mV) {
    output.Ready = 0;
    } else {
    output.Ready = 1 ;
    }
    // Compare to 3.8V
    // If voltage is more than 3.8V stay in Idle state
    if (output.adcVcap > cfg.adcVcap3800mV) {
    state.ChargerState = State_Idle;
    } else {
    // switch to active state
    state.ChargerState = State_Active ;
    output.loopcountactivestate = 0;
    // for 54.9K and 237K - dac_value = 280-0.0675Vin[mV]
    accReset();
    accAdd16u(280);
    accShiftLeft(15);
    accMac16u16s(output.adcVcap,DACInitFactor);
    accGet16( 15; output.DACValue);
    if (output.DACValue < 50 ) {
    output.DACValue = 50;
    }
    if (output.DACValue > 255) {
    output.DACValue = 255;
    }
    // output.DACValue = 128;
    // output.DACValue = 290;
    // output.DACValue -= output.adcVcap >> 2;
    // output.DACValue -= output.adcVcap >> 4;
    // output.DACValue -= output.adcVcap >> 6;
    compaSelectGpioInput(AUXIO_A_VFB_CHG_CONTROL);
    // load new value to DAC
    refdacStartOutputOnCompaIn(output.DACValue);
    // Enable DAC
    refdacEnable(REFDAC_PWRMODE_ANY,REFDAC_REF_DCOUPL_VOUT_LOW);
    refdacWaitForStableOutput() ;

    }
    } else {
    // ----------------- state Active ------------------------------------
    output.loopcountactivestate = 2;

    // while ( output.loopcountactivestate >= 0) {

    output.loopcountactivestate -= 1;
    // Enable DC-DC
    gpioSetOutput(AUXIO_O_POWER_EN);
    // Measure temperature
    sysGetBatmonTemp( output.InternalTemp);
    // convert from 1/4 degrees to degrees
    output.InternalTemp >>= 2 ;

    // Set Iin_setpoint according to:
    // series 1ohm resistor
    // internal ref with scaling gives 1LSB = 1.05mV --> 1.05mA
    if (input.SuperFastCharge==1) {
    output.IinSetpoint = setpoint_superfast_charge;
    } else if (state.InitialCharge == 0) {
    output.IinSetpoint = setpoint_fast_charge;
    } else if ( output.InternalTemp < (-10)) {
    output.IinSetpoint = setpoint_minus_10;
    } else if ( output.InternalTemp < 0) {
    output.IinSetpoint = setpoint_zero;
    } else {
    output.IinSetpoint = setpoint_roomtemp;
    }

    // measure Vbat x 4
    adcSelectGpioInput(AUXIO_A_VBAT_SENSE);
    fwDelayUs(10000);
    sample_and_acc(Avg_exp , (((15-Avg_exp)+4)-2), scale_factor_VbatSense);
    output.adcVbat = output.adcValue ;

    // measure input voltage x 4
    adcSelectIntInput(ADC_INPUT_VDDS);
    sample_and_acc(Avg_exp,(((15-Avg_exp)+4)-2),scale_factor_VbatSense);
    output.adcVbatLoad = output.adcValue;

    // Disable DC-DC , Disable DAC
    gpioClearOutput(AUXIO_O_POWER_EN);
    refdacStopOutput();
    refdacDisable();
    fwDelayUs(20000);

    // Measure Vinx 4
    //adcSelectGpioInput(AUXIO_A_VBAT_SENSE);
    //fwDelayUs(10000);
    //sample_and_acc(Avg_exp , (((15-Avg_exp)+4)-2), scale_factor_VbatSense);
    //output.adcVin = output.adcValue ;

    // measure input voltage x 4
    //adcSelectIntInput(ADC_INPUT_VDDS);
    //sample_and_acc(Avg_exp,(((15-Avg_exp)+4)-2),scale_factor_VbatSense);
    //output.adcVbatNoLoad = output.adcValue;

    // Calculate Iinx4 = ( Vbatx4 – Vinx4 ) / 1ohm
    //output.Iin = (output.adcVin - output.adcVbat);
    //output.Iin -= output.adcVbatNoLoad;
    //output.Iin += output.adcVbatLoad;
    output.Iin = output.adcVbatLoad - output.adcVbat;

    if (output.Iin < 0) {
    output.Iin = 0;
    }
    // calculate Ierr/Isetpoint
    accReset();
    // Iin is in the range of 0 to 1024mA
    // this means 1024 x 4 = 0 to 4096
    // saturate:
    if ( output.Iin > 4095) {
    output.Iin = 4095;
    }
    // scale so fullscale of 4096 wil be full 15bit
    output.IinMAC = output.Iin << 4;
    // multiply by 1/(setpoint current x4) - to be on the same scale of 1LSB = 1/4mA
    accMac16s16u(output.IinMAC, ((65536 / setpoint_superfast_charge)*4));
    accGet16(17;output.correctiontemp);

    // aritificail boost for Iin
    //output.Iin >>= 1;
    // Calculate Ierr = Iset_point - Iin
    // Scale Iinsetpoint by 4 to match Iin units
    output.Ierr = output.IinSetpoint << 2;
    output.Ierr -= output.Iin;
    output.Ierr = (output.Ierr >> 2);
    // Measure Vfb (Vcap)
    adcSelectGpioInput(AUXIO_A_VFB_CHG_CONTROL);
    sample_and_acc(Avg_exp , ((15-Avg_exp)+4), scale_factor_Vfb);
    output.adcVcap = output.adcValue;
    // select another input not to interfere with DAC
    adcSelectGpioInput(AUXIO_A_VBAT_SENSE);
    // If Vcap > 3.8V then reset initial charge
    if ( output.adcVcap > cfg.adcVcap3800mV ) {
    state.InitialCharge = 1;
    }
    if (output.adcVcap < cfg.adcVcap3800mV) {
    output.Ready = 0;
    } else {
    output.Ready = 1 ;
    }
    // If Vcap < 3.95v then adjust DAC
    // else next state is Idle
    if (output.adcVcap < cfg.adcVcap3950mV) {

    if (output.IinSetpoint == setpoint_superfast_charge) {
    output.DACCorrection = (output.Ierr + (1 << 5) )>> 6;
    } else if (output.IinSetpoint == setpoint_fast_charge) {
    output.DACCorrection = (output.Ierr + ( 1 <<5 ))>> 6;
    } else if ( output.IinSetpoint == setpoint_minus_10 ) {
    output.DACCorrection = output.Ierr >> 5;
    } else if (output.IinSetpoint == setpoint_zero) {
    output.DACCorrection = output.Ierr >> 5 ;
    } else {
    output.DACCorrection = ( output.Ierr + ( 1 << 3 ) ) >> 4 ;
    }
    // clip DAC correction
    if ( output.DACCorrection > 4 ) {
    output.DACCorrection = 4 ;
    }
    if (output.DACCorrection < (-8) ) {
    output.DACCorrection = (-8);
    }
    // clip DACcorrection at -1
    // if ( output.DACCorrection > 1 ) {
    // output.DACCorrection = 1 ;
    //}

    output.DACValue -= output.DACCorrection;
    // clip DAC value to prevent wraparound
    if ( output.DACValue < 0 ) {
    output.DACValue = 0 ;
    } else if ( output.DACValue > 0xFF ) {
    output.DACValue = 0xFF;
    }
    compaEnable(COMPA_PWRMODE_ANY) ;
    // select COMPA input as DC-DC vontrol
    compaSelectGpioInput(AUXIO_A_VFB_CHG_CONTROL);
    // load new value to DAC
    refdacStartOutputOnCompaIn(output.DACValue);
    // Enable DAC
    refdacEnable(REFDAC_PWRMODE_ANY,REFDAC_REF_DCOUPL_VOUT_LOW);

    refdacWaitForStableOutput() ;
    gpioSetOutput(AUXIO_O_POWER_EN);
    } else {
    state.ChargerState = State_Idle;
    state.InitialCharge = 1;
    }
    adcDisable();
    for ( U16 n = 0; n <80; n++ ) {
    fwDelayUs(10000);
    }

    // }

    }
    fwScheduleTask(1);]]>
    state.ChargerState = State_Idle;
    state.InitialCharge = 0;

    output.SCVersion = 43;
    output.Ready = 0;
    output.RunningTask = TaskCapacitorCharger;
    output.Rreff = DCDCRreff;
    output.Rfeedback = DCDCRfeedback;
    // Schedule the first execution
    fwScheduleTask(1);]]>
    refdacStopOutput();
    refdacDisable();]]>
    0、1、2、3
    RUN_EXECUTE、WAIT_10ms、WAIT_10ms、WAIT_10ms、WAIT_10ms
    output.DACCorrection、output.DACValue、output.IERR、output.Iin、output.adcBatteryVoltage、output.adcVcap、state.ChargerState、state.InitialCharge




    1) Cap charger
    2) Lipo charger

    for Lipo
    vbat below 3V - trickle charge at 0.1C
    from 3V to 4.2V constant current charge 0.2C
    stop charging at Vbat 4.0V
    recharge at 3.8V

    charge cycle
    - measure charger plug state
    - measure charger voltage
    - measure input voltage to the DC-DC
    - check LDO flag
    - if no input voltage to DC-DC or voltage is not 4V or LDO flag is down - dont do anything
    - measure charge current
    - disconnect charger
    - check battery voltage
    - if battery voltage below 2V --> do not charge
    - if battery voltage above 4.0V --> do not charge
    - decide on charge current target according to battery voltage
    - if charge current below target , increase DC-DC voltage by 1 DAC unit (decrease DAV voltage by 1 LSB)
    - if charge current above target, decrease DC-DC voltage by 1 DAC unit (increase DAC voltage by 1 LSB)
    - re-activate DC-DC (unless battery voltage below 2V or above 4V)

    - Signal ready on battery voltage > 3.6V]]>
    64
    4.
    16.
    60
    2370
    909
    0x0001
    0x00
    2.
    23650
    2.
    1
    3.
    0
    0
    1
    16.
    100
    329.
    363.
    3000
    3600
    4200
    4500
    5500
    0
    0
    0
    0
    0
    0
    0
    0
    2370
    909
    TaskLiPoCharger
    10.
    0
    0
    0
    0
    0
    0
    0
    0
    0
    0
    0
    2048
    2150
    State_CC_Low







    0
    DIO28









    0
    DIO30









    0
    DIO26.









    0
    DIO27.

















    1
    -1
    0
    DIO9.

































    1
    -1
    0
    DIO8.



































    -1
    0
    1
    0
    DIO29




































    -1
    0
    0
    0
    DIO11.




































    0
    1







    8.

    0
    20.




































    2.
    1
    0
    1









    0
    -1
    0
    0
    0
    0

















    64
    11.
    64









    output.adcTemp = 0;
    accReset();
    for (U16 n = 0; n < (1 << avg_shift ); n++) {
    adcGenManualTrigger();
    adcReadFifo(output.adcTemp);
    accMac16s16u(output.adcTemp, factor);
    }
    accGet16(result_shift; output.adcValue );
    }

    //charge cycle
    // - measure charger plug state
    //- measure charger voltage
    //- measure input voltage to the DC-DC
    //- check LDO flag
    //- if no input voltage to DC-DC or voltage is not 4V or LDO flag is down - do nothing
    //- measure charge current
    // measure charger output voltage
    //- disconnect charger
    //- check battery voltage
    //- if battery voltage below 2V --> do not charge
    //- if battery voltage above 4.0V --> do not charge
    //- decide on charge current target according to battery voltage
    //- if charge current below target , increase DC-DC voltage by 1 DAC unit (decrease DAV voltage by 1 LSB)
    //- if charge current above target, decrease DC-DC voltage by 1 DAC unit (increase DAC voltage by 1 LSB)
    //- re-activate DC-DC (unless battery voltage below 2V or above 4V)
    //
    //- Signal ready on battery voltage > 3.6V

    // make sure DC-DC is diabled to let teh 22ucap discharge
    gpioClearOutput(AUXIO_O_POWER_EN);


    // set DC DC voltage boost mode , by shorting R18(220K) to ground
    gpioClearOutput(AUXIO_XD_DCDCVOLTAG_BOOST);

    // measure internal temp
    sysGetBatmonTemp( output.InternalTemp);
    // convert from 1/4 degrees to degrees
    output.InternalTemp >>= 2 ;

    // check charger plug state
    gpioEnableInputBuf(AUXIO_I_EX_POWER_PLUG);
    gpioGetInputValue(AUXIO_I_EX_POWER_PLUG;output.ExPowerPlugStatus);
    gpioDisableInputBuf(AUXIO_I_EX_POWER_PLUG);

    // measure charger voltage
    // ADC enable , with the right S&H time
    adcEnableSync(ADC_REF_FIXED, ADC_SAMPLE_TIME_170_US, ADC_TRIGGER_MANUAL);

    // measure battery voltage for telemetry
    adcSelectIntInput(ADC_INPUT_VDDS);
    sample_and_acc(2,13,scale_factor_1);
    output.adcBatteryVoltage = output.adcValue;


    // Configure EX_power_Sense as analog input
    adcSelectGpioInput(AUXIO_A_EX_POWER_SENSE);
    //for ( U16 n=0 ; n < 10; n++){
    //fwDelayUs(10000);
    //}
    sample_and_acc(Avg_exp , ((15-Avg_exp)+5), ScaleFactor10K_100K);
    output.adcExPowerSense = output.adcValue<<1;

    adcSelectGpioInput(AUXIO_A_VBAT_SENSE);
    fwDelayUs(10000);
    sample_and_acc(Avg_exp , ((15-Avg_exp)+5), scale_factor_VbatSense);
    output.adcVbat = output.adcValue<<1;

    //// check LDO power good signal
    //// check charger plug state
    gpioEnableInputBuf(AUXIO_I_EX_POWER_PLUG);
    gpioGetInputValue(AUXIO_I_LDO_FLAG;output.LDOFlag);
    gpioDisableInputBuf(AUXIO_I_EX_POWER_PLUG);

    // measure battery voltage
    adcSelectGpioInput(AUXIO_A_VDD_BG95);
    fwDelayUs(10000);
    sample_and_acc(Avg_exp , ((15-Avg_exp)+4), ScaleFactor10K_100K);
    output.adcVlipo = output.adcValue;

    //// check power plug
    ifnot (output.ExPowerPlugStatus == 1) {
    gpioClearOutput(AUXIO_O_POWER_EN);
    output.DACValue = DAC_Init_Value;
    } else ifnot (output.LDOFlag == 1) { // check LDO flag
    gpioClearOutput(AUXIO_O_POWER_EN);
    output.DACValue = DAC_Init_Value;
    } else ifnot (output.adcExPowerSense > cfg.Vin4500mV) { // check charger voltage low limit
    gpioClearOutput(AUXIO_O_POWER_EN);
    output.DACValue = DAC_Init_Value;
    } else ifnot (output.adcExPowerSense < cfg.Vin5500mV) { // check charger voltage high limit
    gpioClearOutput(AUXIO_O_POWER_EN);
    output.DACValue = DAC_Init_Value;
    } else {
    // measure charge current by measuing charger output voltage (after the diode) while active and then when disabled - divide by 1 ohm (2 ohm in the dev setup)

    // give some time for the 22u cap to discharge
    // for ( U16 n=0 ; n < 10; n++){
    // fwDelayUs(10000);
    // }

    // first activation of DAC
    if (state.ChargerState < State_CC_Low) {
    compaEnable(COMPA_PWRMODE_ANY) ;
    // select COMPA input as DC-DC vontrol
    compaSelectGpioInput(AUXIO_A_VFB_CHG_CONTROL);
    // load new value to DAC
    refdacStartOutputOnCompaIn(output.DACValue);
    // Enable DAC
    refdacEnable(REFDAC_PWRMODE_ANY,REFDAC_REF_DCOUPL_VOUT_LOW);
    // refdacWaitForStableOutput() ;
    }


    // ----------------- fix DAC value for debug of input inrush --------
    // turn on DAC
    // Enable DAC
    // redacbufenable();
    compaEnable(COMPA_PWRMODE_ANY) ;
    // select COMPA input as DC-DC vontrol
    compaSelectGpioInput(AUXIO_A_VFB_CHG_CONTROL);
    // load new value to DAC
    refdacStartOutputOnCompaIn(DAC_Init_Value);
    // Enable DAC
    refdacEnable(REFDAC_PWRMODE_ANY,REFDAC_REF_DCOUPL_VOUT_LOW);
    // refdacWaitForStableOutput() ;
    // load new value to DAC
    fwDelayUs(10000);

    // adcSelectGpioInput(AUXIO_A_VDD_BG95);
    // fwDelayUs(10000);
    // sample_and_acc(Avg_exp , ((15-Avg_exp)+4), ScaleFactor10K_100K);
    // output.adcVlipo1 = output.adcValue;

    // Turn on DC-DC
    gpioSetOutput(AUXIO_O_POWER_EN);
    state.ChargerState = State_CC_Low;
    fwDelayUs(10000);
    refdacChangeOutputValue(output.DACValue);
    // refdacWaitForStableOutput() ;

    // stabilization time
    for ( U16 n=0 ; n < 10; n++){
    fwDelayUs(10000);
    }

    adcSelectGpioInput(AUXIO_A_VDD_BG95);

    sample_and_acc(Avg_exp , ((15-Avg_exp)+4), ScaleFactor10K_100K);
    output.adcVcharger = output.adcValue;

    output.Icharge = (output.adcVcharger - output.adcVlipo);

    // no need to divide for the final baord with 1 ohm
    // divide by 2 ohm to get charge current in mA
    //output.Icharge >>= 1;
    if ( output.Icharge < 0) {
    output.Icharge = 0;
    }
    output.Ierr = output.Icharge - cfg.Isetpoint;
    // reconfig pin as analog output
    // gpioCfgMode(AUXIO_A_VFB_CHG_CONTROL,GPIO_MODE_INPUT);


    // check for condition where there is no need to charge
    if (output.adcVlipo > cfg.VLipo3000mV) {
    if (output.adcVlipo < cfg.VLipo4200mV ) {
    // target charge current is set to 100mA (~0.1C)
    if ( output.Ierr > 0 ) {
    output.DACPreAcc +=1;
    if ( output.DACPreAcc > PreAccThr) {
    output.DACPreAcc = 0;
    output.DACValue += 1;
    }
    } else if (output.adcVcharger < cfg.VLipo4200mV) {
    output.DACPreAcc -= 1;
    if ( output.DACPreAcc < (-PreAccThr) ) {
    output.DACPreAcc = 0;
    output.DACValue -= 1;
    }
    }

    }else{
    state.ChargerState = State_HighBat;
    output.DACValue = DAC_Init_Value;
    gpioClearOutput(AUXIO_O_POWER_EN);
    }
    } else {
    state.ChargerState = State_NoBat_LowBat;
    output.DACValue = DAC_Init_Value;
    gpioClearOutput(AUXIO_O_POWER_EN);
    }
    }


    if (output.adcVlipo > cfg.VLipo3000mV) {
    if (output.adcVlipo < cfg.VLipo4200mV ) {
    state.ChargerState = State_CC_Low;
    } else {
    state.ChargerState = State_HighBat;
    }
    } else {
    state.ChargerState = State_NoBat_LowBat;
    }


    ifnot (state.ChargerState > State_NoBat_LowBat ) {
    output.Ready = 0;
    } else if (output.adcVlipo > cfg.VLipo3600mV) {
    output.Ready = 1;
    } else {
    output.Ready = 0;
    }
    adcDisable();
    // keep sensor controller running to prevent low power mode and DAC disable
    for ( U16 n = 0; n <10; n++ ) {
    fwDelayUs(10000);
    }
    output.RunningTask = TaskLiPoCharger;
    fwScheduleTask(1);]]>

    output.DACValue = DAC_Init_Value ;

    output.SCVersion = 43;
    output.Ready = 0;

    output.DACPreAcc = 0;
    output.DACValue = DAC_Init_Value;
    output.Rreff = DCDCRreff;
    output.Rfeedback = DCDCRfeedback;

    // Schedule the first execution
    fwScheduleTask(1);]]>
    refdacStopOutput();
    refdacDisable();]]>
    0、1、2、3
    RUN_EXECUTE、WAIT_1s
    output.DACValue、output.Icharge、output.IERR、output.LDOFlag、output.adcExPowerSense、output.adcVbat、output.adcVcharger、output.adcVlipo、state.ChargerState



  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好!  

    让项目的 ARM 端也测试这一点会很有帮助。 除了您未启用"外设共享"之外、我没有看到任何即时问题、这可能是问题、也可能不是问题(取决于您在 ARM 端执行的操作)。

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    Yaron、您好!

    我还注意到您正在将"LiPo"任务设置为以"低功耗"模式运行。 不支持这种情况、因为您希望使用 ADC。 请在帮助部分:项目面板->电源和时钟设置面板中查看您可以在这两种模式下使用的外设。

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    你(们)好、M-W

    谢谢!!
    显然、该任务正在等待 ADC、导致复位。