Page 1 of 1

SB-20: Salvo: Task Runtime Problems with AQ430

PostPosted: Wed Oct 15, 2003 10:05 am
by Salvo Tech Support
Applies To

All Salvo for TI's MSP430 users who are using the Archelon/Quadravox AQ430 compiler.

Description of Problem

The runtime behavior of a task is not what is expected. For example, a task that has the following code snippet in its infinite loop:

code:
P1OUT |=  0x01;
OS_Delay(5, label);
P1OUT &= ~0x01;
OS_Delay(5, label);

may stop running altogether after an indeterminate time.

The problem is due to an optimization (common subexpression eliminiation) that the AQ430 compiler is applying to the task. This optimization is incompatible with Salvo's task structure due to the fact that Salvo tasks can be (re-)entered after every context switch.

Suggested Workaround

Replace OS_Yield() in salvoincportaq430.h with:

code:
#define OS_Yield(label) do { OSCtxSw(); /$ ; $/ } while (0)

Fixed In

v3.2.3

------------------
--------
Salvo Technical Support
Please request all tech support through the Forums.