Replies: 7 comments 7 replies
-
Hello, and thank you for the report, looks like I need to actually make EVE cry for once to test this better. That EVE_busy() returns EVE_FIFO_HALF_EMPTY is of course an error and I have to admit an obvious one - ouch. :-) That the fonts are gone is a result of the bitmap handles getting reset. |
Beta Was this translation helpful? Give feedback.
-
Thanks for response, I didn't think of sending wrong command to trigger fault :) It was easiest for me to interrupt SPI cause this error firstly occurred during EMC tests of our custom board. So according to your info i should not need to reinitialize fonts but it does not work if i don't reinitialize xfont/font handles/bitmap handles in RAM_G (and it is not working every time, sometimes i need to do it twice). What I am getting as coprocessor fault is : ERROR: unsupported command To make EVE respond again i have to omit restoring previous state, basically i need to remove:
and:
after that i have to reinitialize flash using
and setup new handles/fonts using series of:
After all of this is eve is working fine. If i don't do this program is stuck in EVE_busy(). I must be missing something or doing something wrong but I have no clue what :/ I am putting font data in 0x186C0 address and am using 20800 bytes for xfont data. And this is only thing i store in RAM_G. |
Beta Was this translation helpful? Give feedback.
-
I reworked EVE_Busy() a bit more, removed the flash commands from it and added a new return code EVE_FAULT_RECOVERED to indicate that EVE_busy() detected a coprocessor fault and went thru the recovery sequence. I ran a quick test with the small font I am using for the other examples and while I had to put EVE_cmd_setfont2() even in the first display list so it makes no difference if there is a coprocessor fault or not. It works just fine though with not using EVE_init_flash() and EVE_cmd_flashread(). Now I need to find a font with a lot more glyphs. |
Beta Was this translation helpful? Give feedback.
-
I should have been clearer, it is not one xfont, but a few for different languages and font sizes. Ok so I did some more tests thanks to your last comments and I believe that my issue is partially solved. If I don't do flash reinitialization as you suggested (it is not getting detached), EVE can almost always recover without issue, I just have to set up handles again. However, there are still some occasional circumstances where execution is stuck in EVE_busy() always returning EVE_FIFO_HALF_EMPTY. For now, I decided to check if there are 500 (seems to work fine for me) consecutive EVE_FIFO_HALF_EMPTY returns and perform another recovery without restoring the coprocessor state. This seems to solve it all. Also, may I suggest adding some way to check if recovery happened from outside of the library code? Some global variables or introduce callback functions to perform custom recovery. There is no easy way to perform application-specific recovery atm. |
Beta Was this translation helpful? Give feedback.
-
I removed the flash commands with the update yesterday, this is something an application would need to do. And I just added defines like EVE_FLASH_STATUS_FULL.
This one puzzles me, for some reason it does not work here when I setup the font handle before writing the first display list.
Have you updated the library?
EVE_busy() is the only function to attempt the recovery and it returns EVE_FAULT_RECOVERED now, so usually this should be enough. Hmm, maybe this helps as additional safeguard: uint8_t EVE_get_and_reset_fault_state(void) if (fault_recovered) I just pushed another update. |
Beta Was this translation helpful? Give feedback.
-
Regarding the CMD_SETFONT2 issue. So the clean way to use it would be: So the question is not really why the first call outside of a display list fails, Without the CMD_SWAP it should get overwritten by the following new display list. Adding all three lines to the recovery code works as well, as it should, that using only the one line works is merely by coincidence. |
Beta Was this translation helpful? Give feedback.
-
All of my tests were on the latest available version of the library.
So to test this I increased my stuck in EVE_FIFO_HALF_EMPTY detection counter to 10000 (which is way longer than EVE should take to execute full DL). After reaching my "timeout" I assumed that it is in an OK state and was sending a "new" frame (it was the same DL all the time). If after "timeout" I perform another recovery, everything is fine. (This happens occasionally and performing another reset is fine for me, but sadly I need to modify the library code to detect it :/) About EVE_cmd_setfont2 and reinitialization: to reinitialize I am indeed writing an empty display list once (on init and on coprocessor fault):
That is what I meant. There was no way to know if a fault happened and to trigger setting up handles without modifying the library code. I guess EVE_get_and_reset_fault_state() is OK, I can just check it after each EVE_execute_cmd. |
Beta Was this translation helpful? Give feedback.
-
Hi Rudolph,
Firstly thanks for this amazing library!
I am facing issues during screen recovery from errors. I can fairly consistently put my screen in a state where it will never recover by introducing some short interferences on SPI lines. Basically after doing so EVE_busy() will never return E_OK (always returns EVE_FIFO_HALF_EMPTY and is indefinitely stuck in a loop) so I decided to introduce a retry counter and another define EVE_AFTER_RESET to indicate that reset happened and return it from EVE_busy(). I did so because I noticed another issue with recovery. After recovery extended fonts are not recovered, I have to perform another set of fonts initialization (using EVE_cmd_flashread and EVE_cmd_setfont2), and here comes my issue, every few recoveries fonts are not reinitialized even though functions are executed without error. What am I missing to properly recover from coprocessor errors when using extended fonts? I also don't know how to debug it properly, I assume the issue must be somewhere between BT816 and the display flash.
Im using STM32F303RE and Riverdi RVT43ALBFWN00 display.
Beta Was this translation helpful? Give feedback.
All reactions