CoProc Lib API
danger
this is a legacy library and thus not supported by Toradex anymore. We recommend that you use the new libraries for all Toradex modules. Please see the Toradex CE Libraries and Code Samples for up-to-date information.
Library to provide access to the ARM Coprocessor registers. More...
Macros
##define CPL_VER_MAJ 2 CoprocLib Major Library Version. More...
#define CPL_VER_MIN 2 CoprocLib Minor Library Version. More...
#define CPL_VER_BUILD 0 CoprocLib Library Build Version. More...
#define PXA 1 #define TEG 2 #define TYPE_PXA270 0x11 #define TYPE_MONAHANS 0x02 #define TYPE_PXA320 0x02 #define TYPE_PXA300XT 0x07 #define TYPE_PXA300 0x08 #define TYPE_PXA310 0x09 #define TYPE_TEGRA2 0x411FC09 #define TYPE_TEGRA3 0x412FC09 #define MODULE_FAMILY_COLIBRI 0 #define MODULE_FAMILY_APALIS 1
Functions | |
DWORD | getCLKCFG () |
void | setCLKCFG (DWORD val) |
DWORD | getPWRMODE () |
void | setPWRMODE (DWORD val) |
DWORD | getCPUID () |
DWORD | getPROCID () |
DWORD | getL2Enabled () |
void | CPLGetLibVersion (DWORD *pVerMaj, DWORD *pVerMin, DWORD *pBuild) |
DWORD | GetSoCType () |
DWORD | getModuleFamily () |
Detailed Description
Library to provide access to the ARM Coprocessor registers.
- Copyright
- Copyright (c) 2013 Toradex AG
- Author:
- kia
- Rev:
- 2101
- Date:
- 2014-03-10 14:27:38 +0100 (Mo, 10 Mrz 2014)
- Target Platforms:
- Colibri PXAxxx, T20, T30 & Apalis T30
Macro Definition Documentation
#define CPL_VER_BUILD 0 |
CoprocLib Library Build Version.
#define CPL_VER_MAJ 2 |
CoprocLib Major Library Version.
#define CPL_VER_MIN 2 |
CoprocLib Minor Library Version.
#define MODULE_FAMILY_APALIS 1 |
#define MODULE_FAMILY_COLIBRI 0 |
#define PXA 1 |
#define TEG 2 |
#define TYPE_MONAHANS 0x02 |
#define TYPE_PXA270 0x11 |
#define TYPE_PXA300 0x08 |
#define TYPE_PXA300XT 0x07 |
#define TYPE_PXA310 0x09 |
#define TYPE_PXA320 0x02 |
#define TYPE_TEGRA2 0x411FC09 |
#define TYPE_TEGRA3 0x412FC09 |
Function Documentation
void CPLGetLibVersion | ( | DWORD * | pVerMaj, |
DWORD * | pVerMin, | ||
DWORD * | pBuild | ||
) |
Get the revision of this CoprocLib
- Parameters
[out] major library version. Set this parameter to NULL if not required. [out] minor library version. Set this parameter to NULL if not required. [out] library build number. Set this parameter to NULL if not required.
DWORD getCLKCFG | ( | ) |
Get Core Clock Configuration (Coprocessor 14, cr6) [for PXA only]
On other CPUs the function also returns cp14.cr6, but this register has a different meaning.
See ARM documentation for details.
On other CPUs the function also returns cp14.cr6, but this register has a different meaning.
See ARM documentation for details.
- Returns
- CLKCFG. (content of cp14.cr6)
DWORD getCPUID | ( | ) |
Request extended CPUID (Coprocessor 15, register c0)
- Returns
- value read from coprocessor 15 register c0.
Refer to the ARM documentation for details.
DWORD getL2Enabled | ( | ) |
Request whether L2 cache is enabled or disabled
- Return values
true,: L2 cache is enabled false,: L2 cache is disabled
DWORD getModuleFamily | ( | ) |
Request module family type (Colibri / Apalis)
- Returns
- CPU_TYPE: MODULE_FAMILY_COLIBRI or MODULE_FAMILY_APALIS
See defines at the beginning of coproclib.h for details.
DWORD getPROCID | ( | ) |
Detect the CPU type this code is running on
- Returns
- CPU ID. See defines at the beginning of coproclib.h for details.
DWORD getPWRMODE | ( | ) |
Get PWRMODE (Coprocessor 14, cr7) [for PXA only]
On other CPUs the function also returns cp14.cr7, but this register has a different meaning.
See ARM documentation for details.
On other CPUs the function also returns cp14.cr7, but this register has a different meaning.
See ARM documentation for details.
- Returns
- PWRMODE. (content of cp14.cr7)
DWORD GetSoCType | ( | ) |
Request SoC family type (PXA / Tegra)
- Returns
- CPU_TYPE: SOC family i.e PXA or Tegra
See defines at the beginning of coproclib.h for details.
void setCLKCFG | ( | DWORD | val | ) |
Set Core Clock Configuration (Coprocessor 14, cr6) [for PXA only]
On other CPUs the function also sets cp14.cr6, but this register has a different meaning.
See ARM documentation for details.
On other CPUs the function also sets cp14.cr6, but this register has a different meaning.
See ARM documentation for details.
- Parameters
[in] CLKCFG. Value to store into cp14.cr6
void setPWRMODE | ( | DWORD | val | ) |
Set PWRMODE (Coprocessor 14, cr7) [for PXA only]
On other CPUs the function also sets cp14.cr7, but this register has a different meaning.
See ARM documentation for details.
On other CPUs the function also sets cp14.cr7, but this register has a different meaning.
See ARM documentation for details.
- Parameters
[in] PWRMODE. Value to store into cp14.cr7