Difference between revisions of "Unit BCM2710"

From Ultibo.org
Jump to: navigation, search
Line 2,359: Line 2,359:
 
<br />
 
<br />
  
'''BCM2710 Clock functions'''
+
'''BCM2710 system clock functions'''
  
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
<pre style="border: 0; padding-bottom:0px;">function BCM2710ClockRead(Clock:PClockDevice):LongWord;</pre>
+
<pre style="border: 0; padding-bottom:0px;">function BCM2710SystemClockRead(Clock:PClockDevice):LongWord;</pre>
 
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
 
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
Line 2,374: Line 2,374:
 
<br />
 
<br />
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
<pre style="border: 0; padding-bottom:0px;">function BCM2710ClockRead64(Clock:PClockDevice):Int64;</pre>
+
<pre style="border: 0; padding-bottom:0px;">function BCM2710SystemClockRead64(Clock:PClockDevice):Int64;</pre>
 
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
 
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
Line 2,386: Line 2,386:
 
<br />
 
<br />
  
'''BCM2710 ARM Timer functions'''
+
'''BCM2710 ARM clock functions'''
 +
 
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function BCM2710ARMClockStart(Clock:PClockDevice):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Note'''
 +
| None documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function BCM2710ARMClockStop(Clock:PClockDevice):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Note'''
 +
| None documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function BCM2710ARMClockRead(Clock:PClockDevice):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Note'''
 +
| None documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function BCM2710ARMClockRead64(Clock:PClockDevice):Int64;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Note'''
 +
| None documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function BCM2710ARMClockSetRate(Clock:PClockDevice; Rate:LongWord):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Note'''
 +
| None documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
 
 +
'''BCM2710 ARM timer functions'''
  
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">

Revision as of 04:52, 26 May 2017

Return to Unit Reference


Description


Ultibo BCM2710 interface unit

This unit provides the BCM2710 specific implementations of the following devices:

  • SPI0
  • I2C0
  • I2C1
  • SPI1
  • SPI2
  • I2C Slave
  • SPI Slave
  • DMA
  • PWM0
  • PWM1
  • PCM
  • GPIO
  • UART0
  • UART1
  • SDHCI (eMMC)
  • Clock
  • ARM Timer
  • Local Timer
  • Random
  • Mailbox
  • Watchdog
  • Framebuffer
  • MIPI CSI-2 (Camera Serial Interface)
  • DSI (Display Serial Interface)

BCM2710 SPI0 Device

The BCM2710 has a single master mode SPI controller that supports 3 wire, 2 wire and LoSSI modes of operation. It also has 2 auxiliary SPI masters which do not support DMA mode (see SPI1/2 below).

The main SPI0 controller supports polled, interrupt and DMA modes and includes 3 chip selects although only CS0 and 1 are available on the 26 or 40 pin header.

By default SPI0 can appear on GPIO pins 7 to 11 (CS1, CS0, MISO, MOSI, SCLK) using alternate function 0 or on GPIO pins 35 to 39 (CS1, CS0, MISO, MOSI, SCLK) using alternate function 0, only pins 7 to 11 are available on the header.

BCM2710 I2C0/1 Device

The BCM2710 has 3 Broadcom Serial Controller (BSC) devices which are fast mode (400Kz) masters numbered BSC0, BSC1 and BSC2.

Device BSC2 is dedicated to the HDMI interface and is not availale for use by the ARM processor. All BSC devices contain a 16 byte FIFO, support 7 bit and 10 bit addressing and have software configurable clock timing.

By default BSC0 can appear on GPIO pins 0 and 1 (Alternate function 0), 28 and 29 (Alternate function 0) or 44 and 45 (Alternate function 1). Unfortunately on all except the Revision 1 models none of these pins are available on the 26 or 40 pin header.

Note: On the Raspberry Pi A+/B+/Zero/2B/3B the ID EEPROM pins on the 40 pin header are actually connected to GPIO 0 and 1 (BSC0)

Device BSC1 can appear on GPIO pins 2 and 3 (Alternate function 0) or 44 and 45 (Alternate function 2) but only pins 2 and 3 are exposed on the 26 or 40 pin header.

BCM2710 SPI1/2 Device

The BCM2710 has 2 additional SPI universal masters available as part of the AUX device which support interrupt mode but not DMA and therefore only allow limited bandwidth transfers due to the CPU overhead required to sustain high data rates.

Both devices support 3 chip selects, by default SPI1 is available on GPIO pins 16 to 21 (CS2, CS1, CS0, MISO, MOSI, SCLK) using alternate function 4 and SPI2 is available on GPIO pins 40 to 45 (MISO, MOSI, SCLK, CS0, CS1, CS2) using alternate function 4. Only pins 16 to 21 are available on the header and only on the 40 pin header of the Raspberry Pi A+/B+/Zero/2B/3B.

BCM2710 DMA Device

The DMA controller has 16 channels in total although not all are available for software to use as some are already used by the GPU.

The firmware will pass the value dma.dmachans on the command line which will indicate which channels are available for our use.

Channels 0 to 6 are normal channels which support 2D stride and transfers up to 1GB per control block

Channels 7 to 14 are Lite channels which do not support stride and only allow transfers up to 64KB per control block

Channel 15 is not mentioned in most documentation and is shown as not available in the mask passed in dma.dmachans

Channel 0 and 15 are Bulk channels which have an additional FIFO for faster transfers (8 beat burst per read)

BCM2710 PWM0/1 Device

The BCM2710 has a single PWM controller with 2 independent output bit streams with multiple algorithms for generating the output pulse. The PWM controller supports either a single data register (independent per channel) or a 16 x 32 FIFO which also supports DMA mode transmission.

On the Raspberry Pi PWM0 and PWM1 are also connected via GPIO pins 40 and 45 (40 and 41 on the Raspberry Pi 3B) to the audio circuit and allow playback of digital audio signals via the 3 or 4 pole line jack (depending on model).

PWM0 is available on GPIO pins 12 (function 0), 18 (function 5), 40 (function 0) and 52 (function 1).

PWM1 is available on GPIO pins 13 (function 0), 19 (function 5), 41, 45 (function 0) and 53 (function 1).

On the Raspberry Pi A and B only pin 18 is exposed on the 26 pin header.

On the Raspberry Pi A+/B+/Zero/2B/3B pins 12, 18 and 19 are exposed on the 40 pin header.

BCM2710 GPIO Device

The GPIO has 54 pins available each with multiple alternate functions. All pins can be configured as input or output and all can have pull up or down applied.

Not all pins are exposed on the 26 or 40 pin header of the Raspberry Pi, for details of which pins are available see:

Raspberry Pi A and B - https://www.raspberrypi.org/documentation/usage/gpio/README.md

Raspberry Pi A+/B+/2B/3B/Zero - https://www.raspberrypi.org/documentation/usage/gpio-plus-and-raspi2/README.md

Some of the 54 pins are used for peripheral communication (such as the SD card) and are not available for general use, take care when changing function selects on pins to avoid disabling certain system peripherals.

Event detection can be enabled for both high and low levels as well as rising and falling edges, there is also an asynchronous rising or falling edge detection which can detect edges of very short duration.

BCM2710 UART0 Device

The UART0 device is an ARM PL011 UART which supports programmable baud rates, start, stop and parity bits and hardware flow control and many others. The UART0 is similar to the industry standard 16C650 but with a number of differences, the PL011 has a some optional features such as IrDA, Serial InfraRed and DMA which are not supported by the Broadcom implementation. In the standard configuration the UART0 TX and RX lines are connected to GPIO pins 14 and 15 respectively (Alternate function 0) but they can be remapped via GPIO function selects to a number of other locations. On the Raspberry Pi (all models) none of these alternate pin mappings are exposed via the 26 or 40 pin header and therefore cannot be used easily. This means that UART0 and UART1 cannot be used at the same time.

On the Raspberry Pi 3B the UART0 can be mapped to GPIO pins 32 and 33 (Alternate function 3) to communicate with the built in Bluetooth module.

BCM2710 UART1 Device

The UART1 device is a Broadcom implementation that is part of the AUX device which also includes the SPI1 and SPI2 devices. This device is termed a Mini UART and has a smaller feature set than the PL011 UART but still supports a fairly standard communication protocol with programmable baud rate and hardware flow control.

The Mini UART is similar to the standard 16550 device but is missing some of the features, the device also has no DMA support so high speed transfers will produce a higher CPU load. In the standard configuration the UART1 TX and RX lines are connected to GPIO pins 14 and 15 respectively (Alternate function 5) but they can be remapped via GPIO function selects to a number of other locations. On the Raspberry Pi (all models) none of these alternate pin mappings are exposed via the 26 or 40 pin header and therefore cannot be used easily. This means that UART0 and UART1 cannot be used at the same time.

On the Raspberry Pi 3B the UART1 can be mapped to GPIO pins 32 and 33 (Alternate function 5) to communicate with the built in Bluetooth module.

BCM2710 SDHCI Device

The SDHCI controller on the BCM2710 is an Arasan SD Host controller.

The Card Detect pin is not connected.

The Write Protect pin is not connected.

BCM2710 Clock Device

The clock device in the BCM2710 is based on the System Timer which is a 64 bit free running counter that runs at 1MHz regardless of core or CPU clock speeds.

The System Timer includes 4 compare registers which can each generate an interrupt when the compare value is matched, however 2 of the 4 are consumed by the GPU and on the Raspberry Pi A/B/A+/B+/Zero the other 2 are used for the scheduler and clock interrupts in Ultibo.

This device simply exposes the free running counter as a clock value and does not provide access to the timer compare functionality or to interrupt based events, for those see the timer devices below.

BCM2710 ARM Timer Device

The ARM Timer device in the BCM2710 is based on the ARM SP804 timer with some modifications and additions. In the Raspberry Pi it is connected to the core clock which by default is 250MHz but was increased to 400MHz on the Raspberry Pi 3B.

The divider is 10 bits wide which means that the ARM Timer can be set to clock rates of between 250KHz and 250MHz (or 400KHz to 400MHz on the Raspberry Pi 3B). Both the counter and the load/reload value are 32 bits wide by default giving a wide range of tick intervals.

The ARM Timer features a free running counter which is not enabled or used by this driver and a down counter which operates in wrapping mode so that each time it reaches 0 it triggers an interrupt and reloads the value from a load or reload register to begin counting again.

Constants



BCM2710 SPI0 BCM2710_SPI0_*
BCM2710_SPI0_DESCRIPTION = 'BCM2837 SPI0 Master';  
 
BCM2710_SPI0_MAX_SIZE = $FFFF;  
 
BCM2710_SPI0_MIN_CLOCK = 3814; Default minimum based on the default settings from the firmware (Recalculated during open)
BCM2710_SPI0_MAX_CLOCK = 125000000; Default maximum based on the default settings from the firmware (Recalculated during open)
 
BCM2710_SPI0_MIN_DIVIDER = 2; Divider is always rounded down to an even number and a value of 0 sets the divider to 65536
BCM2710_SPI0_MAX_DIVIDER = $FFFE; Divider is always rounded down to an even number
 
BCM2710_SPI0_CORE_CLOCK = 250000000; Default core clock based on the default settings from the firmware (Requested from firmware during start)
 
BCM2710_SPI0_MODE_IRQ = 0;  
BCM2710_SPI0_MODE_DMA = 1;  


BCM2710 BSCI2C (BSC0/1/2) BCM2710_BSCI2C_*
BCM2710_BSCI2C_MAX_SIZE = $FFFF;  
 
BCM2710_BSCI2C_MIN_CLOCK = 3814; Default minimum based on the default settings from the firmware (Recalculated during open)
BCM2710_BSCI2C_MAX_CLOCK = 125000000; Default maximum based on the default settings from the firmware (Recalculated during open)
BCM2710_BSCI2C_DEFAULT_CLOCK = 100000;  
 
BCM2710_BSCI2C_MIN_DIVIDER = 2; Divider is always rounded down to an even number and a value of 0 sets the divider to 32768
BCM2710_BSCI2C_MAX_DIVIDER = $FFFE; Divider is always rounded down to an even number
 
BCM2710_BSCI2C_CORE_CLOCK = 250000000; Default core clock based on the default settings from the firmware (Requested from firmware during start)
 
BCM2710_BSCI2C_MODE_WRITE = 0;  
BCM2710_BSCI2C_MODE_READ = 1;  


BCM2710 I2C0 (BSC0) BCM2710_I2C0_*
BCM2710_I2C0_DESCRIPTION = 'BCM2837 BSC0 Master I2C';  


BCM2710 I2C1 (BSC1) BCM2710_I2C1_*
BCM2710_I2C1_DESCRIPTION = 'BCM2837 BSC1 Master I2C';  


BCM2710 SPI1 BCM2710_SPI1_*
BCM2710_SPI1_DESCRIPTION = 'BCM2837 AUX SPI1 Master';  


BCM2710 SPI2 BCM2710_SPI2_*
BCM2710_SPI2_DESCRIPTION = 'BCM2837 AUX SPI2 Master';  


BCM2710 I2C slave BCM2710_I2CSLAVE_*
BCM2710_I2CSLAVE_DESCRIPTION = 'BCM2837 I2C Slave';  


BCM2710 SPI slave BCM2710_SPISLAVE_*
BCM2710_SPISLAVE_DESCRIPTION = 'BCM2837 SPI Slave';  


BCM2710 DMA BCM2710_DMA_*
BCM2710_DMA_DESCRIPTION = 'BCM2837 DMA';  
 
BCM2710_DMA_CHANNEL_COUNT = 16; Total number of DMA channels (Not all are usable)
 
BCM2710_DMA_LITE_CHANNELS = $7F80; Mask of DMA Lite channels (7 to 14)
BCM2710_DMA_NORMAL_CHANNELS = $007E; (807F) Mask of normal channels (1 to 6)
BCM2710_DMA_BULK_CHANNELS = $8001; Mask of DMA Bulk channels (0 and 15)
 
BCM2710_DMA_SHARED_CHANNELS = $7800; Mask of channels with shared interrupt (11 to 14)
 
BCM2710_DMA_MAX_LITE_TRANSFER = 65536; Maximum transfer length for a DMA Lite channel
BCM2710_DMA_MAX_NORMAL_TRANSFER = 1073741824; Maximum transfer length for a normal channel
 
BCM2710_DMA_MAX_STRIDE = $FFFF; Maximum stride value (Increment between rows) (Note this is a signed value (Min -32768/Max 32767)
BCM2710_DMA_MAX_Y_COUNT = $3FFF; Maximum number of X length transfers in 2D stride
BCM2710_DMA_MAX_X_LENGTH = $FFFF; Maximum X transfer length in 2D stride
 
BCM2710_DMA_CB_ALIGNMENT = 32; Alignment required for DMA control blocks
 
BCM2710_DMA_LITE_BURST_LENGTH = 1; Burst length for DMA Lite channels
BCM2710_DMA_NORMAL_BURST_LENGTH = 2; Burst length for normal channels
BCM2710_DMA_BULK_BURST_LENGTH = 8; Burst length for DMA Bulk channels


BCM2710 PWM BCM2710_PWM_*
BCM2710_PWM_MIN_PERIOD = 108; Default based on 19.2MHz PWM clock (Oscillator source)
BCM2710_PWM_DEFAULT_CLOCK = 19200000; Default to the 19.2MHz oscillator clock


BCM2710 PWM0 BCM2710_PWM0_*
BCM2710_PWM0_DESCRIPTION = 'BCM2837 PWM0';  


BCM2710 PWM1 BCM2710_PWM1_*
BCM2710_PWM1_DESCRIPTION = 'BCM2837 PWM1';  


BCM2710 GPIO BCM2710_GPIO_*
BCM2710_GPIO_DESCRIPTION = 'BCM2837 GPIO';  
 
BCM2710_GPIO_MIN_PIN = GPIO_PIN_0;  
BCM2710_GPIO_MAX_PIN = GPIO_PIN_53;  
 
BCM2710_GPIO_MAX_LEVEL = GPIO_LEVEL_HIGH;  
 
BCM2710_GPIO_MAX_PULL = GPIO_PULL_DOWN;  
 
BCM2710_GPIO_MIN_FUNCTION = GPIO_FUNCTION_IN;  
BCM2710_GPIO_MAX_FUNCTION = GPIO_FUNCTION_ALT5;  
 
BCM2710_GPIO_MIN_TRIGGER = GPIO_TRIGGER_LOW;  
BCM2710_GPIO_MAX_TRIGGER = GPIO_TRIGGER_ASYNC_FALLING;  
 
GPIO pull up/down to BCM2837 pull up/down
BCM2710_GPIO_PULL_MAP:array[GPIO_PULL_NONE..GPIO_PULL_DOWN] of LongWord = (
BCM2837_GPPUD_NONE,  
BCM2837_GPPUD_UP,  
BCM2837_GPPUD_DOWN);  
 
GPIO functions to BCM2837 functions
BCM2710_GPIO_FUNCTION_MAP:array[BCM2710_GPIO_MIN_FUNCTION..BCM2710_GPIO_MAX_FUNCTION] of LongWord = (
BCM2837_GPFSEL_IN,  
BCM2837_GPFSEL_OUT,  
BCM2837_GPFSEL_ALT0,  
BCM2837_GPFSEL_ALT1,  
BCM2837_GPFSEL_ALT2,  
BCM2837_GPFSEL_ALT3,  
BCM2837_GPFSEL_ALT4,  
BCM2837_GPFSEL_ALT5);  
 
BCM2837 functions to GPIO functions
BCM2710_GPIO_FUNCTION_UNMAP:array[BCM2710_GPIO_MIN_FUNCTION..BCM2710_GPIO_MAX_FUNCTION] of LongWord = (
GPIO_FUNCTION_IN,  
GPIO_FUNCTION_OUT,  
GPIO_FUNCTION_ALT5,  
GPIO_FUNCTION_ALT4,  
GPIO_FUNCTION_ALT0,  
GPIO_FUNCTION_ALT1,  
GPIO_FUNCTION_ALT2,  
GPIO_FUNCTION_ALT3);  
 
GPIO triggers to BCM2837 event registers
BCM2710_GPIO_TRIGGER_MAP:array[BCM2710_GPIO_MIN_TRIGGER..BCM2710_GPIO_MAX_TRIGGER] of LongWord = (
BCM2837_GPLEN0,  
BCM2837_GPHEN0,  
BCM2837_GPREN0,  
BCM2837_GPFEN0,  
BCM2837_GPAREN0,  
BCM2837_GPAFEN0);  


BCM2710 UART0 (PL011) BCM2710_UART0_*
BCM2710_UART0_DESCRIPTION = 'BCM2837 PL011 UART';  
 
BCM2710_UART0_MIN_BAUD = 300; Default minimum of 300 baud
BCM2710_UART0_MAX_BAUD = 187500; Default maximum based on the default settings from the firmware (Recalculated during open)
 
BCM2710_UART0_MIN_DATABITS = SERIAL_DATA_5BIT;  
BCM2710_UART0_MAX_DATABITS = SERIAL_DATA_8BIT;  
 
BCM2710_UART0_MIN_STOPBITS = SERIAL_STOP_1BIT;  
BCM2710_UART0_MAX_STOPBITS = SERIAL_STOP_2BIT;  
 
BCM2710_UART0_MAX_PARITY = SERIAL_PARITY_EVEN;  
 
BCM2710_UART0_MAX_FLOW = SERIAL_FLOW_RTS_CTS;  
 
BCM2710_UART0_CLOCK_RATE = 3000000; Default clock rate based on the default settings from the firmware (Requested from firmware during open)


BCM2710 UART1 (AUX) BCM2710_UART1_*
BCM2710_UART1_DESCRIPTION = 'BCM2837 AUX (Mini) UART';  


BCM2710 SDHCI BCM2710_EMMC_*
BCM2710_EMMC_DESCRIPTION = 'BCM2837 Arasan SD Host';  
 
BCM2710_EMMC_MIN_FREQ = 400000; Default minimum of 400KHz
BCM2710_EMMC_MAX_FREQ = 250000000;  


BCM2710 clock (system timer) BCM2710_SYS_CLOCK_*
BCM2710_SYS_CLOCK_DESCRIPTION = 'BCM2837 System Timer Clock';  


BCM2710 clock (ARM timer) BCM2710_ARM_CLOCK_*
BCM2710_ARM_CLOCK_DESCRIPTION = 'BCM2837 ARM Timer Clock';  
 
BCM2710_ARM_CLOCK_MIN_RATE = 976562; Default minimum (Divider 255) based on the default settings from the firmware (Recalculated during start)
BCM2710_ARM_CLOCK_MAX_RATE = 250000000; Default maximum (Divider 0) based on the default settings from the firmware (Recalculated during start)
BCM2710_ARM_CLOCK_DEFAULT_RATE = 3968253; Default rate (Divider 62) based on the default settings from the firmware (Recalculated during start)
 
BCM2710_ARM_CLOCK_MIN_DIVIDER = 0;  
BCM2710_ARM_CLOCK_MAX_DIVIDER = 255;  
BCM2710_ARM_CLOCK_DEFAULT_DIVIDER = 62;  
 
BCM2710_ARM_CLOCK_CORE_CLOCK = 250000000; Default core clock based on the default settings from the firmware (Requested from firmware during start)


BCM2710 clock (local timer) BCM2710_LOCAL_CLOCK_*
BCM2710_LOCAL_CLOCK_DESCRIPTION = 'BCM2837 Local Timer Clock';  


BCM2710 ARM timer BCM2710_ARM_TIMER_*
BCM2710_ARM_TIMER_DESCRIPTION = 'BCM2837 ARM Timer';  
 
BCM2710_ARM_TIMER_MIN_RATE = 244140; Default minimum (Divider 1023) based on the default settings from the firmware (Recalculated during start)
BCM2710_ARM_TIMER_MAX_RATE = 250000000; Default maximum (Divider 0) based on the default settings from the firmware (Recalculated during start)
BCM2710_ARM_TIMER_DEFAULT_RATE = 1000000; Default rate (Divider 249) based on the default settings from the firmware (Recalculated during start)
 
BCM2710_ARM_TIMER_MIN_INTERVAL = 1;  
BCM2710_ARM_TIMER_MAX_INTERVAL = $FFFFFFFF;  
 
BCM2710_ARM_TIMER_MIN_DIVIDER = 0;  
BCM2710_ARM_TIMER_MAX_DIVIDER = 1023;  
BCM2710_ARM_TIMER_DEFAULT_DIVIDER = 249;  
 
BCM2710_ARM_TIMER_CORE_CLOCK = 250000000; Default core clock based on the default settings from the firmware (Requested from firmware during start)


BCM2710 local timer BCM2710_LOCAL_TIMER_*
BCM2710_LOCAL_TIMER_DESCRIPTION = 'BCM2837 Local Timer';  


BCM2710 random BCM2710_RANDOM_*
BCM2710_RANDOM_WARMUP_COUNT = $00040000; The initial numbers generated are "less random" so will be discarded


Type definitions



BCM2710 SPI0

PBCM2710SPI0Device = ^TBCM2710SPI0Device;

TBCM2710SPI0Device = record

SPI Properties
SPI:TSPIDevice;  
BCM2710 Properties
Address:Pointer; Device register base address
CoreClock:LongWord; Core clock rate
Transfer Properties
Mode:LongWord; Mode of current transfer (BCM2710_SPI0_MODE_IRQ/BCM2710_SPI0_MODE_DMA)
Source:Pointer; Pointer to the source for current transfer (nil if reading only)
Dest:Pointer; Pointer to the destination for current transfer (nil if writing only)
Count:LongWord; Count of bytes for current transfer
SourceRemain:LongWord; Source bytes remaining for current transfer
DestRemain:LongWord; Destination bytes remaining for current transfer
Statistics Properties
InterruptCount:LongWord; Number of interrupt requests received by the device

BCM2710 BSCI2C (I2C0/1)

PBCM2710BSCI2CDevice = ^TBCM2710BSCI2CDevice;

TBCM2710BSCI2CDevice = record

I2C Properties
I2C:TI2CDevice;  
BCM2710 Properties
Address:Pointer; Device register base address
CoreClock:LongWord; Core clock rate
SDAPin:LongWord; GPIO pin for the SDA line
SCLPin:LongWord; GPIO pin for the SCL line
SDAFunction:LongWord; GPIO function for the SDA line
SCLFunction:LongWord; GPIO function for the SCL line
Transfer Properties
Index:LongWord; Index of this device in the IRQData array (Set during device initialization)
Mode:LongWord; Mode of current transfer (BCM2710_BSCI2C_MODE_WRITE/BCM2710_BSCI2C_MODE_READ)
Data:Pointer; Pointer to the data for current transfer
Count:LongWord; Count of bytes for current transfer
Remain:LongWord; Bytes remaining for current transfer
Statistics Properties
InterruptCount:LongWord; Number of interrupt requests received by the device

BCM2710 BSCI2C (I2C0/1) IRQ data

PBCM2710BSCI2CIRQData = ^TBCM2710BSCI2CIRQData;

TBCM2710BSCI2CIRQData = record

Note: BSC I2C devices share a single interrupt
Count:LongWord;  
Lock:TSpinHandle;  
Devices:array[0..2] of PBCM2710BSCI2CDevice;  

BCM2710 SPI AUX (SPI1/2)

PBCM2710SPIAUXDevice = ^TBCM2710SPIAUXDevice;

TBCM2710SPIAUXDevice = record

SPI Properties
SPI:TSPIDevice;  
BCM2710 Properties
Address:Pointer; Device register base address
CoreClock:LongWord; Core clock rate

BCM2710 DMA channel

PBCM2710DMAChannel = ^TBCM2710DMAChannel;

TBCM2710DMAChannel = record

Host:PBCM2710DMAHost; DMA host this channel belongs to
Request:PDMARequest; Current DMA request pending on this channel (or nil of no request is pending)
Number:LongWord; The channel number of this channel
Interrupt:LongWord; The interrupt number of this channel
Registers:PBCM2837DMARegisters; The channel registers for configuration

BCM2710 DMA

PBCM2710DMAHost = ^TBCM2710DMAHost;

TBCM2710DMAHost = record

DMA Properties
DMA:TDMAHost;  
BCM2710 Properties
ChannelMask:LongWord; Mask of available channels (Passed from GPU firmware)
ChannelFree:LongWord; Bitmap of current free channels
ChannelLock:TMutexHandle; Lock for access to ChannelFree
ChannelWait:TSemaphoreHandle; Number of free normal channels in ChannelFree
ChannelLite:TSemaphoreHandle; Number of free DMA Lite channels in ChannelFree
ChannelBulk:TSemaphoreHandle; Number of free DMA Bulk channels in ChannelFree
Channels:array[0..BCM2710_DMA_CHANNEL_COUNT - 1] of TBCM2710DMAChannel; Channel information for each DMA channel on the host
EnableRegister:PLongWord;  
InterruptRegister:PLongWord;  
Statistics Properties
InterruptCount:LongWord; Number of interrupt requests received by the host controller

BCM2710 PWM device

PBCM2710PWMDevice = ^TBCM2710PWMDevice;

TBCM2710PWMDevice = record

PWM Properties
PWM:TPWMDevice;  
BCM2710 Properties
Address:Pointer; Device register base address
Channel:LongWord; Channel for this device
Scaler:LongWord; Scaler for Duty cycle and Period
Pair:PBCM2710PWMDevice; The paired PWM device for the other channel
Audio Properties
Audio:PBCM2710PWMAudio; The associated PWM Audio device

BCM2710 PWM audio

PBCM2710PWMAudio = ^TBCM2710PWMAudio;

TBCM2710PWMAudio = record

Audio Properties
Audio:TAudioDevice;  
PWM Properties
PWM0:PBCM2710PWMDevice; The PWM device for channel 0
PWM1:PBCM2710PWMDevice; The PWM device for channel 1

BCM2710 GPIO

PBCM2710GPIOBank = ^TBCM2710GPIOBank;

TBCM2710GPIOBank = record

GPIO:PGPIODevice;  
Bank:LongWord;  
Address:PtrUInt;  
PinStart:LongWord;  

BCM2710 GPIO device

PBCM2710GPIODevice = ^TBCM2710GPIODevice;

TBCM2710GPIODevice = record

GPIO Properties
GPIO:TGPIODevice;  
BCM2710 Properties
Lock:TSpinHandle; Device lock (Differs from lock in Device portion) (Spin lock due to use by interrupt handler)
Banks:array[0..BCM2837_GPIO_BANK_COUNT - 1] of TBCM2710GPIOBank;  
Statistics Properties
InterruptCount:LongWord; Number of interrupt requests received by the device

BCM2710 UART0

PBCM2710UART0Device = ^TBCM2710UART0Device;

TBCM2710UART0Device = record

UART Properties
UART:TUARTDevice;  
BCM2710 Properties
Address:Pointer; Device register base address
ClockRate:LongWord; Device clock rate
Statistics Properties
InterruptCount:LongWord; Number of interrupt requests received by the device

BCM2710 SDHCI

PBCM2710SDHCIHost = ^TBCM2710SDHCIHost;

TBCM2710SDHCIHost = record

SDHCI Properties
SDHCI:TSDHCIHost;  
BCM2710 Properties
WriteDelay:LongWord;  
LastWrite:LongWord;  
ShadowRegister:LongWord;  

BCM2710 system clock

PBCM2710SystemClock = ^TBCM2710SystemClock;

TBCM2710SystemClock = record

Clock Properties
Clock:TClockDevice;  

BCM2710 ARM clock

PBCM2710ARMClock = ^TBCM2710ARMClock;

TBCM2710ARMClock = record

Clock Properties
Clock:TClockDevice;  
BCM2710 Properties
CoreClock:LongWord; Core clock rate

BCM2710 ARM timer

PBCM2710ARMTimer = ^TBCM2710ARMTimer;

TBCM2710ARMTimer = record

Timer Properties
Timer:TTimerDevice;  
BCM2710 Properties
CoreClock:LongWord; Core clock rate
Statistics Properties
InterruptCount:LongWord; Number of interrupt requests received by the device

BCM2710 local timer

PBCM2710LocalTimer = ^TBCM2710LocalTimer;

TBCM2710LocalTimer = record

Timer Properties
Timer:TTimerDevice;  
BCM2710 Properties
CoreClock:LongWord; Core clock rate
Statistics Properties
InterruptCount:LongWord; Number of interrupt requests received by the device

BCM2710 random

PBCM2710Random = ^TBCM2710Random;

TBCM2710Random = record

Random Properties
Random:TRandomDevice;  

BCM2710 mailbox

PBCM2710Mailbox = ^TBCM2710Mailbox;

TBCM2710Mailbox = record

Mailbox Properties
Mailbox:TMailboxDevice;  

BCM2710 watchdog

PBCM2710Watchdog = ^TBCM2710Watchdog;

TBCM2710Watchdog = record

Watchdog Properties
Watchdog:TWatchdogDevice;  

BCM2710 framebuffer

PBCM2710Framebuffer = ^TBCM2710Framebuffer;

TBCM2710Framebuffer = record

Framebuffer Properties
Framebuffer:TFramebufferDevice;  


Public variables


None defined

Function declarations



Initialization functions

procedure BCM2710Init;
Description: To be documented
Note None documented


BCM2710 SPI0 functions

function BCM2710SPI0Start(SPI:PSPIDevice; Mode,ClockRate,ClockPhase,ClockPolarity:LongWord):LongWord;
Description: To be documented
Note None documented


function BCM2710SPI0Stop(SPI:PSPIDevice):LongWord;
Description: To be documented
Note None documented


function BCM2710SPI0WriteRead(SPI:PSPIDevice; ChipSelect:Word; Source,Dest:Pointer; Size,Flags:LongWord; var Count:LongWord):LongWord;
Description: To be documented
Note None documented


function BCM2710SPI0SetMode(SPI:PSPIDevice; Mode:LongWord):LongWord;
Description: To be documented
Note None documented


function BCM2710SPI0SetClockRate(SPI:PSPIDevice; ChipSelect:Word; ClockRate:LongWord):LongWord;
Description: To be documented
Note None documented


function BCM2710SPI0SetClockPhase(SPI:PSPIDevice; ClockPhase:LongWord):LongWord;
Description: To be documented
Note None documented


function BCM2710SPI0SetClockPolarity(SPI:PSPIDevice; ClockPolarity:LongWord):LongWord;
Description: To be documented
Note None documented


function BCM2710SPI0SetSelectPolarity(SPI:PSPIDevice; ChipSelect:Word; SelectPolarity:LongWord):LongWord;
Description: To be documented
Note None documented


procedure BCM2710SPI0ReadFIFO(SPI:PBCM2710SPI0Device);
Description: Caller will hold the SPI device lock
Note Called from within the interrupt handler


procedure BCM2710SPI0WriteFIFO(SPI:PBCM2710SPI0Device);
Description: Caller will hold the SPI device lock
Note Called from within the interrupt handler


procedure BCM2710SPI0InterruptHandler(SPI:PBCM2710SPI0Device);
Description: To be documented
Note None documented


procedure BCM2710SPI0DMARequestCompleted(Request:PDMARequest);
Description: DMA Request completion callback for SPI0
Note None documented


BCM2710 BSCI2C (I2C0/1) functions

function BCM2710BSCI2CStart(I2C:PI2CDevice; Rate:LongWord):LongWord;
Description: To be documented
Note None documented


function BCM2710BSCI2CStop(I2C:PI2CDevice):LongWord;
Description: To be documented
Note None documented


function BCM2710BSCI2CRead(I2C:PI2CDevice; Address:Word; Buffer:Pointer; Size:LongWord; var Count:LongWord):LongWord;
Description: To be documented
Note None documented


function BCM2710BSCI2CWrite(I2C:PI2CDevice; Address:Word; Buffer:Pointer; Size:LongWord; var Count:LongWord):LongWord;
Description: To be documented
Note None documented


function BCM2710BSCI2CWriteRead(I2C:PI2CDevice; Address:Word; Initial:Pointer; Len:LongWord; Data:Pointer; Size:LongWord; var Count:LongWord):LongWord;
Description: To be documented
Note None documented


function BCM2710BSCI2CWriteWrite(I2C:PI2CDevice; Address:Word; Initial:Pointer; Len:LongWord; Data:Pointer; Size:LongWord; var Count:LongWord):LongWord;
Description: To be documented
Note None documented


function BCM2710BSCI2CSetRate(I2C:PI2CDevice; Rate:LongWord):LongWord;
Description: To be documented
Note None documented


function BCM2710BSCI2CSetAddress(I2C:PI2CDevice; Address:Word):LongWord;
Description: To be documented
Note None documented


procedure BCM2710BSCI2CFillFIFO(I2C:PBCM2710BSCI2CDevice);
Description: Caller will hold the I2C device lock
Note Called from within the interrupt handler


procedure BCM2710BSCI2CDrainFIFO(I2C:PBCM2710BSCI2CDevice);
Description: Caller will hold the I2C device lock
Note Called from within the interrupt handler


procedure BCM2710BSCI2CInterruptHandler(IRQData:PBCM2710BSCI2CIRQData);
Description: To be documented
Note Thread submitting the current request will hold the I2C device lock


BCM2710 DMA functions

function BCM2710DMAHostStart(DMA:PDMAHost):LongWord;
Description: To be documented
Note None documented


function BCM2710DMAHostStop(DMA:PDMAHost):LongWord;
Description: To be documented
Note None documented


function BCM2710DMAHostSubmit(DMA:PDMAHost;Request:PDMARequest):LongWord;
Description: To be documented
Note None documented


function BCM2710DMAHostCancel(DMA:PDMAHost;Request:PDMARequest):LongWord;
Description: To be documented
Note None documented


procedure BCM2710DMAInterruptHandler(Channel:PBCM2710DMAChannel);
Description: DMA Channels 0 to 10 each have a dedicated interrupt, this handler simply clears the interrupt and sends a completion on the associated channel
Note None documented


procedure BCM2710DMASharedInterruptHandler(DMA:PBCM2710DMAHost);
Description: DMA Channels 11 to 14 share a common interrupt, this alternate handler determines which ones triggered the current interrupt and sends a completion on that channel
Note None documented


procedure BCM2710DMARequestComplete(Channel:PBCM2710DMAChannel);
Description: To be documented
Note None documented


function BCM2710DMAPeripheralToDREQ(Peripheral:LongWord):LongWord;
Description: To be documented
Note None documented


procedure BCM2710DMADataToControlBlock(Request:PDMARequest; Data:PDMAData; Block:PBCM2837DMAControlBlock; Bulk,Lite:Boolean);
Description: To be documented
Note None documented


BCM2710 PWM0/1 functions

function BCM2710PWMStart(PWM:PPWMDevice):LongWord;
Description: To be documented
Note None documented


function BCM2710PWMStop(PWM:PPWMDevice):LongWord;
Description: To be documented
Note None documented


function BCM2710PWMWrite(PWM:PPWMDevice; Value:LongWord):LongWord;
Description: To be documented
Note None documented


function BCM2710PWMSetGPIO(PWM:PPWMDevice; GPIO:LongWord):LongWord;
Description: To be documented
Note None documented


function BCM2710PWMResetGPIO(PWM:PPWMDevice; GPIO:LongWord):LongWord;
Description: To be documented
Note None documented


function BCM2710PWMSetMode(PWM:PPWMDevice; Mode:LongWord):LongWord;
Description: To be documented
Note None documented


function BCM2710PWMSetRange(PWM:PPWMDevice; Range:LongWord):LongWord;
Description: To be documented
Note None documented


function BCM2710PWMSetFrequency(PWM:PPWMDevice;Frequency:LongWord):LongWord;
Description: To be documented
Note None documented


function BCM2710PWMSetPolarity(PWM:PPWMDevice; Polarity:LongWord):LongWord;
Description: To be documented
Note None documented


function BCM2710PWMConfigure(PWM:PPWMDevice; DutyNS,PeriodNS:LongWord):LongWord;
Description: To be documented
Note None documented


function BCM2710PWMClockStart(PWM:PPWMDevice; Frequency:LongWord):LongWord;
Description: To be documented
Note None documented


function BCM2710PWMClockStop(PWM:PPWMDevice):LongWord;
Description: To be documented
Note None documented


function BCM2710PWMClockEnabled(PWM:PPWMDevice):Boolean;
Description: To be documented
Note None documented


BCM2710 GPIO functions

function BCM2710GPIOStart(GPIO:PGPIODevice):LongWord;
Description: To be documented
Note None documented


function BCM2710GPIOStop(GPIO:PGPIODevice):LongWord;
Description: To be documented
Note None documented


function BCM2710GPIORead(GPIO:PGPIODevice; Reg:LongWord):LongWord;
Description: To be documented
Note None documented


procedure BCM2710GPIOWrite(GPIO:PGPIODevice; Reg,Value:LongWord);
Description: To be documented
Note None documented


function BCM2710GPIOInputGet(GPIO:PGPIODevice; Pin:LongWord):LongWord;
Description: To be documented
Note None documented


function BCM2710GPIOInputWait(GPIO:PGPIODevice; Pin,Trigger,Timeout:LongWord):LongWord;
Description: To be documented
Note None documented


function BCM2710GPIOInputEvent(GPIO:PGPIODevice; Pin,Trigger,Flags,Timeout:LongWord; Callback:TGPIOCallback; Data:Pointer):LongWord;
Description: To be documented
Note None documented


function BCM2710GPIOInputCancel(GPIO:PGPIODevice; Pin:LongWord):LongWord;
Description: To be documented
Note None documented


function BCM2710GPIOOutputSet(GPIO:PGPIODevice; Pin,Level:LongWord):LongWord;
Description: To be documented
Note None documented


function BCM2710GPIOPullSelect(GPIO:PGPIODevice; Pin,Mode:LongWord):LongWord;
Description: To be documented
Note None documented


function BCM2710GPIOFunctionGet(GPIO:PGPIODevice; Pin:LongWord):LongWord;
Description: To be documented
Note None documented


function BCM2710GPIOFunctionSelect(GPIO:PGPIODevice; Pin,Mode:LongWord):LongWord;
Description: To be documented
Note None documented


procedure BCM2710GPIOInterruptHandler(Bank:PBCM2710GPIOBank);
Description: To be documented
Note None documented


procedure BCM2710GPIOEventTrigger(Pin:PGPIOPin);
Description: To be documented
Note None documented


procedure BCM2710GPIOEventTimeout(Event:PGPIOEvent);
Description: To be documented
Note None documented


BCM2710 UART0 functions

function BCM2710UART0Open(UART:PUARTDevice; BaudRate,DataBits,StopBits,Parity,FlowControl:LongWord):LongWord;
Description: To be documented
Note None documented


function BCM2710UART0Close(UART:PUARTDevice):LongWord;
Description: To be documented
Note None documented


function BCM2710UART0Read(UART:PUARTDevice; Buffer:Pointer; Size,Flags:LongWord; var Count:LongWord):LongWord;
Description: To be documented
Note None documented


function BCM2710UART0Write(UART:PUARTDevice; Buffer:Pointer; Size,Flags:LongWord; var Count:LongWord):LongWord;
Description: To be documented
Note None documented


function BCM2710UART0Status(UART:PUARTDevice):LongWord;
Description: To be documented
Note None documented


procedure BCM2710UART0InterruptHandler(UART:PUARTDevice);
Description: Interrupt handler for the BCM2710 UART0 device
Note Not intended to be called directly by applications


procedure BCM2710UART0Receive(UART:PUARTDevice);
Description: Receive handler for the BCM2710 UART0 device
Note Not intended to be called directly by applications


procedure BCM2710UART0Transmit(UART:PUARTDevice);
Description: Transmit handler for the BCM2710 UART0 device
Note Not intended to be called directly by applications


procedure BCM2710UART0EnableInterrupt(UART:PBCM2710UART0Device; Interrupt:LongWord);
Description: Enable the specified interrupt in the interrupt mask register of a BCM2710 UART0 device
UART The BCM2710 UART0 device to enable the interrupt for
Interrupt The interrupt to enable
Note Caller must hold the UART lock


procedure BCM2710UART0DisableInterrupt(UART:PBCM2710UART0Device; Interrupt:LongWord);
Description: Disable the specified interrupt in the interrupt mask register of a BCM2710 UART0 device
UART The BCM2710 UART0 device to disable the interrupt for
Interrupt The interrupt to disable
Note Caller must hold the UART lock


BCM2710 SDHCI functions

function BCM2710SDHCIHostStart(SDHCI:PSDHCIHost):LongWord;
Description: To be documented
Note None documented


function BCM2710SDHCIHostStop(SDHCI:PSDHCIHost):LongWord;
Description: To be documented
Note None documented


function BCM2710SDHCIHostReadByte(SDHCI:PSDHCIHost; Reg:LongWord):Byte;
Description: To be documented
Note The Broadcom document BCM2835-ARM-Peripherals page 66 states the following: Contrary to Arasans documentation the EMMC module registers can only be accessed as 32 bit registers, i.e. the two LSBs of the address are always zero. For this reason this code must simulate Byte and Word reads using LongWord reads.


function BCM2710SDHCIHostReadWord(SDHCI:PSDHCIHost; Reg:LongWord):Word;
Description: To be documented
Note The Broadcom document BCM2835-ARM-Peripherals page 66 states the following: Contrary to Arasans documentation the EMMC module registers can only be accessed as 32 bit registers, i.e. the two LSBs of the address are always zero. For this reason this code must simulate Byte and Word reads using LongWord reads.


function BCM2710SDHCIHostReadLong(SDHCI:PSDHCIHost; Reg:LongWord):LongWord;
Description: To be documented
Note None documented


procedure BCM2710SDHCIHostWriteByte(SDHCI:PSDHCIHost; Reg:LongWord; Value:Byte);
Description: To be documented
Note The Broadcom document BCM2835-ARM-Peripherals page 66 states the following: Contrary to Arasans documentation the EMMC module registers can only be accessed as 32 bit registers, i.e. the two LSBs of the address are always zero. For this reason this code must simulate Byte and Word writes using LongWord writes.


procedure BCM2710SDHCIHostWriteWord(SDHCI:PSDHCIHost; Reg:LongWord; Value:Word);
Description: To be documented
Note The Broadcom document BCM2835-ARM-Peripherals page 66 states the following: Contrary to Arasans documentation the EMMC module registers can only be accessed as 32 bit registers, i.e. the two LSBs of the address are always zero. For this reason this code must simulate Byte and Word writes using LongWord writes.


procedure BCM2710SDHCIHostWriteLong(SDHCI:PSDHCIHost; Reg:LongWord; Value:LongWord);
Description: To be documented
Note The source code of U-Boot and Linux kernel drivers have this comment The Arasan has a bugette whereby it may lose the content of successive writes to registers that are within two SD-card clock cycles of each other (a clock domain crossing problem). It seems, however, that the data register does not have this problem (which is just as well - otherwise we'd have to nobble the DMA engine too). For this reason this code must delay after each write to the registers.


procedure BCM2710SDHCIInterruptHandler(SDHCI:PSDHCIHost);
Description: To be documented
Note None documented


function BCM2710SDHCISetupInterrupts(SDHCI:PSDHCIHost):LongWord;
Description: To be documented
Note None documented


function BCM2710MMCDeviceGetCardDetect(MMC:PMMCDevice):LongWord;
Description: Implementation of MMC GetCardDetect for the BCM2710 which does not update the bits in the SDHCI_PRESENT_STATE register to reflect card insertion or removal
Note None documented


BCM2710 system clock functions

function BCM2710SystemClockRead(Clock:PClockDevice):LongWord;
Description: To be documented
Note None documented


function BCM2710SystemClockRead64(Clock:PClockDevice):Int64;
Description: To be documented
Note None documented


BCM2710 ARM clock functions

function BCM2710ARMClockStart(Clock:PClockDevice):LongWord;
Description: To be documented
Note None documented


function BCM2710ARMClockStop(Clock:PClockDevice):LongWord;
Description: To be documented
Note None documented


function BCM2710ARMClockRead(Clock:PClockDevice):LongWord;
Description: To be documented
Note None documented


function BCM2710ARMClockRead64(Clock:PClockDevice):Int64;
Description: To be documented
Note None documented


function BCM2710ARMClockSetRate(Clock:PClockDevice; Rate:LongWord):LongWord;
Description: To be documented
Note None documented


BCM2710 ARM timer functions

function BCM2710ARMTimerStart(Timer:PTimerDevice):LongWord;
Description: Implementation of TimerDeviceStart API for ARM Timer
Note Not intended to be called directly by applications, use TimerDeviceStart instead


function BCM2710ARMTimerStop(Timer:PTimerDevice):LongWord;
Description: Implementation of TimerDeviceStop API for ARM Timer
Note Not intended to be called directly by applications, use TimerDeviceStop instead


function BCM2710ARMTimerRead64(Timer:PTimerDevice):Int64;
Description: Implementation of TimerDeviceRead64 API for ARM Timer
Note Not intended to be called directly by applications, use TimerDeviceRead64 instead


function BCM2710ARMTimerWait(Timer:PTimerDevice):LongWord;
Description: Implementation of TimerDeviceWait API for ARM Timer
Note Not intended to be called directly by applications, use TimerDeviceWait instead


function BCM2710ARMTimerEvent(Timer:PTimerDevice; Flags:LongWord; Callback:TTimerCallback; Data:Pointer):LongWord;
Description: Implementation of TimerDeviceEvent API for ARM Timer
Note Not intended to be called directly by applications, use TimerDeviceEvent instead


function BCM2710ARMTimerCancel(Timer:PTimerDevice):LongWord;
Description: Implementation of TimerDeviceCancel API for ARM Timer
Note Not intended to be called directly by applications, use TimerDeviceCancel instead


function BCM2710ARMTimerSetRate(Timer:PTimerDevice; Rate:LongWord):LongWord;
Description: Implementation of TimerDeviceSetRate API for ARM Timer
Note Not intended to be called directly by applications, use TimerDeviceSetRate instead


function BCM2710ARMTimerSetInterval(Timer:PTimerDevice; Interval:LongWord):LongWord;
Description: Implementation of TimerDeviceSetInterval API for ARM Timer
Note Not intended to be called directly by applications, use TimerDeviceSetInterval instead


procedure BCM2710ARMTimerInterruptHandler(Timer:PTimerDevice);
Description: Interrupt handler for ARM Timer
Note Not intended to be called directly by applications


procedure BCM2710ARMTimerEventTrigger(Timer:PTimerDevice);
Description: Event handler for ARM Timer
Note Not intended to be called directly by applications


BCM2710 random functions

function BCM2710RandomStart(Random:PRandomDevice):LongWord;
Description: To be documented
Note None documented


function BCM2710RandomStop(Random:PRandomDevice):LongWord;
Description: To be documented
Note None documented


function BCM2710RandomReadLongWord(Random:PRandomDevice):LongWord;
Description: To be documented
Note None documented


BCM2710 watchdog functions

function BCM2710WatchdogStart(Watchdog:PWatchdogDevice):LongWord;
Description: To be documented
Note None documented


function BCM2710WatchdogStop(Watchdog:PWatchdogDevice):LongWord;
Description: To be documented
Note None documented


function BCM2710WatchdogRefresh(Watchdog:PWatchdogDevice):LongWord;
Description: To be documented
Note None documented


function BCM2710WatchdogGetRemain(Watchdog:PWatchdogDevice):LongWord;
Description: To be documented
Note None documented


BCM2710 framebuffer functions

function BCM2710FramebufferAllocate(Framebuffer:PFramebufferDevice; Properties:PFramebufferProperties):LongWord;
Description: Implementation of FramebufferDeviceAllocate API for BCM2710 Framebuffer
Note Not intended to be called directly by applications, use FramebufferDeviceAllocate instead.


function BCM2710FramebufferRelease(Framebuffer:PFramebufferDevice):LongWord;
Description: Implementation of FramebufferDeviceRelease API for BCM2710 Framebuffer
Note Not intended to be called directly by applications, use FramebufferDeviceRelease instead.


function BCM2710FramebufferBlank(Framebuffer:PFramebufferDevice; Blank:Boolean):LongWord;
Description: Implementation of FramebufferDeviceBlank API for BCM2710 Framebuffer
Note Not intended to be called directly by applications, use FramebufferDeviceBlank instead.


function BCM2710FramebufferCommit(Framebuffer:PFramebufferDevice; Address,Size,Flags:LongWord):LongWord;
Description: Implementation of FramebufferDeviceCommit API for BCM2710 Framebuffer
Note Not intended to be called directly by applications, use FramebufferDeviceCommit instead.


function BCM2710FramebufferWaitSync(Framebuffer:PFramebufferDevice):LongWord;
Description: Implementation of FramebufferDeviceWaitSync API for BCM2710 Framebuffer
Note Not intended to be called directly by applications, use FramebufferDeviceWaitSync instead.


function BCM2710FramebufferSetOffset(Framebuffer:PFramebufferDevice; X,Y:LongWord; Pan:Boolean):LongWord;
Description: Implementation of FramebufferDeviceSetOfset API for BCM2710 Framebuffer
Note Not intended to be called directly by applications, use FramebufferDeviceSetOffset instead.


function BCM2710FramebufferGetPalette(Framebuffer:PFramebufferDevice; Palette:PFramebufferPalette):LongWord;
Description: Implementation of FramebufferDeviceGetPalette API for BCM2710 Framebuffer
Note Not intended to be called directly by applications, use FramebufferDeviceGetPalette instead.


function BCM2710FramebufferSetPalette(Framebuffer:PFramebufferDevice; Palette:PFramebufferPalette):LongWord;
Description: Implementation of FramebufferDeviceSetPalette API for BCM2710 Framebuffer
Note Not intended to be called directly by applications, use FramebufferDeviceSetPalette instead.


function BCM2710FramebufferSetBacklight(Framebuffer:PFramebufferDevice; Brightness:LongWord):LongWord;
Description: Implementation of FramebufferDeviceSetBacklight API for BCM2710 Framebuffer
Note Not intended to be called directly by applications, use FramebufferDeviceSetBacklight instead.


function BCM2710FramebufferSetProperties(Framebuffer:PFramebufferDevice; Properties:PFramebufferProperties):LongWord;
Description: Implementation of FramebufferDeviceSetProperties API for BCM2710 Framebuffer
Note Not intended to be called directly by applications, use FramebufferDeviceSetProperties instead.


Return to Unit Reference