1
Discussion - EVE / Re: Font baseline metrics
« on: June 09, 2023, 10:40:22 PM »
I have revised the way I handle the snapshot timing. I'll mention it here in case anyone else needs to do something similar.
I no longer check the INT_SWAP flag prior to issuing the CMD_SNAPSHOT2 command. It does not appear to be necessary. I think the snapshot action blocks itself until the new frame is ready.
I also no longer check the INT_SWAP flag to determine when the snapshot is complete. I don't think this was a reliable way to determine when the snapshot was complete. Displaying a new frame and the snapshot completing are two different things they really aren't coupled together. Instead, I write 0xffffffff to some area of RAM_G prior to calling CMD_SNAPSHOT2. Then, immediately after issuing CMD_SNAPSHOT2, I issue a CMD_MEMZERO for that same RAM_G address. So, as soon as the snapshot completes, the coprocessor will clear the memory address. My MCU then polls the memory address until it reads zero. At that point it knows the snapshot has completed and it can safely analyze the rendered glyph (now in RAM_G).
mike
I no longer check the INT_SWAP flag prior to issuing the CMD_SNAPSHOT2 command. It does not appear to be necessary. I think the snapshot action blocks itself until the new frame is ready.
I also no longer check the INT_SWAP flag to determine when the snapshot is complete. I don't think this was a reliable way to determine when the snapshot was complete. Displaying a new frame and the snapshot completing are two different things they really aren't coupled together. Instead, I write 0xffffffff to some area of RAM_G prior to calling CMD_SNAPSHOT2. Then, immediately after issuing CMD_SNAPSHOT2, I issue a CMD_MEMZERO for that same RAM_G address. So, as soon as the snapshot completes, the coprocessor will clear the memory address. My MCU then polls the memory address until it reads zero. At that point it knows the snapshot has completed and it can safely analyze the rendered glyph (now in RAM_G).
mike