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.
Part Number: MSP-CAPT-FR2633
Tool/software: Code Composer Studio
Before I describe my problem, I will explain how I got there. I am developing a product that requires capacitive touch. I have generated code from the captivate design center to trigger an LED on the dev board as a starter. Then I made a version to not use UART or Bulk_I2C with PC, therefore standalone turn on the onboard LED upon touching a CAPTIVATE-BSWP pad button. Also changed the clock to 16MHz. It detected touch in the while loop, perfect!
Next I added code software that drives a WS2812 based RGB LED strip. It has a timer interrupt that ticks a counter. In the continuous loop a function checks if the timer ticks are greater than or equal to a particular amount, and outputs a pattern to the LED Strip via UCA0TXBUF of UCA0SIMO in SPI mode. Next I implemented a capacitive touch to trigger the start of this application, like an on button. So in the main(), after performing the initialisation functions of the RGB LED strip and and Capacitive module, and before entering the while(1) continuous loop, I have
While(CAPT_appHandler() != true); // wait till button is pressed to proceed.
START_TIMERA2; // vector=TIMER2_A0_VECTOR Timer 2 A2 CC0
RGB_LED_Pattern(); // Output pattern to WS2812 RGB LED strip
On detecting a touch, it proceeds to run the LED strip pattern in the loop. My problem is, if I add capacitive sensing in the while(1) loop (see below) it will run once and halt. As a side note, I noticed timer interrupts are still running in TIMER2_A0_VECTOR ISR when I put a break point.
if(CAPT_appHandler() == true) //if touch is detected
LED1_ON; // turn on board LED
RGB_LED_Pattern(); //Output pattern to WS2812 RGB LED strip
What is confusing is if I take my LED routine out of the while loop and just keep the capacitive touch check, the capacitive touch responds and loops to keep checking.
I have narrowed down that something happens in CAPT_updateUI(&g_uiApp) in CAPT_appHandler() function which I call in the while(1) loop, but I am unable to solve this and couldn’t understand why I can’t run both my LED function and CAPT_appHandler() check in the continuous loop. It may be a low power mode issue that is a simple fix, which I couldn't find in the CapTIvate Design Center generated code. Anyone who could help me solve this, I appreciate it. Thank you in advance!
Search E2E! Your questions may already be answered!
TI Cloud Tools MSP Product Page
We are glad that we were able to resolve this issue, and will now proceed to close this thread.
If you have further questions related to this thread, you may click "Ask a related question" below. The newly created question will be automatically linked to this question.
In reply to Wei.Jetim Zhao:
Did you have any luck with this problem yet?
All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.
TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs andembedded processors, along with software, tools and the industry’s largest sales/support staff.