Part Number: TMS320F28235
Tool/software: TI C/C++ Compiler
Hi,
Customer's code faced one issue. Global parameter abc's value was changed, but we don't know where it was changed.
The logic is like that:
main()
{
if(condition==true)
abc &= ~def;
}
isr()
{
abc |= 0x10;
hig=100;
}
During about 1000 times test, we found that abc's value lost (still "0") after isr() execution (as parameter hig equals 100). Other 999 times, after isr(), abc's bit 4 is 1. That means, most of the times, the logic works well. But very few times, abc loses its value.
We are working for severl test cases to find the root cause, although it's very hard to reproduce.
Here, we have a doubt: if abc &= ~def; is under executing (currently abc=0), before finishing, if an interrupt comes (inside abc|=0x10), what will happen after restore from isr and abc &= ~def finishes executing. Will abc still be 0 or 0x10?
abc &= ~def, in ASM, there are 5 lines code (just an example). During line 4 code, an interrupt may come. We'd like to know what will happen after isr and line 5 code.
Hope I'm clear.
Thanks a lot.
Br, Jordan