R7F102GGE2DFB RL78/G22 fast prototyping board - current consumption measurement

I'd like to know which is the best way to measure current consumption on this demo board.

I need to verify standby current consumption.

Is there something similar?

Parents
  • Hello simonemassignan,

    Thank you for reaching out to the Renesas Engineering Community!

    There is also a measurement available for the current drawn by the evaluation MCU for your RL78/G22 Fast Prototyping Board. You can find the documentation at this link: rl78g22-fast-prototyping-board-users-manual. However, please note that the J11 header is not mounted on the board, and you need to cut the VDD pattern.




    I would also recommend placing a Shunts Short Circuit Cap/Header Pin Jumper Cap in the J11 slot in case you no longer need to measure the current.

    I hope this helps!

    Regards,
    Jef

    If this response, or one provided by another user, answers your question, please verify the answer. Thank you!
    Renesas Engineering Community Moderators
    https://community.renesas.com/
    https://academy.renesas.com/
    en-support.renesas.com/.../

  • Is there an example for using Touch peripheral in a low power environment (similar to the example for RTK0EG0042S01001BJ) ?

    Thanks

  • Former Member
    0 Former Member in reply to simonemassignan

    Hi simonemassignan, sorry for late response. 

    I'm going into the problem, could you please share me, when you're facing issue with standby mode? do you use SNOOZE mode or STOP mode?

    Does application runs after standby mode? and just touch peripheral doesn't work correctly during standby? Is it about overall functionality in standby or just with CTSU? 

  • TouchProject.zip

    I want to use the snooze mode sequencer as the example attached. 

    The application does not exit standby mode, I think the CTSU does not trigger the measure because the timer interrupt does not occurr.

  • This is where the firmware stucks, on stop() instruction.

  • This is the timer configuration.

    After timer starts, ITLS00 register is set to 1 (see image below), so I think the compare match signal has been detected in channel 0.

  • Update on my work:

    The following routine is called in main loop and it's working, just to demonstrate that timer overflows,

    then CTSU start measurement and gives a callback when the measure end.

    The problem is that I want to use the Snooze mode sequencer to reach the lowest power consumption

    and it is not working for me.

    ********************************************************************

    ***************** WORKING *************************************

    ********************************************************************

    static void r_rssk_touch_stop_mode(void)
    {
    fsp_err_t err;

    /* TAU0 power off */
    PER0 &= 0xFEU;

    /* Change interval time for STOP mode */
    R_Config_ITL000_SetInterval(TOUCH_STOP_SCAN_INTERVAL);

    /* Clear interrupt flag */
    ITLS0 &= (uint8_t)~_01_ITL_CHANNEL0_COUNT_MATCH_DETECTE;

    /* Scan start */
    err = RM_TOUCH_ScanStart(g_qe_touch_instance_config02.p_ctrl);

    if (FSP_SUCCESS != err)
    {
    while (true) {}
    }

    /* Settings for returning from low power mode */
    R_Config_ITL000_Start();

    while (true)
    {
    /* Wait for CTSU to finish processing */
    while (true)
    {
    __stop();

    if (1U == g_qe_touch_flag)
    {
    break;
    }
    }

    /* Clear interrupt flag */
    ITLS0 &= (uint8_t)~_01_ITL_CHANNEL0_COUNT_MATCH_DETECTE;

    /* Clear the flag indicating that CTSU processing is complete. */
    g_qe_touch_flag = 0U;

    /* Get the scanned data */
    err = RM_TOUCH_DataGet(g_qe_touch_instance_config02.p_ctrl, &button_status, NULL, NULL);

    // I'm not yet interested on the data

    R_Config_ITL000_Stop();
    break;

    }
    }

    *********************************************************************************************

    ****************** NOT WORKING *******************************************************

    *********************************************************************************************

    static void r_rssk_touch_stop_mode(void)
    {
    fsp_err_t err;

    /* TAU0 power off */
    PER0 &= 0xFEU;

    /* Turn off LEDs */
    LED3 = LED_OFF;
    r_rssk_touch_led_clear();

    /* Change interval time for STOP mode */
    R_Config_ITL000_SetInterval(TOUCH_STOP_SCAN_INTERVAL);

    /* Clear interrupt flag */
    ITLS0 &= (uint8_t)~_01_ITL_CHANNEL0_COUNT_MATCH_DETECTE;

    /* SMS setting */
    err = RM_TOUCH_SmsSet(g_qe_touch_instance_config02.p_ctrl);

    if (FSP_SUCCESS != err)
    {
    while (true) {}
    }

    /* Scan start */
    err = RM_TOUCH_ScanStart(g_qe_touch_instance_config02.p_ctrl);

    if (FSP_SUCCESS != err)
    {
    while (true) {}
    }

    /* Settings for returning from low power mode */
    INTC_Start();
    R_Config_ITL000_Start();

    while (true)
    {
    /* Wait for CTSU to finish processing */
    while (true)
    {
    __stop();

    if (1U == g_qe_touch_flag)
    {
    break;
    }
    }
    /* Clear interrupt flag */
    ITLS0 &= (uint8_t)~_01_ITL_CHANNEL0_COUNT_MATCH_DETECTE;

    /* Clear the flag indicating that CTSU processing is complete. */
    g_qe_touch_flag = 0U;

    /* Get the scanned data */
    err = RM_TOUCH_DataGet(g_qe_touch_instance_config02.p_ctrl, &button_status, NULL, NULL);

    if (FSP_SUCCESS == err)
    {
    if (0U != button_status)
    {
    /* Transition to NORMAL mode */
    INTC_Stop();
    R_Config_ITL000_Stop();
    break; // ----> reaches r_rssk_touch_normal_mode() routine
    }
    }
    }
    }

    I'm not sure how the SMS works.

  • Former Member
    0 Former Member in reply to simonemassignan

    Thank you for updating, I'm working on your code, but I don't have hardware in hand. 

    I'll share you the possible solutions about that and explain those, I hope it will help. Thanks for your patience. 

  • Assuming the problem is RM_TOUCH_SmsSet(g_qe_touch_instance_config02.p_ctrl),

    I investigated on the register values.

    These are the following while CPU is stuck in stop mode:

    PER1 register: CTSUEN = 1, TML32EN = 1, SMSEN = 1

    PPR1 register: CTSURES = 0, TML32RES = 0, SMSRES = 0,

    SMSC register equals 0x85: SMSSTART = 1, SMSSTOP = 0, SMSTRGWAIT = 0, LONGWAIT = 0,

    SMSTRGSEL3 = 0

    SMSTRGSEL2 = 1

    SMSTRGSEL1 = 0

    SMSTRGSEL0 = 1

    which means that the snooze mode sequencee activation trigger is the ELC output signal.

    ELC, in my case, links a 32bit timer to the CTSU (ELSELR10 = 0x06U instruction).

    Maybe the SMS is not triggered.....

    SMSSTAT bit of SMS register equals 0, so the SMS is not operating.

  • Former Member
    0 Former Member in reply to simonemassignan

    As you might already know here’s a document for this:

    https://www.renesas.com/us/en/document/apn/rl78-family-ctsu-module-software-integration-system

    at the page 8, the procedure and concepts of using Snooze mode sequencer for touch unit is being demonstrated.

    As document says we must configure 2 free GPIOs (Which are physically connected together) for trigger the ELC unit by CTSU. One GPIO which applies interrupt pulse for triggering ELC unit (after touch measurement is done), then ELC triggers SMS for judgement touch (the procedure and settings for simulating CPU in SMS is done by configurator)

    That’s why we have to set external interrupt GPIO and specify external trigger PORT in configurator.

    So, in configurator, output port number for external trigger and Bit number for external trigger must be specified as a normal output GPIO and must be connected physically in board to another input GPIO pin (configure this GPIO as OUTPUT and set it to 0 initially).  

    At the other hand, in configurator, the parameter “interrupt port number for external trigger” we have to specify the GPIO’s Port which we’ve connected external trigger pin to it and configure the INTPn interrupt like a simple external interrupt.  

     

    And as you already know, Snooze sequencer is acting like CPU, but it cannot handle massive instructions like that. (The instructions and memory managements are structed by configurator)

    Also, The document implies, we cannot use this feature (auto judgment touch) for this number of capacitive touch in snooze mode, “This feature does not perform with the self-capacitance to 9 elements or more and the mutual capacitance to 8 elements or more.”

    In this way, probably we won’t have any conflict with instructions, and after sensing a touch CTSU will be judged by SMS, and after sensing a touch SMS will generate an Interrupt (INTSMSE interrupt) then CPU will start normal operation and goes for getting touch data.

  • Former Member
    0 Former Member in reply to Former Member

    Also there's a specific document for implementing capacitive touch in snooze mode and low power consideration of it which you might find helpful. 

    https://www.renesas.com/us/en/document/apn/rl78g22-capacitive-touch-low-power-guide-sms-mec-function-rev110

    Don't hesitate to ask further questions and tell me if it helped.

    With best regards

  • Thanks a lot, I will try to apply your suggestion.

    This means that the example that I took for RTK0EG0042S01001BJ board

    is working in the RTK0EG0042S01001BJ board because P22 and P16 are connected together.

    Since I'm using RTK7RLG220C00000BJ, this connection is not performed and this is why SMS is not triggered. Is it correct what I'm saying?

Reply
  • Thanks a lot, I will try to apply your suggestion.

    This means that the example that I took for RTK0EG0042S01001BJ board

    is working in the RTK0EG0042S01001BJ board because P22 and P16 are connected together.

    Since I'm using RTK7RLG220C00000BJ, this connection is not performed and this is why SMS is not triggered. Is it correct what I'm saying?

Children