I have NXT4024T032. I have 2 pages on it. First includes graph and text, second includes just graph.
I send data to HMI 1000 times for graph and 4 times for text from stm32. When I change page, I take 0x24 FF FF FF code but I set bkcmd=0 at the home page pre-initialize event. It affects my sendme procedure. Because sendme 's buffer 5 byte(66 00 ff ff ff) at STM32 side, overflow warning comes 4 byte length (24 ff ff ff). So my STM32's DMA buffer always slides circular when the overflow warnings come. For example I can take page information as ff ff 66 00 ff or ff 66 00 ff ff etc.
0x24 0xFF 0xFF 0xFF
Not an overflow warning. Status that Serial has overflowed.
What is question?
You post only shows that you did not understand Serial or a circular buffer of DMA
The name is not important for me. The question is that I set the bkcmd to 0.(bkcmd=0). Why do I receive 0x24 0xFF 0xFF 0xFF code?
Man goes to the Doctor squeezing nose very tight.
and says, "Doc, it hurts when I do this"
Doctor says, "Then don't do that".
Circular Buffer of 10 Bytes at clean start.
Every write byte
- put number in space blue points
- move blue pointer clockwise 1 space
Every read byte
- read number from where green points
- move green pointer clockwise 1 space
- write 1 byte (a), read 1 byte (a).
- write 4 bytes (b), read 4 bytes (b).
- write 4 (c), write 4 (d)
What happens if next is write 8 bytes (e)?
How can you read then read (c) ?
- half of (c) 2 bytes are overwritten by (e)
- (c) is invalid,
- with (c) invalid - (d) and (e) is suspect.
buffer is no good.
Like putting 12 litres in 10 litre container and expect 12 litres.
0x24 0xFF 0xFF 0xFF tells
head (blue) has surpassed tail (green)
Serial Overflow has occurred.
data is buffer is now faulty - no need to use.
Data has become LOST and not recoverable.
CAUSE of this ERROR is user side
- design decision of data flow
- manner in which data flow was coded
- decision to ignore Nextion Return Data bkcmd=0
without regard or understanding implications of doing do so
Your observation (0x66 0x00 0xFF 0xFF 0xFF)
- you describe the effect of your corrupt buffer
0x24 in Nextion Instruction Set
Why do you still receive 0x24 0xFF 0xFF 0xFF even if bkcmd=0
It is like Nextion saying
"Stop sending me more data, you sent too much already, all is messed up"
Do you not think it would be important to know
- buffer has been destroyed and is now unreliable?