Hi,
I have a problem getting two tasks to co-exist properly on a VC5505 patform, using the CCSV4 tools with the following environment…
Processor: 320VC5505 @ 100MHz.
Tools: CCSV4 – version 4.0.2.01003.
Target: Spectrum Digital TMS320C5505 EVM, revision E.
DSP BIOS version 5.4.02.02.
Basically I need to run two tasks.....
Task 1 - is an audio compression algorithm encode+ decode, which is running at priority level 1.
Task 2 - is an HDLC Rx state machine, and is running at priority level 2.
Task 1 is DMA-driven: as soon as the DMA has transferred 48 input audio samples from the I2S3 port, a DMA interrupt occurs, and the ISR for this interrupt posts a mailbox message for an encode+decode TSK to run. This encode\decode task takes about 850 microseconds to run to completion. The DMA uses HWI_INT8, as specified in the BIOS Configuration Tool GUI.
Task 2 is interrupt-driven, via /INT1, from an external RF transceiver chip connected to the daughterboard interface J22 of the EVM. This interrupt has a higher priority than the DMA interrupt, it uses HWI_INT3. The ISR for /INT1 also posts a mailbox message for a HDLC Rx task, which must run within 80uS of /INT1 interrupt occurring so that incoming data can be read without loss. The /INT1 interrupt is generated every 80 microseconds from an incoming RF signal.
Task 1 will run fine if it is the only active task: Task 2 will also run fine if it is the only task - but with both tasks running at the same time, Task 2 (the HDLC Rx task) gets to run just once, immediately after main() has handed over control to the BIOS - and it never gets to run again after that. Task1, though, will run OK.
It was my understanding that since Task 2 has the higher priority, in both interrupt and task priority, that it would pre-empt Task 1 - but that doesn't appear to be happening in this instance.
So, I have a number of questions..
1. How often, by default, does the BIOS scheduler switch between tasks - and can we control that switch rate via the .tcf file ?
2. In the BIOS manual (document number SPRU423H, section 4.1.5), it states that the highest priority thread is a task that is blocked - could it be that my Task 1 is blocked and is not preemptable by Task 2 ?
3. Also, I’m not using the BIOS interrupt dispatcher for either of the two interrupts associated with the above task, but I am using the ‘ interrupt’ keyword for the C routines that define the two ISRs - would it be better to not use the interrupt keyword and use the dispatcher instead? What is the difference between these two approaches?
I should point out that I'm new to using this BIOS, and am pretty sure that the problem is something I'm doing wrong !!
Any help would be greatly appreciated.
Cheers
Michael