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

SPI writepattern does not finish the last 8 bytes #8635

Closed
6 tasks done
davidgevorgian opened this issue Jul 13, 2022 · 0 comments · Fixed by #8636
Closed
6 tasks done

SPI writepattern does not finish the last 8 bytes #8635

davidgevorgian opened this issue Jul 13, 2022 · 0 comments · Fixed by #8636

Comments

@davidgevorgian
Copy link

davidgevorgian commented Jul 13, 2022

Basic Infos

  • This issue complies with the issue POLICY doc.
  • I have read the documentation at readthedocs and the issue is not addressed there.
  • I have tested that the issue is present in current master branch (aka latest git).
  • I have searched the issue tracker for a similar issue.
  • If there is a stack dump, I have decoded it.
  • I have filled out all fields below.

Platform

  • Hardware: [ESP8266]
  • Core Version: [3.0.2]
  • Development Env: [Arduino IDE]
  • Operating System: [Windows]

Settings in IDE

  • Module: [Generic ESP8266]
  • Flash Mode: []
  • Flash Size: [4MB]
  • lwip Variant: [v2 Lower Memory]
  • Reset Method: [nodemcu]
  • Flash Frequency: [40Mhz]
  • CPU Frequency: [80Mhz]
  • Upload Using: [SERIAL]
  • Upload Speed: [115200] (serial upload only)

Problem Description

In SPI library [SPIClass::writePattern] does not draw the last 8 bytes if repeatRem == 0 in line [518 setDataBits(repeatRem * 8);]. I found this problem on the LCD screen GC9A01. The solution is to add a null check for [repeatRem]:

if (repeatRem)
{
setDataBits(repeatRem * 8);
SPI1CMD |= SPIBUSY;
while(SPI1CMD & SPIBUSY) {}
}

I hope this is a simple patch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant