Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

perf(Boards, MiscDrivers): Reduce refresh time and add font color selection on TFT Display drivers for MAX32690 #1107

Closed

Conversation

crsz20
Copy link
Contributor

@crsz20 crsz20 commented Aug 7, 2024

Description

Slight modifications to the TFT LCD display drivers on the MAX32690 EV Kit V1 board.

  • Removed delays in TFT_SPI_Write() to reduce the screen refresh time from 0.87129 seconds to 0.120858 seconds -- an 86% improvement.
  • MXC_TFT_PrintFont() would use the initially set background color around the printed text. Added a function to offer color selection of both the background and the font text.

Checklist Before Requesting Review

  • PR Title follows correct guidelines.
  • Description of changes and all other relevant information.
  • (Optional) Link any related GitHub issues using a keyword
  • (Optional) Provide info on any relevant functional testing/validation. For API changes or significant features, this is not optional.

@crsz20 crsz20 added the MAX32690 Related to the MAX32690 (ME18) label Aug 7, 2024
@crsz20
Copy link
Contributor Author

crsz20 commented Aug 8, 2024

/clang-format-run

@crsz20 crsz20 requested a review from EricB-ADI August 8, 2024 19:47
@@ -214,15 +213,10 @@ void TFT_SPI_Write(uint8_t *datain, uint32_t count, bool data)
tx_byte = tx_byte << 1;
}

for (int k = 0; k < 2; k++) {}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we're bit-banging these drivers the delays are to ensure we're compliant with the timing requirements of the ST7735.

image

By removing them we're now completely reliant on the overhead associated with the memory operations to ensure we're not violating the timings. This will vary based on the frequency of the master clock.

Running off the highest frequency IPO (120Mhz) it's possible to violate the minimum TSYCW and TSYCR by a narrow margin.

I agree with removing the 10uS CS settling delays, but I think these for loops should be kept. What is the refresh rate with them back in?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would be shocked if that for loop was not being optimized away.

@@ -216,12 +216,25 @@ void MXC_TFT_ResetCursor(void);
*
* @param x0 x location on screen
* @param y0 y location on screen
* @param fon_id Font number
* @param id Font number ID
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be @param font_id, or rename the variable in the function declaration to id.

@EricB-ADI
Copy link
Contributor

Closing this as we no longer have access to the fork. Same changes in #1110

@EricB-ADI EricB-ADI closed this Aug 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
MAX32690 Related to the MAX32690 (ME18)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants