General Category > Discussion - EVE

BT817Q CMD_SPINNER fails

(1/2) > >>

korstiaan:
Hi,

As soon as I want to use a spinner my screen flashes once and then goes blank.
Same program works fine on EVE2 and EVE3 but not on EVE4?
Text and lines works fine, it is only the spinner that causes the problem.

What can be the reason?

Korstiaan

BRT Community:
Hello,

Can you provide the display list you are using when you see this behaviour?
Could you also provide the CMD_SPINNER implementation you are using in your library?

Best Regards,
BRT Community

korstiaan:
Hi,

This is the simple list:


--- Code: ---void testscreen() {
    EVE_LIB_BeginCoProList();
    EVE_CMD_DLSTART();
    EVE_CLEAR_COLOR_RGB(0, 0, 0);
    EVE_CLEAR(1, 1, 1);
    EVE_LINE_WIDTH(1 * 12);
    EVE_BEGIN(EVE_BEGIN_LINES);
    EVE_VERTEX2F(0 * 16, 0 * 16);
    EVE_VERTEX2F(799 * 16, 479 * 16);
    EVE_END();
    EVE_CMD_SPINNER(200, 200, 0, 0);
    EVE_DISPLAY();
    EVE_CMD_SWAP();
    EVE_LIB_EndCoProList();
    EVE_LIB_AwaitCoProEmpty();
}

--- End code ---

and the EVE_CMD_SPINNER:


--- Code: ---void EVE_CMD_SPINNER(int16_t x, int16_t y, uint16_t style, uint16_t scale) {
    HAL_Write32(EVE_ENC_CMD_SPINNER);
    HAL_Write32(((uint32_t)y << 16) | (x & 0xffff));
    HAL_Write32(((uint32_t)scale << 16) | (style & 0xffff));
    HAL_IncCmdPointer(12);
}

--- End code ---

1. Code works fine on EVE2 and EVE3
2. If I delete the EVE_CMD_SPINNER line I see the diagonal line.
3. As soon as EVE_CMD_SPINNER is in the list, the screen gives a very short image (a flash) of the result and then goes blank.

Korstiaan

korstiaan:
Hi,

Seems like the SPINNER command implicitly on EVE4 calls a SWAP!

This works (tested on 2 different libraries):


--- Code: ---void testscreen() {
    EVE_LIB_BeginCoProList();
    EVE_CMD_DLSTART();
    EVE_CLEAR_COLOR_RGB(0, 0, 0);
    EVE_CLEAR(1, 1, 1);
    EVE_LINE_WIDTH(1 * 12);
    EVE_BEGIN(EVE_BEGIN_LINES);
    EVE_VERTEX2F(0 * 16, 0 * 16);
    EVE_VERTEX2F(799 * 16, 479 * 16);
    EVE_END();
    EVE_CMD_SPINNER(200, 200, 0, 0);
    EVE_DISPLAY();
    // EVE_CMD_SWAP();
    EVE_LIB_EndCoProList();
    EVE_LIB_AwaitCoProEmpty();
}

--- End code ---

SWAP needs to be removed or screen does not work.
Bridgetek, PLEASE confirm this!

BRT Community:
Hello,

Thank you for the update, I haven't had a chance to explicitly verify this behaviour yet with a BT817 development board.

However the following code is from our main sample application, and this does not include a swap command:

--- Code: ---void SAMAPP_CoPro_Widget_Spinner()
{
/*************************************************************************/
/* Below code demonstrates the usage of spinner function. Spinner func   */
/* will wait untill stop command is sent from the mcu. Spinner has option*/
/* for displaying points in circle fashion or in a line fashion.         */
/*************************************************************************/
EVE_CoCmd_dlStart(phost);
EVE_Cmd_wr32(phost, CLEAR_COLOR_RGB(64, 64, 64));
EVE_Cmd_wr32(phost, CLEAR(1, 1, 1));
EVE_Cmd_wr32(phost, COLOR_RGB(0xff, 0xff, 0xff));
EVE_CoCmd_text(phost, (int16_t)(DispWidth / 2), 20, 27, OPT_CENTER, "Spinner circle");
EVE_CoCmd_text(phost, (int16_t)(DispWidth / 2), 80, 27, OPT_CENTER, "Please Wait ...");
EVE_CoCmd_spinner(phost, (int16_t)(DispWidth / 2), (int16_t)(DispHeight / 2), 0, 1);//style 0 and scale 0

/* Wait till coprocessor completes the operation */
EVE_Cmd_waitFlush(phost);

EVE_sleep(1000);

/**************************** spinner with style 1 and scale 1 *****************************************************/

EVE_CoCmd_dlStart(phost);
EVE_Cmd_wr32(phost, CLEAR_COLOR_RGB(64, 64, 64));
EVE_Cmd_wr32(phost, CLEAR(1, 1, 1));
EVE_Cmd_wr32(phost, COLOR_RGB(0xff, 0xff, 0xff));
EVE_CoCmd_text(phost, (int16_t)(DispWidth / 2), 20, 27, OPT_CENTER, "Spinner line");
EVE_CoCmd_text(phost, (int16_t)(DispWidth / 2), 80, 27, OPT_CENTER, "Please Wait ...");
EVE_Cmd_wr32(phost, COLOR_RGB(0x00, 0x00, 0x80));
EVE_CoCmd_spinner(phost, (int16_t)(DispWidth / 2), (int16_t)(DispHeight / 2), 1, 1);//style 1 and scale 1

/* Wait till coprocessor completes the operation */
EVE_Cmd_waitFlush(phost);

EVE_sleep(1000);

EVE_CoCmd_dlStart(phost);
EVE_Cmd_wr32(phost, CLEAR_COLOR_RGB(64, 64, 64));
EVE_Cmd_wr32(phost, CLEAR(1, 1, 1));
EVE_Cmd_wr32(phost, COLOR_RGB(0xff, 0xff, 0xff));
EVE_CoCmd_text(phost, (int16_t)(DispWidth / 2), 20, 27, OPT_CENTER, "Spinner clockhand");
EVE_CoCmd_text(phost, (int16_t)(DispWidth / 2), 80, 27, OPT_CENTER, "Please Wait ...");
EVE_Cmd_wr32(phost, COLOR_RGB(0x80, 0x00, 0x00));
EVE_CoCmd_spinner(phost, (int16_t)(DispWidth / 2), (int16_t)((DispHeight / 2) + 20), 2, 1);//style 2 scale 1

/* Wait till coprocessor completes the operation */
EVE_Cmd_waitFlush(phost);

EVE_sleep(1000);

EVE_CoCmd_dlStart(phost);
EVE_Cmd_wr32(phost, CLEAR_COLOR_RGB(64, 64, 64));
EVE_Cmd_wr32(phost, CLEAR(1, 1, 1));
EVE_Cmd_wr32(phost, COLOR_RGB(0xff, 0xff, 0xff));
EVE_CoCmd_text(phost, (int16_t)(DispWidth / 2), 20, 27, OPT_CENTER, "Spinner two dots");
EVE_CoCmd_text(phost, (int16_t)(DispWidth / 2), 80, 27, OPT_CENTER, "Please Wait ...");
EVE_Cmd_wr32(phost, COLOR_RGB(0x80, 0x00, 0x00));
EVE_CoCmd_spinner(phost, (int16_t)(DispWidth / 2), (int16_t)((DispHeight / 2) + 20), 3, 1);//style 3 scale 0

/* Wait till coprocessor completes the operation */
EVE_Cmd_waitFlush(phost);

EVE_sleep(1000);

/* Send the stop command */
EVE_Cmd_wr32(phost, CMD_STOP);
/* Update the command buffer pointers - both read and write pointers */
EVE_Cmd_waitFlush(phost);

EVE_sleep(1000);
}
--- End code ---

As such I believe you are correct and the swap is issued implicitly when calling CMD_SPINNER on EVE 4, I will verify this with the development team.

Best Regards,
BRT Community.

Navigation

[0] Message Index

[#] Next page

Go to full version