During the pressure test of drawing 10 images in 100ms, there was a phenomenon of image displacement along the y-axis
I have seen a large number of calls like this
/**
* @brief Write command to ST7789 controller
* @param cmd -> command to write
* @return none
*/
static void ST7789_WriteCommand(uint8_t cmd)
{
ST7789_Select();
ST7789_DC_Clr();
HAL_SPI_Transmit(&ST7789_SPI_PORT, &cmd, sizeof(cmd), HAL_MAX_DELAY);
ST7789_UnSelect();
}
Nested select calls may lead to data confusion,For a single operation, such as drawing text or images, we should select at the beginning of the call and unselect after completion.
We should refactor the code to remove select/select from all internal operations, wrap internal operations in exposed interfaces, and remove nested calls.
After stress testing, the issue of occasional deviation in the y-axis of the image drawing has been resolved.
During the pressure test of drawing 10 images in 100ms, there was a phenomenon of image displacement along the y-axis
I have seen a large number of calls like this
Nested select calls may lead to data confusion,For a single operation, such as drawing text or images, we should select at the beginning of the call and unselect after completion.
We should refactor the code to remove select/select from all internal operations, wrap internal operations in exposed interfaces, and remove nested calls.
After stress testing, the issue of occasional deviation in the y-axis of the image drawing has been resolved.