Giter Club home page Giter Club logo

Comments (6)

FASTSHIFT avatar FASTSHIFT commented on May 17, 2024

检查是否为PB8/PB9添加了上拉电阻(3.3K~10K),或者发生了短路。
在主频较高时,不建议打开WIRE_USE_FULL_SPEED_I2C,器件不一定能追上。I2C必须使用OUTPUT_OPEN_DRAIN开漏输出,不要使用推挽输出。

from x-track.

sidianneng avatar sidianneng commented on May 17, 2024

检查是否为PB8/PB9添加了上拉电阻(3.3K~10K),或者发生了短路。 在主频较高时,不建议打开WIRE_USE_FULL_SPEED_I2C,器件不一定能追上。I2C必须使用OUTPUT_OPEN_DRAIN开漏输出,不要使用推挽输出。

我有为这两个引脚添加4.7k的上拉电阻,另外可以确认两个引脚没有短路。

from x-track.

FASTSHIFT avatar FASTSHIFT commented on May 17, 2024

使用以下代码检查是否可以正常翻转IO(两边是一个相反的方波)

pinMode(PB8, OUTPUT_OPEN_DRAIN);
pinMode(PB9, OUTPUT_OPEN_DRAIN);

digitalWirte(PB8, LOW);
digitalWirte(PB9, HIGH);

while(1)
{
    togglePin(PB8);
    togglePin(PB9);
    delay(100);
}

from x-track.

FASTSHIFT avatar FASTSHIFT commented on May 17, 2024

我这边测试的更换PB8/PB9通信是正常的,请继续排查硬件问题。

from x-track.

sidianneng avatar sidianneng commented on May 17, 2024

使用以下代码检查是否可以正常翻转IO(两边是一个相反的方波)

pinMode(PB8, OUTPUT_OPEN_DRAIN);
pinMode(PB9, OUTPUT_OPEN_DRAIN);

digitalWirte(PB8, LOW);
digitalWirte(PB9, HIGH);

while(1)
{
    togglePin(PB8);
    togglePin(PB9);
    delay(100);
}

我有用c代码测试过这个反向的方波,看波形是正常的。仔细回忆了下,我在单步调试的时候发现一个异常点,当io口电平被置高时,io口的电压好像是1.8v,好像应该是3.3v才对

from x-track.

sidianneng avatar sidianneng commented on May 17, 2024

我这边测试的更换PB8/PB9通信是正常的,请继续排查硬件问题。

非常感谢你帮忙实际测试,我仔细检查后大致确认是硬件问题,后面做好新板子了再进一步测试。

from x-track.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.