BRT Community

Please login or register.

Login with username, password and session length
Advanced search  

News:

Welcome to the Bridgetek Community!

Please read our Welcome Note

Technical Support enquires
please contact the team
@ Bridgetek Support

Please refer to our website for detailed information on all our products - Bridgetek - Bridging Technology

Pages: 1 [2]

Author Topic: BRT_AN_025 Beta - Portable MCU library for EVE  (Read 1585 times)

korstiaan

  • Newbie
  • *
  • Posts: 10
    • View Profile
Re: BRT_AN_025 Beta - Portable MCU library for EVE
« Reply #15 on: September 01, 2020, 08:11:21 AM »

Hi,

I reduced my whole code to:

Code: [Select]
    EVE_LIB_BeginCoProList();
    EVE_CMD_DLSTART();
    EVE_CLEAR_COLOR_RGB(0, 0, 0);
    EVE_CLEAR(1, 1, 1);
    EVE_COLOR_RGB(255, 255, 255);
    EVE_BITMAP_SOURCE(uStartAddressLogo300x300);
    EVE_CMD_SETBITMAP(uStartAddressLogo300x300, EVE_FORMAT_RGB565, 300, 300);
    EVE_BEGIN(EVE_BEGIN_BITMAPS);
    EVE_VERTEX2F(currentx * 16, currenty * 16);
    EVE_END();
    EVE_DISPLAY();
    EVE_CMD_SWAP();
    EVE_LIB_EndCoProList();
    EVE_LIB_AwaitCoProEmpty();

And this I execute continuously.
And even this small display list gives problems.
I changed my code for HAL_WaitCmdFifoEmpty to

Code: [Select]
uint8_t HAL_WaitCmdFifoEmpty(void) {
    uint32_t readCmdPointer;
    uint8_t retry = 0;

    // Wait until the two registers match
    do {
        // Read the graphics processor read pointer
        readCmdPointer = HAL_MemRead32(EVE_REG_CMD_READ);
        retry++;

    } while ((writeCmdPointer != readCmdPointer) && (readCmdPointer != 0xFFF) && (retry < 250));

    if (retry == 250) {
        printf("retry HAL_WaitCmdFifoEmpty");
    }

    if (readCmdPointer == 0xFFF) {
        // Return 0xFF if an error occurred
        return 0xFF;
    } else {
        // Return 0 if pointers became equal successfully
        return 0;
    }
}

And I get now and then this retry HAL_WaitCmdFifoEmpty about 10-15 times every time it comes.
Also, when I let I ran al night, the display was frozen in the morning.

Something must be wrong in this library and I don't know what.
It causes the display to block/freeze. (a while loop that won't exit, like the one I already edited or it blocks)

Please help.
Logged
Pages: 1 [2]