Comments (4)
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.
Thank you, that clarifies it.
from rp-hal.
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.
Please open a new issue rather than commenting on an already closed one.
from rp-hal.
Related Issues (20)
- GPIO pins should have inherent infallible methods HOT 1
- Clock errors cannot be printed with deft
- I2C on GPIO24/25 not working HOT 13
- Update terminology for I2C (and possibly other peripherals)
- Input Enable now turned off on ADC capable GPIOs (Errata RP2040-E6) HOT 2
- Missing impls for Pin<_, DynFunction, _> HOT 12
- Should there be a default impl for hal::serial::blocking::Write? HOT 3
- Support use of slice for Program code HOT 1
- Note on how to acquire Pin's number as an integer HOT 1
- ERROR probe_rs::cmd::run: Failed to attach to RTT continuing... HOT 5
- Crates.io version HOT 2
- ADC read blocks HOT 3
- embedded_io::serial::Reader implementations drop data on error
- rp2040_hal::halt() makes rp2040 un-debuggable even though comment in function says debugging will stay possible
- Does rp2040_hal::spi::Spi implement the embedded-hal 1.0 SpiDevice trait? HOT 3
- Cycling a buffer with DMA HOT 5
- Support for #[thread_local]? HOT 3
- Multicore Lockout HOT 11
- Readme seems to use wrong cargo run command HOT 1
- I2C example produces weird non-working results HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rp-hal.