RA2E1 RM_TOUCH_Open FSP error

Hi,

I'm trying to use touch unit on RA2E1 but I'm receiving error from RM_TOUCH_Open() function. 

Function gives me FSP_ERR_INVALID_ARGUMENT error. I couldn't find out why this error happens.

I've created configuration files using QE Tool .

1-  After the tuning process is completed succesfully by QE Tool, the configuration files are (qe_touch_config.c, qe_touch_config,h, qe_touch_define.h) created by clicking "Output Parameter Files".

2- But when I swiitched to the software side RM_TOUCH_Open() function returns an error of FSP_ERR_INVALID_ARGUMENT. When I checked Capacitive Touch Middleware (rm_touch) datasheet about this error, the document says that this is about configuration parameter error. But this configuration parameters are created by QE Tool after the tuning process is completed. I don't know where to find out the solution of this problem.

I just basically call this code block.

err = RM_TOUCH_Open(g_qe_touch_instance_config01.p_ctrl, g_qe_touch_instance_config01.p_cfg);
if (FSP_SUCCESS != err)
{
while (true) {}
}

I'll be appreciated if you illuminate me.

Thanks.

Parents
  • Without seeing the parameter files generated, it is difficult to say.

    If you look at the function RM_TOUCH_Open(), you will see that FSP_ERR_INVALID_ARGUMENT. can be returned for many reasons.

    Looking at the image you did share, did the QE tool warn you that the parasitic capacitance of your design was too low?  All of you electrode values are < 10pF.  For the CTSU to accurately operate, the parasitic capacitance should be 10pF to 50pF (for devices with CTSU) and 10pf to 100pF (for devices with CTSU2, such as the RA2E1)

    I would try to add some parasitic capacitance to the system.  You can try adding some small 10, 15, 22pF caps between the electrode lines and Gnd.  I have also used copper tape stuck underneath the electrodes.

    If you can get the QE tool to report parasitics > 10pF, then I am sure that will help.

  • Hi,

    Thanks for replying my question.

    As far as I understand, this error may be returned because of the parasitic capacitance values of touch sensors. I didn't get any warning from QE tools as far as I remember. But, I woudn't've expected that if this error may have returned because of this parasitic capatiance values actually. QE tool must give a warning message about that. I'll try adding capacitor between GND and touch electrodes. I'll update this post when I try and I'll share the output of parameter files of tuning process. 

  • Hi,

    I've solved the problem by swtiching IAR to e2studio. RM_TOUCH_Open() function returns FSP_SUCCESS on e2studio but the same function returns FSP_ERR_INVALID_ARGUMENT on IAR. I didn't understand why this error happened on IAR, but touch unit worked successfully on e2studio although I didn't change the output parameters of touch unit.

  • Hi hurkanhokelek-

    Have you tried running IAR without any compiler optimization? I'm wondering if IAR might be changing some timing or optimizing out a variable that e2studio doesn't change....

    Let us know if you have already explored this.

    Stay Safe,

    Warren

  • Hi,

    Sorry for late reply.

    Although I didn't make any optimization configuration on IAR when working with RA2E1, RM_TOUCH_Open() function returns FSP_ERR_INVALID_ARGUMENT. I couldn't understand why IAR returns this error. RM_TOUCH_Open() function returns FSP_SUCCESS on e2studio and touch unit works really good on RA2E1.

    Thanks. 

  • Which version of IAR toolchain are you using? 

    Which version of QE Tool for Cap Touch are you using?

  • I do use IAR Embedded Workbench IDE - Arm 9.10.1 and QE for Capacitive Touch v1.3.0.

Reply Children