---
name: "altera_sdcard"
section: "4freebsd"
platform: "linux"
package: "freebsd-manpages"
version: "12.2-2"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/altera_sdcard"
---

# altera\_sdcard(4freebsd)

driver for the Altera University Program Secure Data Card IP Core

## NAME

**altera\_sdcard** – driver for the Altera University Program Secure Data Card IP Core

## SYNOPSIS

**device altera\_sdcard**

In */boot/device.hints*: **hint.altera\_sdcardc.0.at="nexus0"** **hint.altera\_sdcardc.0.maddr=0x7f008000** **hint.altera\_sdcardc.0.msize=0x400**

## DESCRIPTION

The **altera\_sdcard** device driver provides support for the Altera University Program Secure Data Card (SD Card) IP Core device. A controller device, altera\_sdcardcX, will be attached during boot. Inserted disks are presented as [disk(9)](/disk/9.md) devices, altera\_sdcardX, corresponding to the controller number.

## HARDWARE

The current version of the **altera\_sdcard** driver supports the SD Card IP core as described in the August 2011 version of Altera's documentation. The core supports only cards up to 2G (CSD 0); larger cards, or cards using newer CSD versions, will not be detected. The IP core has two key limitations: a lack of interrupt support, requiring timer-driven polling to detect I/O completion, and support for only single 512-byte block read and write operations at a time. The combined effect of those two limits is that the system clock rate, HZ, must be set to at least 200 in order to accomplish the maximum 100KB/s data rate supported by the IP core.

## SEE ALSO

[disk(9)](/disk/9.md) *Altera University Program Secure Data Card IP Core*, Altera Corporation - University Program, August 2011, ftp://ftp.altera.com/up/pub/Altera\_Material/11.0/University\_Program\_IP\_Cores/Memory/SD\_Card\_Interface\_for\_SoPC\_Builder.pdf.

## HISTORY

The **altera\_sdcard** device driver first appeared in FreeBSD 10.0.

## AUTHORS

The **altera\_sdcard** device driver and this manual page were developed by SRI International and the University of Cambridge Computer Laboratory under DARPA/AFRL contract (FA8750-10-C-0237) (“CTSRD”), as part of the DARPA CRASH research programme. This device driver was written by Robert N. M. Watson.

## BUGS

**altera\_sdcard** contains a number of work-arounds for IP core bugs. Perhaps most critically, **altera\_sdcard** ignores the CRC error bit returned in the RR1 register, which appears to be unexpectedly set by the IP core.

**altera\_sdcard** uses fixed polling intervals are used for card insertion/removal and I/O completion detection; an adaptive strategy might improve performance by reducing the latency to detecting completed I/O. However, in our experiments, using polling rates greater than 200 times a second did not improve performance.

**altera\_sdcard** supports only a nexus bus attachment, which is appropriate for system-on-chip busses such as Altera's Avalon bus. If the IP core is configured off of another bus type, then additional bus attachments will be required.
