Compilation error using 2 Interrupt driven blocks
Posted: Wed Feb 18, 2009 2:37 am
Hi Lubin,
I try to send some information by SPI with two “Interrupt driven” blocks (which work on the same spi).
The problem is that these blocks can't have different numbers of trame (otherwise it will cause a compilation error).
In the example, the instantiation looks like :
extern unsigned volatile int SPI1Buffer_Receive[2];
extern unsigned volatile int SPI1Buffer_Send[2];
extern unsigned volatile int SPI1InterruptIdx;
extern unsigned volatile int SPI1Buffer_Receive[1];
extern unsigned volatile int SPI1Buffer_Send[1];
…and there is thus an error in the compilation.
A solution would be to have all blocks with the same number of trame.
However, it will send “0U” for each unconnected signal and there will be a lost of performance.
Is there another solution?
Michael
I try to send some information by SPI with two “Interrupt driven” blocks (which work on the same spi).
The problem is that these blocks can't have different numbers of trame (otherwise it will cause a compilation error).
In the example, the instantiation looks like :
extern unsigned volatile int SPI1Buffer_Receive[2];
extern unsigned volatile int SPI1Buffer_Send[2];
extern unsigned volatile int SPI1InterruptIdx;
extern unsigned volatile int SPI1Buffer_Receive[1];
extern unsigned volatile int SPI1Buffer_Send[1];
…and there is thus an error in the compilation.
A solution would be to have all blocks with the same number of trame.
However, it will send “0U” for each unconnected signal and there will be a lost of performance.
Is there another solution?
Michael