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.

MSP430FR2632: checking CAPTivate pins one by one

Part Number: MSP430FR2632


Hi,

I need to write a routine, in order to check each individual pin of my MSP.

To check the GPIO pins, it's relatively easy, I configure it as an input, the neighbours are configured as high level output, and I check if I get a high input, which means I have a soldering short between some pins.

anyway, this is not the problem.

Now, I want to check the captivate pins, in order to now if they are cut somewhere on the PCB.

How can I get a value from those pins (sometime purely captivate pins, sometime alternate function can be GPIO) ?

(I have 6 pins to check, it is a 3x3 track pad)

Thanks for you help.

  • Hi Charly,

    Yup, on those devices with dedicated Captivate IO pins, it becomes a bit of a challenge, since you can't just "set / clear" the pin.  You have to actually perrmrona capacitive measurement then compare to a known good value. 

    I have a trackpad diagnostic utility that does just that and is used to check if the trackpad is connected or not.  However, It only checks one element, E00 (RX/TX node) to determine if the trackpad is there or not.   For you, you would need to test all 9 nodes (3x3).  The theory is if there is a break or short in one of the TX or RX signal traces, the measured value will be different from the known good value and you can set some threshold that says if the pin measurement is either good or bad.

    I can extend the code to do all 9 nodes for you, but it may take a day or two to do and verify that it works correctly.

    In the mean time, to get you started I will post the current set of instructions showing how to add the diagnostics functionality to your project and how to run and capture a set of known good values. I will also post the CCS project source code for the FR2676 example I have that demonstrates this.  If you follow the instructions, you should be able to copy the diagnostic files and add your FR2632 project and at least test to see how it works on your setup.  Remember, the code is only setup to test element E00, but it will give you an idea how things work.

    Then when I have the modified code ready, I will post.

    Sound good?

    BTW, would you mind sharing what your trackpad is going to be used for?  Are you planning on doing finger gestures as well or just XY tracking?

    detect_trackpad_software_instructions.pdf

    FR2676_TP8X8_1_85_00_04_test_TP_connections.zip

  • Hi Dennis,

    Thanks a lot, I will analyze your code carefully, and come back to you.
    The trackpad is here to recognize some gesture like swipe left, right, double tap... this part seems to work.

  • Here is the trackpad configuration

  • Hi Dennis,

    The MCU I'm using is pretty limited in FRAM memory, and it's impossible to make your code fit the FRAM along with mine... I tried it anyway,  and it's working more or less, but My strategy is to get to the core of the problem, in order to reduce the code and especially remove the QMath lib.

    Don't you think I could use just this function to get the rawdata of each element ?

    void Grip_measureCycleRawCount(tSensor *pSensor, uint8_t ui8Cycle)
    {
        MAP_CAPT_applySensorParams(pSensor);
        MAP_CAPT_applySensorFreq(CAPT_OSC_FREQ_DEFAULT,pSensor);
        MAP_CAPT_loadCycle(pSensor, ui8Cycle, 0, false);
        MAP_CAPT_startConversionAndWaitUntilDone(&g_bEndOfConversionFlag, CPUOFF);
        MAP_CAPT_unloadCycle(pSensor, ui8Cycle, 0, false);
    }

    II tried but I get some problem to target them...

    for(j=0; j<3;j++){
            for(i = 0; i< 3; i++){
               pElement = Trackpad.pCycle[j]->pElements[i];
               mesure=0;
                
                // 8 measures, then average
               for(k = 0; k<8;k++){
                   Grip_measureCycleRawCount(&Sentien_Trackpad, j);
                   mesure = (uint32_t)(pElement->pRawCount[0]);
               }
    
               mesure = mesure >> 3;
            }
        }

    and my values seems strange, what do you think ?

  • Hi Charly,

    Ok then how much memory does your application take up?  Do you use any of the INFOA memory region?  I have code now that scans all the electrodes so let me see if I can reduce the size for you.

  • Can you explain why you make some multiplication and division ? Why can't I get the rawcount directely ? 

    Thanks for your help

  • Hi Charly,

    The math is used to convert the measurements into a 'change in capacitance' which can be used to determine the actual absolute pin capacitance. That's what the original code is for, but your application probably doesn't need it.  I have attached the latest code that scans all the trackpad electrodes.  You can modify to suit your needs.

    TP4X4B_1_85_00_14_test_TP_connections.zip

  • Hi Charly,

    It's been a while since we have heard from you, so I'm going to assume you were able to move forward with your project.
    I will mark this posting as RESOLVED, but if this isn’t the case, please click the "This did NOT resolve my issue" button and reply to this thread with more information.
    If this thread is locked, please click the "Ask a related question" button, and in the new thread describe the current status of your issue and any additional details you may have to assist us in helping to solve your issues.

**Attention** This is a public forum