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

小bug,中断中提早拉高sc脚导致丢失数据 #82

Open
diqiu114 opened this issue Feb 7, 2023 · 1 comment
Open

小bug,中断中提早拉高sc脚导致丢失数据 #82

diqiu114 opened this issue Feb 7, 2023 · 1 comment

Comments

@diqiu114
Copy link

diqiu114 commented Feb 7, 2023

源码中的写法为

image

实测时序为,其中sc过早拉高

image

查手册指示,需要等待 BSY = 0;

image

修改后写法

    else
    {
        while(SPI_I2S_GetFlagStatus(SPI1, SPI_I2S_FLAG_BUSY)==SET); // 等待spi传输完成
        digitalWrite_HIGH(CONFIG_SCREEN_CS_PIN);
        if(Disp_Callback)
        {
            Disp_Callback();
        }

修改后实测时序:

image

@AlexZhang087
Copy link

显示SPI_I2S_GetFlagStatus未定义

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

No branches or pull requests

2 participants