Hello,
@matsp, sorry i didnt understand your last post. Beside that i have one confusion or a question and i hope you can answer that. My main concern is that if i ll try to run my routines in main code, without any infinte loop they never work.
Code:
/* main file */
extern USIGN8 RX_TEST;
extern USIGN8 RX_Receive_Test;
VOID main (VOID)
if(RX_TEST==1) // flag set in sync pin ISR if the receive packet bytes are corrupted
{
perform function a();
flush RX_Fifo();
set SYNC pin low();
blink LED1();
RX_Test=0; // set the global variable again to 0;
}
else if (RX_Receive_Test ==1)// flag set in SYNC pin ISR if the packet is complete
{
perform function b();
dispatch_frame_into_another_buffer();
flush RX_Fifo();
blink LED2();
RX_Receive_Test=0;
}
But if i ll put this whole code into a while(1), infinte loop i ll see my system working and LED 1 or 2 blinking, further i can stop debugging and verify the contents of the packet. could anyone please guide, do we need some kind of loops to run the system into an interrupt.
Code:
extern USIGN8 RX_TEST;
extern USIGN8 RX_Receive_Test;
VOID main (VOID)
while(1)
{
if(RX_TEST==1) // flag set in sync pin ISR if the receive packet bytes are corrupted
{
perform function a();
flush RX_Fifo();
set SYNC pin low();
blink LED1();
RX_Test=0; // set the global variable again to 0;
}
else if (RX_Receive_Test ==1)// flag set in SYNC pin ISR if the packet is complete
{
perform function b();
dispatch_frame_into_another_buffer();
flush RX_Fifo();
blink LED2();
RX_Receive_Test=0;}