Hello,
I'm building a standard audio filtering application on C6748 with CCS5.
The application uses double buffering and performs the FIR processing when a buffer is full.
The application is working fine, but I now want to add the ability to control it using the DIP switches on board.
To see that I know how to read the switches' status I added the following section inside the FIR (audio processing section):
DIP_get(0, &tmp_val); if (tmp_val == 1) LED_turnOn(LED_1); else LED_turnOff(LED_1);
This caused the application to fail (the output was corrupted). Can you explain why? Can it be that these few lines are taking to long and create RT problems?
To try and solve the problem, I tried using this code as an idle thread. This did not have any impact on the output audio, but it only worked at application startup - meaning if the switch was off before the application started then the LED would be off, and if it was on when the application started, the LED would be on. Changing the switch status during application runtime did not cause any changes in the LED.
Can someone please help me understand what is the best way to poll on the switches' status during runtime?
Alternatively, is there a way to define a HWI based on a switch status change?
Thanks,
Matan