Loopback testing with a simple script shows polled mode working properly and immediately returning bytes as receives, while IRQ-based does it in chunks of 4 bytes until the final set.
Loopback testing with a simple script shows polled mode working properly and immediately returning bytes as receives, while IRQ-based does it in chunks of 4 bytes until the final set.
This was at the right time :)
I told you, that #471 fixed my problem with the knx stack, well, that was true for an old version of this stack.
With the current master (of the knx branch) it is screwed again, BUT, when I activate polling it works. Great job.
One question:
do you always get 4byte chunks? also when communication is paused? that would mean somehow, the "32bit times IRQ" does not work properly.
This was at the right time :)
I told you, that #471 fixed my problem with the knx stack, well, that was true for an old version of this stack.
With the current master (of the knx branch) it is screwed again, BUT, when I activate polling it works. Great job.
One question:
do you always get 4byte chunks? also when communication is paused? that would mean somehow, the "32bit times IRQ" does not work properly.
For polled you see Avail go 0..1..2..3..4..5..print
For IRQ you see Avail go 0...4...print
IF the 32-bit timeout did not work, then it would never advance because Serial1 only sends out 6 bytes per loop.
No, the last bit will be at 32-bit times out. I connect up pins GP0 tp GP1 (i.e Serial1 loopback) and run the following script:
````
void setup() {
Serial.begin(115200);
Serial1.setPollingMode(false);
Serial1.begin(110);
delay(5000);
}
void loop() {
Serial1.printf("hello\n");
while (Serial1.available() < 6) {
Serial.printf("Avail: %d\n", Serial1.available());
}
Serial.printf("read: ");
while (Serial1.available()) {
Serial.printf("%c", Serial1.read());
}
Serial.printf("\n");
delay(1000);
}
````
For polled you see Avail go 0..1..2..3..4..5..print
For IRQ you see Avail go 0...4...print
IF the 32-bit timeout did not work, then it would never advance because Serial1 only sends out 6 bytes per loop.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Fixes #472
Instead of using interrupts, explicitly call the IRQ handler dueing Serial
read/peek/available calls.
@SirSydom would appreciate you giving this a whirl and reporting back, please.
Loopback testing with a simple script shows polled mode working properly and immediately returning bytes as receives, while IRQ-based does it in chunks of 4 bytes until the final set.
This was at the right time :)
I told you, that #471 fixed my problem with the knx stack, well, that was true for an old version of this stack.
With the current master (of the knx branch) it is screwed again, BUT, when I activate polling it works. Great job.
One question:
do you always get 4byte chunks? also when communication is paused? that would mean somehow, the "32bit times IRQ" does not work properly.
No, the last bit will be at 32-bit times out. I connect up pins GP0 tp GP1 (i.e Serial1 loopback) and run the following script:
For polled you see Avail go 0..1..2..3..4..5..print
For IRQ you see Avail go 0...4...print
IF the 32-bit timeout did not work, then it would never advance because Serial1 only sends out 6 bytes per loop.