Expand description
§SAM3
This is a hardware abstraction layer (HAL) over each of the following families of Microchip MCUs (configurations listed in parenthesis):
- ATSAM3A, ATSAM3X (ATSAM3A4C, ATSAM3A8C, ATSAM3X4C, ATSAM3X4E, ATSAM3X8C, ATSAM3X8E, ATSAM3X8H)
- ATSAM3N (ATSAM3N00A, ATSAM3N00B, ATSAM3N0A, ATSAM3N0B, ATSAM3N0C, ATSAM3N1A, ATSAM3N1B, ATSAM3N1C, ATSAM3N2A, ATSAM3N2B, ATSAM3N2C, ATSAM3N4A, ATSAM3N4B, ATSAM3N4C)
- ATSAM3S1, ATSAM3S2, ATSAM3S4 (ATSAM3S1A, ATSAM3S1B, ATSAM3S1C, ATSAM3S2A, ATSAM3S2B, ATSAM3S2C, ATSAM3S4A, ATSAM3S4B, ATSAM3S4C)
- ATSAM3S8, ATSAM3SD8 (ATSAM3S8B, ATSAM3S8C, ATSAM3SD8B, ATSAM3SD8C)
- ATSAM3U (ATSAM3U1C, ATSAM3U1E, ATSAM3U2C, ATSAM3U2E, ATSAM3U4C, ATSAM3U4E)
This project relies on some outside information under a different license (Apache), retrieved
from the Atmel/Microchip pack repository. The SVD files for each of the families
listed above are depended on for generating the PAC (peripheral access control) crates, and the
linker scripts are used to create the memory.x
and device.x
files that the
cortex-m-rt
depends on to compile device binaries.
Additionally, documentation for each peripheral, register, and on-chip function has been copied over (excluding diagrams) from the device manuals. Extra sections with per-family or per-chip information have been added as necessary. However, should you prefer to read the manuals rather than the transcriptions here, you can find them here:
- ATSAM3A, ATSAM3X: manual
- ATSAM3N: manual
- ATSAM3S1, ATSAM3S2, ATSAM3S4: manual
- ATSAM3S8, ATSAM3SD8: manual
- ATSAM3U: manual
There are errata for each one towards the end of the manuals.
§Important notes!
§Doc feature flags
The docs were generated with the feature flags sam3x8e-rt
and unproven
. However, parts of
the HAL are conditionally compiled and can change depending on your chip version, e.g.
#[cfg(not(feature = "schmitt"))]
/// Disable PIO control of the output.
pub struct OutputDisabled;
#[cfg(feature = "schmitt")]
/// Disable PIO control of the output.
pub struct OutputDisabled<Schm: SchmittTriggerCfg> {
_schm: PhantomData<Schm>,
}
It’s highly recommended that you build docs locally for your chip if you’re not using a SAM3A, SAM3U, or SAM3X chip.
§Feature flags
The only feature flags that crate users should specify are:
- A device feature (such as
sam3a4c
) - A device feature with runtime (such as
sam3a4c-rt
) - The
unproven
flag
All the other features are marker features used as shorthands throughout the rest of the crate
so it wouldn’t be necessary to have large, hard to document #[cfg()]
blocks in far too many
places. You may attempt to enable other features if you wish, however, no guarantees are made
about whether this crate will compile, much less function correctly.
Re-exports§
pub use atsam3x8e as pac;
Modules§
- dacc
- Functional description of the DACC
- peripheral_
id - pio
- Pin and configuration definitions and peripheral mappings
- structure
- write_
protect
Enums§
- Current
Bias - Bias current control settings for DACCs and ADCs.