Code Monkey home page Code Monkey logo

Comments (4)

9names avatar 9names commented on July 17, 2024

What does the frequency parameter mean

In any processor, different parts of the circuit take in a clock from one of a number of sources and divide it up to get the frequency they need to operate correctly.
The clock they take this from will usually be part of a clock tree

In the case of a UART peripheral, the input clock is some multiple of the target baud rate to allow for oversampling the signal and other processing. On the Pico in particular it needs to be at least 16x the frequency of the baud rate you're targeting - which probably explains why you're getting gibberish on the Rpi3 when you aren't setting it high enough.
You want it to either be a multiple of the target baud or significantly greater, otherwise the actual baud rate will be too far from the desired rate to work correctly.
The pico datasheet describes this in more detail.
If you look at figure 59 on page 437 of the datasheet, you'll see the source clock signal listed as as UARTCLK.
The requirements for the UART peripheral clock input are described in much greater detail on page 439, section 4.2.3.2. UART operation.

What pins are used for the peripherals

Rp2040 has a pin mux (multiplexer) that allows pins to connect to different peripherals.
Permitted mappings are also listed in the datasheet on page 13: 1.4.3 GPIO Functions

from rp-hal.

Pjottos avatar Pjottos commented on July 17, 2024

Thank you, that clarifies it.

from rp-hal.

Szpadel avatar Szpadel commented on July 17, 2024

Can you share working example? I have issues where UartPeripheral::enable hangs board and I have no idea what I'm doing wrong

from rp-hal.

9names avatar 9names commented on July 17, 2024

Please open a new issue rather than commenting on an already closed one.

from rp-hal.

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.