Aaron Heuschmidt

CW 7.0 Processor Expert generates files with wrong order of the codelines

Discussion created by Aaron Heuschmidt on Aug 22, 2006
Latest reply on Aug 29, 2006 by Processor Expert
I'm working with CW 7.0 for DSC 56F8xxx.
With the help of the Processor Expert I had configured the SPI-Port.
The automatic generated file that configured the SPI has the wrong codelineorder.
 
setRegBits(SPI0_SCR,SPI0_SCR_SPRIE_MASK);     /* Enable receiver interrupt */
setRegBit(SPI0_SCR,SPE);                                          /* Enable 'SPI0' device */
setReg16(SPI0_SCR, 25792);                                       /* Set control register */ 
/* SPI0_SCR: SPR2=0,SPR1=1,SPR0=1,DSO=0,ERRIE=0,MODFEN=1,SPRIE=0,SPMSTR=0,CPOL=1,CPHA=1,SPE=0,SPTIE=0,SPRF=0,OVRF=0,MODF=0,SPTE=0 */
In line 3 the two bits that are set in line 1 & 2 will be cleared.
If I change the order of the codelines to 3, 1, 2, it work properly.
 
Is this a Processor-Expert-Bug or what did I wrong?
 
Please let me know if somebody else knows such a problem, thanks!

Outcomes