Hello I'm going back to my project after some time and for some reason there is a delay of 7 seconds that happens for some reason.
What happens the MC runs fine, this can be indicated by the internal led i have setup to blink, but when I send the magic character that adds a packet to the packet stack there is a delay of 7 seconds that happens before the function is executed. This does not make any sense since there is no reason for that delay since there are on other functions between the reading of the character from the serial port and the if() that checks the character and executes the function. What makes even less sense is that is delay happens only if there is a loop in another function, but this loop is only ran when there is a packet in the packet stack.
The problem that I'm describing is between the functions "sendPacketHandle()" and "sendPacket()" that are being ran in loop() in main.cpp and are a part of BusComLib.h.
Further info on the project: this is a project that for now has the task to run communication via a bus. The code I'm sending is the code of the master device that collects all the data.
I have been pulling my hair out for the past few days on this and i don't understand why, any help on it would be very much appreciated.
What happens the MC runs fine, this can be indicated by the internal led i have setup to blink, but when I send the magic character that adds a packet to the packet stack there is a delay of 7 seconds that happens before the function is executed. This does not make any sense since there is no reason for that delay since there are on other functions between the reading of the character from the serial port and the if() that checks the character and executes the function. What makes even less sense is that is delay happens only if there is a loop in another function, but this loop is only ran when there is a packet in the packet stack.
The problem that I'm describing is between the functions "sendPacketHandle()" and "sendPacket()" that are being ran in loop() in main.cpp and are a part of BusComLib.h.
Further info on the project: this is a project that for now has the task to run communication via a bus. The code I'm sending is the code of the master device that collects all the data.
I have been pulling my hair out for the past few days on this and i don't understand why, any help on it would be very much appreciated.