mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-08-20 10:08:33 -04:00
Prepare for V9.0.0 release:
+ Change version number from V9.0.0rc2 to V9.0.0.
This commit is contained in:
parent
e23eca901d
commit
2bd7884ace
1501 changed files with 4370 additions and 22029 deletions
|
@ -1,784 +0,0 @@
|
|||
/**************************************************************************//**
|
||||
* @file core_cm3.c
|
||||
* @brief CMSIS Cortex-M3 Core Peripheral Access Layer Source File
|
||||
* @version V1.30
|
||||
* @date 30. October 2009
|
||||
*
|
||||
* @note
|
||||
* Copyright (C) 2009 ARM Limited. All rights reserved.
|
||||
*
|
||||
* @par
|
||||
* ARM Limited (ARM) is supplying this software for use with Cortex-M
|
||||
* processor based microcontrollers. This file can be freely distributed
|
||||
* within development tools that are supporting such ARM based processors.
|
||||
*
|
||||
* @par
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS". NO WARRANTIES, WHETHER EXPRESS, IMPLIED
|
||||
* OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE.
|
||||
* ARM SHALL NOT, IN ANY CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR
|
||||
* CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER.
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
/* define compiler specific symbols */
|
||||
#if defined ( __CC_ARM )
|
||||
#define __ASM __asm /*!< asm keyword for ARM Compiler */
|
||||
#define __INLINE __inline /*!< inline keyword for ARM Compiler */
|
||||
|
||||
#elif defined ( __ICCARM__ )
|
||||
#define __ASM __asm /*!< asm keyword for IAR Compiler */
|
||||
#define __INLINE inline /*!< inline keyword for IAR Compiler. Only avaiable in High optimization mode! */
|
||||
|
||||
#elif defined ( __GNUC__ )
|
||||
#define __ASM __asm /*!< asm keyword for GNU Compiler */
|
||||
#define __INLINE inline /*!< inline keyword for GNU Compiler */
|
||||
|
||||
#elif defined ( __TASKING__ )
|
||||
#define __ASM __asm /*!< asm keyword for TASKING Compiler */
|
||||
#define __INLINE inline /*!< inline keyword for TASKING Compiler */
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
/* ################### Compiler specific Intrinsics ########################### */
|
||||
|
||||
#if defined ( __CC_ARM ) /*------------------RealView Compiler -----------------*/
|
||||
/* ARM armcc specific functions */
|
||||
|
||||
/**
|
||||
* @brief Return the Process Stack Pointer
|
||||
*
|
||||
* @return ProcessStackPointer
|
||||
*
|
||||
* Return the actual process stack pointer
|
||||
*/
|
||||
__ASM uint32_t __get_PSP(void)
|
||||
{
|
||||
mrs r0, psp
|
||||
bx lr
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Set the Process Stack Pointer
|
||||
*
|
||||
* @param topOfProcStack Process Stack Pointer
|
||||
*
|
||||
* Assign the value ProcessStackPointer to the MSP
|
||||
* (process stack pointer) Cortex processor register
|
||||
*/
|
||||
__ASM void __set_PSP(uint32_t topOfProcStack)
|
||||
{
|
||||
msr psp, r0
|
||||
bx lr
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Return the Main Stack Pointer
|
||||
*
|
||||
* @return Main Stack Pointer
|
||||
*
|
||||
* Return the current value of the MSP (main stack pointer)
|
||||
* Cortex processor register
|
||||
*/
|
||||
__ASM uint32_t __get_MSP(void)
|
||||
{
|
||||
mrs r0, msp
|
||||
bx lr
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Set the Main Stack Pointer
|
||||
*
|
||||
* @param topOfMainStack Main Stack Pointer
|
||||
*
|
||||
* Assign the value mainStackPointer to the MSP
|
||||
* (main stack pointer) Cortex processor register
|
||||
*/
|
||||
__ASM void __set_MSP(uint32_t mainStackPointer)
|
||||
{
|
||||
msr msp, r0
|
||||
bx lr
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Reverse byte order in unsigned short value
|
||||
*
|
||||
* @param value value to reverse
|
||||
* @return reversed value
|
||||
*
|
||||
* Reverse byte order in unsigned short value
|
||||
*/
|
||||
__ASM uint32_t __REV16(uint16_t value)
|
||||
{
|
||||
rev16 r0, r0
|
||||
bx lr
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Reverse byte order in signed short value with sign extension to integer
|
||||
*
|
||||
* @param value value to reverse
|
||||
* @return reversed value
|
||||
*
|
||||
* Reverse byte order in signed short value with sign extension to integer
|
||||
*/
|
||||
__ASM int32_t __REVSH(int16_t value)
|
||||
{
|
||||
revsh r0, r0
|
||||
bx lr
|
||||
}
|
||||
|
||||
|
||||
#if (__ARMCC_VERSION < 400000)
|
||||
|
||||
/**
|
||||
* @brief Remove the exclusive lock created by ldrex
|
||||
*
|
||||
* Removes the exclusive lock which is created by ldrex.
|
||||
*/
|
||||
__ASM void __CLREX(void)
|
||||
{
|
||||
clrex
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Return the Base Priority value
|
||||
*
|
||||
* @return BasePriority
|
||||
*
|
||||
* Return the content of the base priority register
|
||||
*/
|
||||
__ASM uint32_t __get_BASEPRI(void)
|
||||
{
|
||||
mrs r0, basepri
|
||||
bx lr
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Set the Base Priority value
|
||||
*
|
||||
* @param basePri BasePriority
|
||||
*
|
||||
* Set the base priority register
|
||||
*/
|
||||
__ASM void __set_BASEPRI(uint32_t basePri)
|
||||
{
|
||||
msr basepri, r0
|
||||
bx lr
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Return the Priority Mask value
|
||||
*
|
||||
* @return PriMask
|
||||
*
|
||||
* Return state of the priority mask bit from the priority mask register
|
||||
*/
|
||||
__ASM uint32_t __get_PRIMASK(void)
|
||||
{
|
||||
mrs r0, primask
|
||||
bx lr
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Set the Priority Mask value
|
||||
*
|
||||
* @param priMask PriMask
|
||||
*
|
||||
* Set the priority mask bit in the priority mask register
|
||||
*/
|
||||
__ASM void __set_PRIMASK(uint32_t priMask)
|
||||
{
|
||||
msr primask, r0
|
||||
bx lr
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Return the Fault Mask value
|
||||
*
|
||||
* @return FaultMask
|
||||
*
|
||||
* Return the content of the fault mask register
|
||||
*/
|
||||
__ASM uint32_t __get_FAULTMASK(void)
|
||||
{
|
||||
mrs r0, faultmask
|
||||
bx lr
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Set the Fault Mask value
|
||||
*
|
||||
* @param faultMask faultMask value
|
||||
*
|
||||
* Set the fault mask register
|
||||
*/
|
||||
__ASM void __set_FAULTMASK(uint32_t faultMask)
|
||||
{
|
||||
msr faultmask, r0
|
||||
bx lr
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Return the Control Register value
|
||||
*
|
||||
* @return Control value
|
||||
*
|
||||
* Return the content of the control register
|
||||
*/
|
||||
__ASM uint32_t __get_CONTROL(void)
|
||||
{
|
||||
mrs r0, control
|
||||
bx lr
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Set the Control Register value
|
||||
*
|
||||
* @param control Control value
|
||||
*
|
||||
* Set the control register
|
||||
*/
|
||||
__ASM void __set_CONTROL(uint32_t control)
|
||||
{
|
||||
msr control, r0
|
||||
bx lr
|
||||
}
|
||||
|
||||
#endif /* __ARMCC_VERSION */
|
||||
|
||||
|
||||
|
||||
#elif (defined (__ICCARM__)) /*------------------ ICC Compiler -------------------*/
|
||||
/* IAR iccarm specific functions */
|
||||
#pragma diag_suppress=Pe940
|
||||
|
||||
/**
|
||||
* @brief Return the Process Stack Pointer
|
||||
*
|
||||
* @return ProcessStackPointer
|
||||
*
|
||||
* Return the actual process stack pointer
|
||||
*/
|
||||
uint32_t __get_PSP(void)
|
||||
{
|
||||
__ASM("mrs r0, psp");
|
||||
__ASM("bx lr");
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Set the Process Stack Pointer
|
||||
*
|
||||
* @param topOfProcStack Process Stack Pointer
|
||||
*
|
||||
* Assign the value ProcessStackPointer to the MSP
|
||||
* (process stack pointer) Cortex processor register
|
||||
*/
|
||||
void __set_PSP(uint32_t topOfProcStack)
|
||||
{
|
||||
__ASM("msr psp, r0");
|
||||
__ASM("bx lr");
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Return the Main Stack Pointer
|
||||
*
|
||||
* @return Main Stack Pointer
|
||||
*
|
||||
* Return the current value of the MSP (main stack pointer)
|
||||
* Cortex processor register
|
||||
*/
|
||||
uint32_t __get_MSP(void)
|
||||
{
|
||||
__ASM("mrs r0, msp");
|
||||
__ASM("bx lr");
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Set the Main Stack Pointer
|
||||
*
|
||||
* @param topOfMainStack Main Stack Pointer
|
||||
*
|
||||
* Assign the value mainStackPointer to the MSP
|
||||
* (main stack pointer) Cortex processor register
|
||||
*/
|
||||
void __set_MSP(uint32_t topOfMainStack)
|
||||
{
|
||||
__ASM("msr msp, r0");
|
||||
__ASM("bx lr");
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Reverse byte order in unsigned short value
|
||||
*
|
||||
* @param value value to reverse
|
||||
* @return reversed value
|
||||
*
|
||||
* Reverse byte order in unsigned short value
|
||||
*/
|
||||
uint32_t __REV16(uint16_t value)
|
||||
{
|
||||
__ASM("rev16 r0, r0");
|
||||
__ASM("bx lr");
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Reverse bit order of value
|
||||
*
|
||||
* @param value value to reverse
|
||||
* @return reversed value
|
||||
*
|
||||
* Reverse bit order of value
|
||||
*/
|
||||
uint32_t __RBIT(uint32_t value)
|
||||
{
|
||||
__ASM("rbit r0, r0");
|
||||
__ASM("bx lr");
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief LDR Exclusive (8 bit)
|
||||
*
|
||||
* @param *addr address pointer
|
||||
* @return value of (*address)
|
||||
*
|
||||
* Exclusive LDR command for 8 bit values)
|
||||
*/
|
||||
uint8_t __LDREXB(uint8_t *addr)
|
||||
{
|
||||
__ASM("ldrexb r0, [r0]");
|
||||
__ASM("bx lr");
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief LDR Exclusive (16 bit)
|
||||
*
|
||||
* @param *addr address pointer
|
||||
* @return value of (*address)
|
||||
*
|
||||
* Exclusive LDR command for 16 bit values
|
||||
*/
|
||||
uint16_t __LDREXH(uint16_t *addr)
|
||||
{
|
||||
__ASM("ldrexh r0, [r0]");
|
||||
__ASM("bx lr");
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief LDR Exclusive (32 bit)
|
||||
*
|
||||
* @param *addr address pointer
|
||||
* @return value of (*address)
|
||||
*
|
||||
* Exclusive LDR command for 32 bit values
|
||||
*/
|
||||
uint32_t __LDREXW(uint32_t *addr)
|
||||
{
|
||||
__ASM("ldrex r0, [r0]");
|
||||
__ASM("bx lr");
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief STR Exclusive (8 bit)
|
||||
*
|
||||
* @param value value to store
|
||||
* @param *addr address pointer
|
||||
* @return successful / failed
|
||||
*
|
||||
* Exclusive STR command for 8 bit values
|
||||
*/
|
||||
uint32_t __STREXB(uint8_t value, uint8_t *addr)
|
||||
{
|
||||
__ASM("strexb r0, r0, [r1]");
|
||||
__ASM("bx lr");
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief STR Exclusive (16 bit)
|
||||
*
|
||||
* @param value value to store
|
||||
* @param *addr address pointer
|
||||
* @return successful / failed
|
||||
*
|
||||
* Exclusive STR command for 16 bit values
|
||||
*/
|
||||
uint32_t __STREXH(uint16_t value, uint16_t *addr)
|
||||
{
|
||||
__ASM("strexh r0, r0, [r1]");
|
||||
__ASM("bx lr");
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief STR Exclusive (32 bit)
|
||||
*
|
||||
* @param value value to store
|
||||
* @param *addr address pointer
|
||||
* @return successful / failed
|
||||
*
|
||||
* Exclusive STR command for 32 bit values
|
||||
*/
|
||||
uint32_t __STREXW(uint32_t value, uint32_t *addr)
|
||||
{
|
||||
__ASM("strex r0, r0, [r1]");
|
||||
__ASM("bx lr");
|
||||
}
|
||||
|
||||
#pragma diag_default=Pe940
|
||||
|
||||
|
||||
#elif (defined (__GNUC__)) /*------------------ GNU Compiler ---------------------*/
|
||||
/* GNU gcc specific functions */
|
||||
|
||||
/**
|
||||
* @brief Return the Process Stack Pointer
|
||||
*
|
||||
* @return ProcessStackPointer
|
||||
*
|
||||
* Return the actual process stack pointer
|
||||
*/
|
||||
uint32_t __get_PSP(void) __attribute__( ( naked ) );
|
||||
uint32_t __get_PSP(void)
|
||||
{
|
||||
uint32_t result=0;
|
||||
|
||||
__ASM volatile ("MRS %0, psp\n\t"
|
||||
"MOV r0, %0 \n\t"
|
||||
"BX lr \n\t" : "=r" (result) );
|
||||
return(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Set the Process Stack Pointer
|
||||
*
|
||||
* @param topOfProcStack Process Stack Pointer
|
||||
*
|
||||
* Assign the value ProcessStackPointer to the MSP
|
||||
* (process stack pointer) Cortex processor register
|
||||
*/
|
||||
void __set_PSP(uint32_t topOfProcStack) __attribute__( ( naked ) );
|
||||
void __set_PSP(uint32_t topOfProcStack)
|
||||
{
|
||||
__ASM volatile ("MSR psp, %0\n\t"
|
||||
"BX lr \n\t" : : "r" (topOfProcStack) );
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Return the Main Stack Pointer
|
||||
*
|
||||
* @return Main Stack Pointer
|
||||
*
|
||||
* Return the current value of the MSP (main stack pointer)
|
||||
* Cortex processor register
|
||||
*/
|
||||
uint32_t __get_MSP(void) __attribute__( ( naked ) );
|
||||
uint32_t __get_MSP(void)
|
||||
{
|
||||
uint32_t result=0;
|
||||
|
||||
__ASM volatile ("MRS %0, msp\n\t"
|
||||
"MOV r0, %0 \n\t"
|
||||
"BX lr \n\t" : "=r" (result) );
|
||||
return(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Set the Main Stack Pointer
|
||||
*
|
||||
* @param topOfMainStack Main Stack Pointer
|
||||
*
|
||||
* Assign the value mainStackPointer to the MSP
|
||||
* (main stack pointer) Cortex processor register
|
||||
*/
|
||||
void __set_MSP(uint32_t topOfMainStack) __attribute__( ( naked ) );
|
||||
void __set_MSP(uint32_t topOfMainStack)
|
||||
{
|
||||
__ASM volatile ("MSR msp, %0\n\t"
|
||||
"BX lr \n\t" : : "r" (topOfMainStack) );
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Return the Base Priority value
|
||||
*
|
||||
* @return BasePriority
|
||||
*
|
||||
* Return the content of the base priority register
|
||||
*/
|
||||
uint32_t __get_BASEPRI(void)
|
||||
{
|
||||
uint32_t result=0;
|
||||
|
||||
__ASM volatile ("MRS %0, basepri_max" : "=r" (result) );
|
||||
return(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Set the Base Priority value
|
||||
*
|
||||
* @param basePri BasePriority
|
||||
*
|
||||
* Set the base priority register
|
||||
*/
|
||||
void __set_BASEPRI(uint32_t value)
|
||||
{
|
||||
__ASM volatile ("MSR basepri, %0" : : "r" (value) );
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Return the Priority Mask value
|
||||
*
|
||||
* @return PriMask
|
||||
*
|
||||
* Return state of the priority mask bit from the priority mask register
|
||||
*/
|
||||
uint32_t __get_PRIMASK(void)
|
||||
{
|
||||
uint32_t result=0;
|
||||
|
||||
__ASM volatile ("MRS %0, primask" : "=r" (result) );
|
||||
return(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Set the Priority Mask value
|
||||
*
|
||||
* @param priMask PriMask
|
||||
*
|
||||
* Set the priority mask bit in the priority mask register
|
||||
*/
|
||||
void __set_PRIMASK(uint32_t priMask)
|
||||
{
|
||||
__ASM volatile ("MSR primask, %0" : : "r" (priMask) );
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Return the Fault Mask value
|
||||
*
|
||||
* @return FaultMask
|
||||
*
|
||||
* Return the content of the fault mask register
|
||||
*/
|
||||
uint32_t __get_FAULTMASK(void)
|
||||
{
|
||||
uint32_t result=0;
|
||||
|
||||
__ASM volatile ("MRS %0, faultmask" : "=r" (result) );
|
||||
return(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Set the Fault Mask value
|
||||
*
|
||||
* @param faultMask faultMask value
|
||||
*
|
||||
* Set the fault mask register
|
||||
*/
|
||||
void __set_FAULTMASK(uint32_t faultMask)
|
||||
{
|
||||
__ASM volatile ("MSR faultmask, %0" : : "r" (faultMask) );
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Return the Control Register value
|
||||
*
|
||||
* @return Control value
|
||||
*
|
||||
* Return the content of the control register
|
||||
*/
|
||||
uint32_t __get_CONTROL(void)
|
||||
{
|
||||
uint32_t result=0;
|
||||
|
||||
__ASM volatile ("MRS %0, control" : "=r" (result) );
|
||||
return(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Set the Control Register value
|
||||
*
|
||||
* @param control Control value
|
||||
*
|
||||
* Set the control register
|
||||
*/
|
||||
void __set_CONTROL(uint32_t control)
|
||||
{
|
||||
__ASM volatile ("MSR control, %0" : : "r" (control) );
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief Reverse byte order in integer value
|
||||
*
|
||||
* @param value value to reverse
|
||||
* @return reversed value
|
||||
*
|
||||
* Reverse byte order in integer value
|
||||
*/
|
||||
uint32_t __REV(uint32_t value)
|
||||
{
|
||||
uint32_t result=0;
|
||||
|
||||
__ASM volatile ("rev %0, %1" : "=r" (result) : "r" (value) );
|
||||
return(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Reverse byte order in unsigned short value
|
||||
*
|
||||
* @param value value to reverse
|
||||
* @return reversed value
|
||||
*
|
||||
* Reverse byte order in unsigned short value
|
||||
*/
|
||||
uint32_t __REV16(uint16_t value)
|
||||
{
|
||||
uint32_t result=0;
|
||||
|
||||
__ASM volatile ("rev16 %0, %1" : "=r" (result) : "r" (value) );
|
||||
return(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Reverse byte order in signed short value with sign extension to integer
|
||||
*
|
||||
* @param value value to reverse
|
||||
* @return reversed value
|
||||
*
|
||||
* Reverse byte order in signed short value with sign extension to integer
|
||||
*/
|
||||
int32_t __REVSH(int16_t value)
|
||||
{
|
||||
uint32_t result=0;
|
||||
|
||||
__ASM volatile ("revsh %0, %1" : "=r" (result) : "r" (value) );
|
||||
return(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Reverse bit order of value
|
||||
*
|
||||
* @param value value to reverse
|
||||
* @return reversed value
|
||||
*
|
||||
* Reverse bit order of value
|
||||
*/
|
||||
uint32_t __RBIT(uint32_t value)
|
||||
{
|
||||
uint32_t result=0;
|
||||
|
||||
__ASM volatile ("rbit %0, %1" : "=r" (result) : "r" (value) );
|
||||
return(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief LDR Exclusive (8 bit)
|
||||
*
|
||||
* @param *addr address pointer
|
||||
* @return value of (*address)
|
||||
*
|
||||
* Exclusive LDR command for 8 bit value
|
||||
*/
|
||||
uint8_t __LDREXB(uint8_t *addr)
|
||||
{
|
||||
uint8_t result=0;
|
||||
|
||||
__ASM volatile ("ldrexb %0, [%1]" : "=r" (result) : "r" (addr) );
|
||||
return(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief LDR Exclusive (16 bit)
|
||||
*
|
||||
* @param *addr address pointer
|
||||
* @return value of (*address)
|
||||
*
|
||||
* Exclusive LDR command for 16 bit values
|
||||
*/
|
||||
uint16_t __LDREXH(uint16_t *addr)
|
||||
{
|
||||
uint16_t result=0;
|
||||
|
||||
__ASM volatile ("ldrexh %0, [%1]" : "=r" (result) : "r" (addr) );
|
||||
return(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief LDR Exclusive (32 bit)
|
||||
*
|
||||
* @param *addr address pointer
|
||||
* @return value of (*address)
|
||||
*
|
||||
* Exclusive LDR command for 32 bit values
|
||||
*/
|
||||
uint32_t __LDREXW(uint32_t *addr)
|
||||
{
|
||||
uint32_t result=0;
|
||||
|
||||
__ASM volatile ("ldrex %0, [%1]" : "=r" (result) : "r" (addr) );
|
||||
return(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief STR Exclusive (8 bit)
|
||||
*
|
||||
* @param value value to store
|
||||
* @param *addr address pointer
|
||||
* @return successful / failed
|
||||
*
|
||||
* Exclusive STR command for 8 bit values
|
||||
*/
|
||||
uint32_t __STREXB(uint8_t value, uint8_t *addr)
|
||||
{
|
||||
uint32_t result=0;
|
||||
|
||||
__ASM volatile ("strexb %0, %2, [%1]" : "=r" (result) : "r" (addr), "r" (value) );
|
||||
return(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief STR Exclusive (16 bit)
|
||||
*
|
||||
* @param value value to store
|
||||
* @param *addr address pointer
|
||||
* @return successful / failed
|
||||
*
|
||||
* Exclusive STR command for 16 bit values
|
||||
*/
|
||||
uint32_t __STREXH(uint16_t value, uint16_t *addr)
|
||||
{
|
||||
uint32_t result=0;
|
||||
|
||||
__ASM volatile ("strexh %0, %2, [%1]" : "=r" (result) : "r" (addr), "r" (value) );
|
||||
return(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief STR Exclusive (32 bit)
|
||||
*
|
||||
* @param value value to store
|
||||
* @param *addr address pointer
|
||||
* @return successful / failed
|
||||
*
|
||||
* Exclusive STR command for 32 bit values
|
||||
*/
|
||||
uint32_t __STREXW(uint32_t value, uint32_t *addr)
|
||||
{
|
||||
uint32_t result=0;
|
||||
|
||||
__ASM volatile ("strex %0, %2, [%1]" : "=r" (result) : "r" (addr), "r" (value) );
|
||||
return(result);
|
||||
}
|
||||
|
||||
|
||||
#elif (defined (__TASKING__)) /*------------------ TASKING Compiler ---------------------*/
|
||||
/* TASKING carm specific functions */
|
||||
|
||||
/*
|
||||
* The CMSIS functions have been implemented as intrinsics in the compiler.
|
||||
* Please use "carm -?i" to get an up to date list of all instrinsics,
|
||||
* Including the CMSIS ones.
|
||||
*/
|
||||
|
||||
#endif
|
|
@ -1,109 +0,0 @@
|
|||
/**************************************************************************//**
|
||||
* @file
|
||||
* @brief CMSIS Cortex-M3 Peripheral Access Layer for EFM32 Gxxx Device series
|
||||
*
|
||||
* This is a convenience header file for defining the EFM32 part number on the
|
||||
* build command line, instead of specifying the part specific header file.
|
||||
* @verbatim
|
||||
* Example: Add "-DEFM32G890F128" to your build options, to define part
|
||||
* Add "#include "EFM32G.h" to your source files
|
||||
* @endverbatim
|
||||
* @author Energy Micro AS
|
||||
* @version 1.0.2
|
||||
******************************************************************************
|
||||
* @section License
|
||||
* <b>(C) Copyright 2009 Energy Micro AS, http://www.energymicro.com</b>
|
||||
******************************************************************************
|
||||
*
|
||||
* This source code is the property of Energy Micro AS. The source and compiled
|
||||
* code may only be used on Energy Micro "EFM32" microcontrollers.
|
||||
*
|
||||
* This copyright notice may not be removed from the source code nor changed.
|
||||
*
|
||||
* DISCLAIMER OF WARRANTY/LIMITATION OF REMEDIES: Energy Micro AS has no
|
||||
* obligation to support this Software. Energy Micro AS is providing the
|
||||
* Software "AS IS", with no express or implied warranties of any kind,
|
||||
* including, but not limited to, any implied warranties of merchantability
|
||||
* or fitness for any particular purpose or warranties against infringement
|
||||
* of any proprietary rights of a third party.
|
||||
*
|
||||
* Energy Micro AS will not be liable for any consequential, incidental, or
|
||||
* special damages, or any other relief, or for any claim by any third party,
|
||||
* arising from your use of this Software.
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
#ifndef __EFM32_H
|
||||
#define __EFM32_H
|
||||
|
||||
#if defined(EFM32G200F16)
|
||||
#include "efm32g200f16.h"
|
||||
|
||||
#elif defined(EFM32G200F32)
|
||||
#include "efm32g200f32.h"
|
||||
|
||||
#elif defined(EFM32G200F64)
|
||||
#include "efm32g200f64.h"
|
||||
|
||||
#elif defined(EFM32G210F128)
|
||||
#include "efm32g210f128.h"
|
||||
|
||||
#elif defined(EFM32G230F128)
|
||||
#include "efm32g230f128.h"
|
||||
|
||||
#elif defined(EFM32G230F32)
|
||||
#include "efm32g230f32.h"
|
||||
|
||||
#elif defined(EFM32G230F64)
|
||||
#include "efm32g230f64.h"
|
||||
|
||||
#elif defined(EFM32G280F128)
|
||||
#include "efm32g280f128.h"
|
||||
|
||||
#elif defined(EFM32G280F32)
|
||||
#include "efm32g280f32.h"
|
||||
|
||||
#elif defined(EFM32G280F64)
|
||||
#include "efm32g280f64.h"
|
||||
|
||||
#elif defined(EFM32G290F128)
|
||||
#include "efm32g290f128.h"
|
||||
|
||||
#elif defined(EFM32G290F32)
|
||||
#include "efm32g290f32.h"
|
||||
|
||||
#elif defined(EFM32G290F64)
|
||||
#include "efm32g290f64.h"
|
||||
|
||||
#elif defined(EFM32G840F128)
|
||||
#include "efm32g840f128.h"
|
||||
|
||||
#elif defined(EFM32G840F32)
|
||||
#include "efm32g840f32.h"
|
||||
|
||||
#elif defined(EFM32G840F64)
|
||||
#include "efm32g840f64.h"
|
||||
|
||||
#elif defined(EFM32G880F128)
|
||||
#include "efm32g880f128.h"
|
||||
|
||||
#elif defined(EFM32G880F32)
|
||||
#include "efm32g880f32.h"
|
||||
|
||||
#elif defined(EFM32G880F64)
|
||||
#include "efm32g880f64.h"
|
||||
|
||||
#elif defined(EFM32G890F128)
|
||||
#include "efm32g890f128.h"
|
||||
|
||||
#elif defined(EFM32G890F32)
|
||||
#include "efm32g890f32.h"
|
||||
|
||||
#elif defined(EFM32G890F64)
|
||||
#include "efm32g890f64.h"
|
||||
|
||||
#else
|
||||
#error "efm32.h: PART NUMBER undefined"
|
||||
#endif
|
||||
|
||||
#endif
|
File diff suppressed because it is too large
Load diff
|
@ -1,126 +0,0 @@
|
|||
/**************************************************************************//**
|
||||
* @file
|
||||
* @brief CMSIS Cortex-M3 Peripheral Access Layer for EFM32 devices
|
||||
*
|
||||
* @author Energy Micro AS
|
||||
* @version 1.0.2
|
||||
******************************************************************************
|
||||
* @section License
|
||||
* <b>(C) Copyright 2009 Energy Micro AS, http://www.energymicro.com</b>
|
||||
******************************************************************************
|
||||
*
|
||||
* This source code is the property of Energy Micro AS. The source and compiled
|
||||
* code may only be used on Energy Micro "EFM32" microcontrollers.
|
||||
*
|
||||
* This copyright notice may not be removed from the source code nor changed.
|
||||
*
|
||||
* DISCLAIMER OF WARRANTY/LIMITATION OF REMEDIES: Energy Micro AS has no
|
||||
* obligation to support this Software. Energy Micro AS is providing the
|
||||
* Software "AS IS", with no express or implied warranties of any kind,
|
||||
* including, but not limited to, any implied warranties of merchantability
|
||||
* or fitness for any particular purpose or warranties against infringement
|
||||
* of any proprietary rights of a third party.
|
||||
*
|
||||
* Energy Micro AS will not be liable for any consequential, incidental, or
|
||||
* special damages, or any other relief, or for any claim by any third party,
|
||||
* arising from your use of this Software.
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
#include <stdint.h>
|
||||
#include "efm32.h"
|
||||
|
||||
uint32_t SystemCoreClock; /**< System Clock Frequency (Core Clock) */
|
||||
|
||||
#ifndef EFM32_HFXO_FREQ
|
||||
#define EFM32_HFXO_FREQ 32000000
|
||||
#endif
|
||||
#ifndef EFM32_LFXO_FREQ
|
||||
#define EFM32_LFXO_FREQ 32768
|
||||
#endif
|
||||
#ifndef EFM32_LFRCO_FREQ
|
||||
#define EFM32_LFRCO_FREQ 32768
|
||||
#endif
|
||||
|
||||
/**************************************************************************//**
|
||||
* @brief Initialize the system
|
||||
*
|
||||
* @param none
|
||||
* @return none
|
||||
*
|
||||
* @brief Setup the microcontroller system.
|
||||
* Initialize the System and update the SystemCoreClock variable.
|
||||
*****************************************************************************/
|
||||
void SystemInit(void)
|
||||
{
|
||||
#if EFM32_AUXHFROCO_ENABLE
|
||||
CMU_TypeDef *cmu = CMU;
|
||||
|
||||
/* Enable clocks to debug modules in Cortex */
|
||||
/* This will enable Debug Trace and MSC Flash programming clocks */
|
||||
cmu->OSCENCMD = CMU_OSCENCMD_AUXHFRCOEN;
|
||||
#endif
|
||||
}
|
||||
|
||||
/**************************************************************************//**
|
||||
* @brief Update SystemCoreClock variable
|
||||
*
|
||||
* @param none
|
||||
* @return none
|
||||
*
|
||||
* @brief Updates the SystemCoreClock with current core Clock
|
||||
* retrieved from cpu registers.
|
||||
*****************************************************************************/
|
||||
void SystemCoreClockUpdate(void)
|
||||
{
|
||||
CMU_TypeDef *cmu = CMU;
|
||||
uint32_t inputClock;
|
||||
|
||||
/* Check source for core clock */
|
||||
switch (cmu->STATUS &
|
||||
(CMU_STATUS_HFRCOSEL |
|
||||
CMU_STATUS_HFXOSEL |
|
||||
CMU_STATUS_LFRCOSEL |
|
||||
CMU_STATUS_LFXOSEL))
|
||||
{
|
||||
case CMU_STATUS_HFXOSEL:
|
||||
inputClock = EFM32_HFXO_FREQ;
|
||||
break;
|
||||
case CMU_STATUS_LFRCOSEL:
|
||||
inputClock = EFM32_LFRCO_FREQ;
|
||||
break;
|
||||
case CMU_STATUS_LFXOSEL:
|
||||
inputClock = EFM32_LFXO_FREQ;
|
||||
break;
|
||||
case CMU_STATUS_HFRCOSEL:
|
||||
default:
|
||||
switch ((cmu->HFRCOCTRL & _CMU_HFRCOCTRL_BAND_MASK) >> _CMU_HFRCOCTRL_BAND_SHIFT)
|
||||
{
|
||||
case _CMU_HFRCOCTRL_BAND_28MHZ:
|
||||
inputClock = 28000000;
|
||||
break;
|
||||
case _CMU_HFRCOCTRL_BAND_21MHZ:
|
||||
inputClock = 21000000;
|
||||
break;
|
||||
case _CMU_HFRCOCTRL_BAND_14MHZ:
|
||||
inputClock = 14000000;
|
||||
break;
|
||||
case _CMU_HFRCOCTRL_BAND_11MHZ:
|
||||
inputClock = 11000000;
|
||||
break;
|
||||
case _CMU_HFRCOCTRL_BAND_7MHZ:
|
||||
inputClock = 7000000;
|
||||
break;
|
||||
case _CMU_HFRCOCTRL_BAND_1MHZ:
|
||||
inputClock = 1500000;
|
||||
break;
|
||||
default:
|
||||
inputClock = 0;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
/* Adjust according to clock divisor */
|
||||
SystemCoreClock = inputClock / (1<<((cmu->HFCORECLKDIV & _CMU_HFCORECLKDIV_MASK)>>_CMU_HFCORECLKDIV_HFCORECLKDIV_SHIFT));
|
||||
}
|
||||
|
|
@ -1,69 +0,0 @@
|
|||
/**************************************************************************//**
|
||||
* @file
|
||||
* @brief CMSIS Cortex-M3 Peripheral Access Layer for EFM32 devices
|
||||
*
|
||||
* @author Energy Micro AS
|
||||
* @version 1.0.2
|
||||
******************************************************************************
|
||||
* @section License
|
||||
* <b>(C) Copyright 2009 Energy Micro AS, http://www.energymicro.com</b>
|
||||
******************************************************************************
|
||||
*
|
||||
* This source code is the property of Energy Micro AS. The source and compiled
|
||||
* code may only be used on Energy Micro "EFM32" microcontrollers.
|
||||
*
|
||||
* This copyright notice may not be removed from the source code nor changed.
|
||||
*
|
||||
* DISCLAIMER OF WARRANTY/LIMITATION OF REMEDIES: Energy Micro AS has no
|
||||
* obligation to support this Software. Energy Micro AS is providing the
|
||||
* Software "AS IS", with no express or implied warranties of any kind,
|
||||
* including, but not limited to, any implied warranties of merchantability
|
||||
* or fitness for any particular purpose or warranties against infringement
|
||||
* of any proprietary rights of a third party.
|
||||
*
|
||||
* Energy Micro AS will not be liable for any consequential, incidental, or
|
||||
* special damages, or any other relief, or for any claim by any third party,
|
||||
* arising from your use of this Software.
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
#ifndef __SYSTEM_EFM32_H
|
||||
#define __SYSTEM_EFM32_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
extern uint32_t SystemCoreClock; /**< System Clock Frequency (Core Clock) */
|
||||
|
||||
/**************************************************************************//**
|
||||
* @brief Initialize the system
|
||||
*
|
||||
* @param none
|
||||
* @return none
|
||||
*
|
||||
* @brief Setup the microcontroller system.
|
||||
* Initialize the System and update the SystemCoreClock variable.
|
||||
*****************************************************************************/
|
||||
extern void SystemInit(void);
|
||||
|
||||
/**************************************************************************//**
|
||||
* @brief Update SystemCoreClock variable
|
||||
*
|
||||
* @param none
|
||||
* @return none
|
||||
*
|
||||
* @brief Updates the SystemCoreClock with current core Clock
|
||||
* retrieved from cpu registers.
|
||||
*****************************************************************************/
|
||||
extern void SystemCoreClockUpdate(void);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
@ -1,320 +0,0 @@
|
|||
<html>
|
||||
|
||||
<head>
|
||||
<title>CMSIS Changes</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
|
||||
<meta name="GENERATOR" content="Microsoft FrontPage 6.0">
|
||||
<meta name="ProgId" content="FrontPage.Editor.Document">
|
||||
<style>
|
||||
<!--
|
||||
/*-----------------------------------------------------------
|
||||
Keil Software CHM Style Sheet
|
||||
-----------------------------------------------------------*/
|
||||
body { color: #000000; background-color: #FFFFFF; font-size: 75%; font-family:
|
||||
Verdana, Arial, 'Sans Serif' }
|
||||
a:link { color: #0000FF; text-decoration: underline }
|
||||
a:visited { color: #0000FF; text-decoration: underline }
|
||||
a:active { color: #FF0000; text-decoration: underline }
|
||||
a:hover { color: #FF0000; text-decoration: underline }
|
||||
h1 { font-family: Verdana; font-size: 18pt; color: #000080; font-weight: bold;
|
||||
text-align: Center; margin-right: 3 }
|
||||
h2 { font-family: Verdana; font-size: 14pt; color: #000080; font-weight: bold;
|
||||
background-color: #CCCCCC; margin-top: 24; margin-bottom: 3;
|
||||
padding: 6 }
|
||||
h3 { font-family: Verdana; font-size: 10pt; font-weight: bold; background-color:
|
||||
#CCCCCC; margin-top: 24; margin-bottom: 3; padding: 6 }
|
||||
pre { font-family: Courier New; font-size: 10pt; background-color: #CCFFCC;
|
||||
margin-left: 24; margin-right: 24 }
|
||||
ul { list-style-type: square; margin-top: 6pt; margin-bottom: 0 }
|
||||
ol { margin-top: 6pt; margin-bottom: 0 }
|
||||
li { clear: both; margin-bottom: 6pt }
|
||||
table { font-size: 100%; border-width: 0; padding: 0 }
|
||||
th { color: #FFFFFF; background-color: #000080; text-align: left; vertical-align:
|
||||
bottom; padding-right: 6pt }
|
||||
tr { text-align: left; vertical-align: top }
|
||||
td { text-align: left; vertical-align: top; padding-right: 6pt }
|
||||
.ToolT { font-size: 8pt; color: #808080 }
|
||||
.TinyT { font-size: 8pt; text-align: Center }
|
||||
code { color: #000000; background-color: #E0E0E0; font-family: 'Courier New', Courier;
|
||||
line-height: 120%; font-style: normal }
|
||||
/*-----------------------------------------------------------
|
||||
Notes
|
||||
-----------------------------------------------------------*/
|
||||
p.note { font-weight: bold; clear: both; margin-bottom: 3pt; padding-top: 6pt }
|
||||
/*-----------------------------------------------------------
|
||||
Expanding/Contracting Divisions
|
||||
-----------------------------------------------------------*/
|
||||
#expand { text-decoration: none; margin-bottom: 3pt }
|
||||
img.expand { border-style: none; border-width: medium }
|
||||
div.expand { display: none; margin-left: 9pt; margin-top: 0 }
|
||||
/*-----------------------------------------------------------
|
||||
Where List Tags
|
||||
-----------------------------------------------------------*/
|
||||
p.wh { font-weight: bold; clear: both; margin-top: 6pt; margin-bottom: 3pt }
|
||||
table.wh { width: 100% }
|
||||
td.whItem { white-space: nowrap; font-style: italic; padding-right: 6pt; padding-bottom:
|
||||
6pt }
|
||||
td.whDesc { padding-bottom: 6pt }
|
||||
/*-----------------------------------------------------------
|
||||
Keil Table Tags
|
||||
-----------------------------------------------------------*/
|
||||
table.kt { border: 1pt solid #000000 }
|
||||
th.kt { white-space: nowrap; border-bottom: 1pt solid #000000; padding-left: 6pt;
|
||||
padding-right: 6pt; padding-top: 4pt; padding-bottom: 4pt }
|
||||
tr.kt { }
|
||||
td.kt { color: #000000; background-color: #E0E0E0; border-top: 1pt solid #A0A0A0;
|
||||
padding-left: 6pt; padding-right: 6pt; padding-top: 2pt;
|
||||
padding-bottom: 2pt }
|
||||
/*-----------------------------------------------------------
|
||||
-----------------------------------------------------------*/
|
||||
-->
|
||||
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<h1>Changes to CMSIS version V1.20</h1>
|
||||
|
||||
<hr>
|
||||
|
||||
<h2>1. Removed CMSIS Middelware packages</h2>
|
||||
<p>
|
||||
CMSIS Middleware is on hold from ARM side until a agreement between all CMSIS partners is found.
|
||||
</p>
|
||||
|
||||
<h2>2. SystemFrequency renamed to SystemCoreClock</h2>
|
||||
<p>
|
||||
The variable name <strong>SystemCoreClock</strong> is more precise than <strong>SystemFrequency</strong>
|
||||
because the variable holds the clock value at which the core is running.
|
||||
</p>
|
||||
|
||||
<h2>3. Changed startup concept</h2>
|
||||
<p>
|
||||
The old startup concept (calling SystemInit_ExtMemCtl from startup file and calling SystemInit
|
||||
from main) has the weakness that it does not work for controllers which need a already
|
||||
configuerd clock system to configure the external memory controller.
|
||||
</p>
|
||||
|
||||
<h3>Changed startup concept</h3>
|
||||
<ul>
|
||||
<li>
|
||||
SystemInit() is called from startup file before <strong>premain</strong>.
|
||||
</li>
|
||||
<li>
|
||||
<strong>SystemInit()</strong> configures the clock system and also configures
|
||||
an existing external memory controller.
|
||||
</li>
|
||||
<li>
|
||||
<strong>SystemInit()</strong> must not use global variables.
|
||||
</li>
|
||||
<li>
|
||||
<strong>SystemCoreClock</strong> is initialized with a correct predefined value.
|
||||
</li>
|
||||
<li>
|
||||
Additional function <strong>void SystemCoreClockUpdate (void)</strong> is provided.<br>
|
||||
<strong>SystemCoreClockUpdate()</strong> updates the variable <strong>SystemCoreClock</strong>
|
||||
and must be called whenever the core clock is changed.<br>
|
||||
<strong>SystemCoreClockUpdate()</strong> evaluates the clock register settings and calculates
|
||||
the current core clock.
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h2>4. Advanced Debug Functions</h2>
|
||||
<p>
|
||||
ITM communication channel is only capable for OUT direction. To allow also communication for
|
||||
IN direction a simple concept is provided.
|
||||
</p>
|
||||
<ul>
|
||||
<li>
|
||||
Global variable <strong>volatile int ITM_RxBuffer</strong> used for IN data.
|
||||
</li>
|
||||
<li>
|
||||
Function <strong>int ITM_CheckChar (void)</strong> checks if a new character is available.
|
||||
</li>
|
||||
<li>
|
||||
Function <strong>int ITM_ReceiveChar (void)</strong> retrieves the new character.
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<p>
|
||||
For detailed explanation see file <strong>CMSIS debug support.htm</strong>.
|
||||
</p>
|
||||
|
||||
|
||||
<h2>5. Core Register Bit Definitions</h2>
|
||||
<p>
|
||||
Files core_cm3.h and core_cm0.h contain now bit definitions for Core Registers. The name for the
|
||||
defines correspond with the Cortex-M Technical Reference Manual.
|
||||
</p>
|
||||
<p>
|
||||
e.g. SysTick structure with bit definitions
|
||||
</p>
|
||||
<pre>
|
||||
/** @addtogroup CMSIS_CM3_SysTick CMSIS CM3 SysTick
|
||||
memory mapped structure for SysTick
|
||||
@{
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
__IO uint32_t CTRL; /*!< Offset: 0x00 SysTick Control and Status Register */
|
||||
__IO uint32_t LOAD; /*!< Offset: 0x04 SysTick Reload Value Register */
|
||||
__IO uint32_t VAL; /*!< Offset: 0x08 SysTick Current Value Register */
|
||||
__I uint32_t CALIB; /*!< Offset: 0x0C SysTick Calibration Register */
|
||||
} SysTick_Type;
|
||||
|
||||
/* SysTick Control / Status Register Definitions */
|
||||
#define SysTick_CTRL_COUNTFLAG_Pos 16 /*!< SysTick CTRL: COUNTFLAG Position */
|
||||
#define SysTick_CTRL_COUNTFLAG_Msk (1ul << SysTick_CTRL_COUNTFLAG_Pos) /*!< SysTick CTRL: COUNTFLAG Mask */
|
||||
|
||||
#define SysTick_CTRL_CLKSOURCE_Pos 2 /*!< SysTick CTRL: CLKSOURCE Position */
|
||||
#define SysTick_CTRL_CLKSOURCE_Msk (1ul << SysTick_CTRL_CLKSOURCE_Pos) /*!< SysTick CTRL: CLKSOURCE Mask */
|
||||
|
||||
#define SysTick_CTRL_TICKINT_Pos 1 /*!< SysTick CTRL: TICKINT Position */
|
||||
#define SysTick_CTRL_TICKINT_Msk (1ul << SysTick_CTRL_TICKINT_Pos) /*!< SysTick CTRL: TICKINT Mask */
|
||||
|
||||
#define SysTick_CTRL_ENABLE_Pos 0 /*!< SysTick CTRL: ENABLE Position */
|
||||
#define SysTick_CTRL_ENABLE_Msk (1ul << SysTick_CTRL_ENABLE_Pos) /*!< SysTick CTRL: ENABLE Mask */
|
||||
|
||||
/* SysTick Reload Register Definitions */
|
||||
#define SysTick_LOAD_RELOAD_Pos 0 /*!< SysTick LOAD: RELOAD Position */
|
||||
#define SysTick_LOAD_RELOAD_Msk (0xFFFFFFul << SysTick_LOAD_RELOAD_Pos) /*!< SysTick LOAD: RELOAD Mask */
|
||||
|
||||
/* SysTick Current Register Definitions */
|
||||
#define SysTick_VAL_CURRENT_Pos 0 /*!< SysTick VAL: CURRENT Position */
|
||||
#define SysTick_VAL_CURRENT_Msk (0xFFFFFFul << SysTick_VAL_CURRENT_Pos) /*!< SysTick VAL: CURRENT Mask */
|
||||
|
||||
/* SysTick Calibration Register Definitions */
|
||||
#define SysTick_CALIB_NOREF_Pos 31 /*!< SysTick CALIB: NOREF Position */
|
||||
#define SysTick_CALIB_NOREF_Msk (1ul << SysTick_CALIB_NOREF_Pos) /*!< SysTick CALIB: NOREF Mask */
|
||||
|
||||
#define SysTick_CALIB_SKEW_Pos 30 /*!< SysTick CALIB: SKEW Position */
|
||||
#define SysTick_CALIB_SKEW_Msk (1ul << SysTick_CALIB_SKEW_Pos) /*!< SysTick CALIB: SKEW Mask */
|
||||
|
||||
#define SysTick_CALIB_TENMS_Pos 0 /*!< SysTick CALIB: TENMS Position */
|
||||
#define SysTick_CALIB_TENMS_Msk (0xFFFFFFul << SysTick_VAL_CURRENT_Pos) /*!< SysTick CALIB: TENMS Mask */
|
||||
/*@}*/ /* end of group CMSIS_CM3_SysTick */</pre>
|
||||
|
||||
<h2>7. DoxyGen Tags</h2>
|
||||
<p>
|
||||
DoxyGen tags in files core_cm3.[c,h] and core_cm0.[c,h] are reworked to create proper documentation
|
||||
using DoxyGen.
|
||||
</p>
|
||||
|
||||
<h2>8. Folder Structure</h2>
|
||||
<p>
|
||||
The folder structure is changed to differentiate the single support packages.
|
||||
</p>
|
||||
|
||||
<ul>
|
||||
<li>CM0</li>
|
||||
<li>CM3
|
||||
<ul>
|
||||
<li>CoreSupport</li>
|
||||
<li>DeviceSupport</li>
|
||||
<ul>
|
||||
<li>Vendor
|
||||
<ul>
|
||||
<li>Device
|
||||
<ul>
|
||||
<li>Startup
|
||||
<ul>
|
||||
<li>Toolchain</li>
|
||||
<li>Toolchain</li>
|
||||
<li>...</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Device</li>
|
||||
<li>...</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Vendor</li>
|
||||
<li>...</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Example
|
||||
<ul>
|
||||
<li>Toolchain
|
||||
<ul>
|
||||
<li>Device</li>
|
||||
<li>Device</li>
|
||||
<li>...</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Toolchain</li>
|
||||
<li>...</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li>Documentation</li>
|
||||
</ul>
|
||||
|
||||
<h2>9. Open Points</h2>
|
||||
<p>
|
||||
Following points need to be clarified and solved:
|
||||
</p>
|
||||
<ul>
|
||||
<li>
|
||||
<p>
|
||||
Equivalent C and Assembler startup files.
|
||||
</p>
|
||||
<p>
|
||||
Is there a need for having C startup files although assembler startup files are
|
||||
very efficient and do not need to be changed?
|
||||
<p/>
|
||||
</li>
|
||||
<li>
|
||||
<p>
|
||||
Placing of HEAP in external RAM.
|
||||
</p>
|
||||
<p>
|
||||
It must be possible to place HEAP in external RAM if the device supports an
|
||||
external memory controller.
|
||||
</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>
|
||||
Placing of STACK /HEAP.
|
||||
</p>
|
||||
<p>
|
||||
STACK should always be placed at the end of internal RAM.
|
||||
</p>
|
||||
<p>
|
||||
If HEAP is placed in internal RAM than it should be placed after RW ZI section.
|
||||
</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>
|
||||
Removing core_cm3.c and core_cm0.c.
|
||||
</p>
|
||||
<p>
|
||||
On a long term the functions in core_cm3.c and core_cm0.c must be replaced with
|
||||
appropriate compiler intrinsics.
|
||||
</p>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h2>10. Limitations</h2>
|
||||
<p>
|
||||
The following limitations are not covered with the current CMSIS version:
|
||||
</p>
|
||||
<ul>
|
||||
<li>
|
||||
No <strong>C startup files</strong> for ARM toolchain are provided.
|
||||
</li>
|
||||
<li>
|
||||
No <strong>C startup files</strong> for GNU toolchain are provided.
|
||||
</li>
|
||||
<li>
|
||||
No <strong>C startup files</strong> for IAR toolchain are provided.
|
||||
</li>
|
||||
<li>
|
||||
No <strong>Tasking</strong> projects are provided yet.
|
||||
</li>
|
||||
</ul>
|
|
@ -1,243 +0,0 @@
|
|||
<html>
|
||||
|
||||
<head>
|
||||
<title>CMSIS Debug Support</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
|
||||
<meta name="GENERATOR" content="Microsoft FrontPage 6.0">
|
||||
<meta name="ProgId" content="FrontPage.Editor.Document">
|
||||
<style>
|
||||
<!--
|
||||
/*-----------------------------------------------------------
|
||||
Keil Software CHM Style Sheet
|
||||
-----------------------------------------------------------*/
|
||||
body { color: #000000; background-color: #FFFFFF; font-size: 75%; font-family:
|
||||
Verdana, Arial, 'Sans Serif' }
|
||||
a:link { color: #0000FF; text-decoration: underline }
|
||||
a:visited { color: #0000FF; text-decoration: underline }
|
||||
a:active { color: #FF0000; text-decoration: underline }
|
||||
a:hover { color: #FF0000; text-decoration: underline }
|
||||
h1 { font-family: Verdana; font-size: 18pt; color: #000080; font-weight: bold;
|
||||
text-align: Center; margin-right: 3 }
|
||||
h2 { font-family: Verdana; font-size: 14pt; color: #000080; font-weight: bold;
|
||||
background-color: #CCCCCC; margin-top: 24; margin-bottom: 3;
|
||||
padding: 6 }
|
||||
h3 { font-family: Verdana; font-size: 10pt; font-weight: bold; background-color:
|
||||
#CCCCCC; margin-top: 24; margin-bottom: 3; padding: 6 }
|
||||
pre { font-family: Courier New; font-size: 10pt; background-color: #CCFFCC;
|
||||
margin-left: 24; margin-right: 24 }
|
||||
ul { list-style-type: square; margin-top: 6pt; margin-bottom: 0 }
|
||||
ol { margin-top: 6pt; margin-bottom: 0 }
|
||||
li { clear: both; margin-bottom: 6pt }
|
||||
table { font-size: 100%; border-width: 0; padding: 0 }
|
||||
th { color: #FFFFFF; background-color: #000080; text-align: left; vertical-align:
|
||||
bottom; padding-right: 6pt }
|
||||
tr { text-align: left; vertical-align: top }
|
||||
td { text-align: left; vertical-align: top; padding-right: 6pt }
|
||||
.ToolT { font-size: 8pt; color: #808080 }
|
||||
.TinyT { font-size: 8pt; text-align: Center }
|
||||
code { color: #000000; background-color: #E0E0E0; font-family: 'Courier New', Courier;
|
||||
line-height: 120%; font-style: normal }
|
||||
/*-----------------------------------------------------------
|
||||
Notes
|
||||
-----------------------------------------------------------*/
|
||||
p.note { font-weight: bold; clear: both; margin-bottom: 3pt; padding-top: 6pt }
|
||||
/*-----------------------------------------------------------
|
||||
Expanding/Contracting Divisions
|
||||
-----------------------------------------------------------*/
|
||||
#expand { text-decoration: none; margin-bottom: 3pt }
|
||||
img.expand { border-style: none; border-width: medium }
|
||||
div.expand { display: none; margin-left: 9pt; margin-top: 0 }
|
||||
/*-----------------------------------------------------------
|
||||
Where List Tags
|
||||
-----------------------------------------------------------*/
|
||||
p.wh { font-weight: bold; clear: both; margin-top: 6pt; margin-bottom: 3pt }
|
||||
table.wh { width: 100% }
|
||||
td.whItem { white-space: nowrap; font-style: italic; padding-right: 6pt; padding-bottom:
|
||||
6pt }
|
||||
td.whDesc { padding-bottom: 6pt }
|
||||
/*-----------------------------------------------------------
|
||||
Keil Table Tags
|
||||
-----------------------------------------------------------*/
|
||||
table.kt { border: 1pt solid #000000 }
|
||||
th.kt { white-space: nowrap; border-bottom: 1pt solid #000000; padding-left: 6pt;
|
||||
padding-right: 6pt; padding-top: 4pt; padding-bottom: 4pt }
|
||||
tr.kt { }
|
||||
td.kt { color: #000000; background-color: #E0E0E0; border-top: 1pt solid #A0A0A0;
|
||||
padding-left: 6pt; padding-right: 6pt; padding-top: 2pt;
|
||||
padding-bottom: 2pt }
|
||||
/*-----------------------------------------------------------
|
||||
-----------------------------------------------------------*/
|
||||
-->
|
||||
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<h1>CMSIS Debug Support</h1>
|
||||
|
||||
<hr>
|
||||
|
||||
<h2>Cortex-M3 ITM Debug Access</h2>
|
||||
<p>
|
||||
The Cortex-M3 incorporates the Instrumented Trace Macrocell (ITM) that provides together with
|
||||
the Serial Viewer Output trace capabilities for the microcontroller system. The ITM has
|
||||
32 communication channels which are able to transmit 32 / 16 / 8 bit values; two ITM
|
||||
communication channels are used by CMSIS to output the following information:
|
||||
</p>
|
||||
<ul>
|
||||
<li>ITM Channel 0: used for printf-style output via the debug interface.</li>
|
||||
<li>ITM Channel 31: is reserved for RTOS kernel awareness debugging.</li>
|
||||
</ul>
|
||||
|
||||
<h2>Debug IN / OUT functions</h2>
|
||||
<p>CMSIS provides following debug functions:</p>
|
||||
<ul>
|
||||
<li>ITM_SendChar (uses ITM channel 0)</li>
|
||||
<li>ITM_ReceiveChar (uses global variable)</li>
|
||||
<li>ITM_CheckChar (uses global variable)</li>
|
||||
</ul>
|
||||
|
||||
<h3>ITM_SendChar</h3>
|
||||
<p>
|
||||
<strong>ITM_SendChar</strong> is used to transmit a character over ITM channel 0 from
|
||||
the microcontroller system to the debug system. <br>
|
||||
Only a 8 bit value is transmitted.
|
||||
</p>
|
||||
<pre>
|
||||
static __INLINE uint32_t ITM_SendChar (uint32_t ch)
|
||||
{
|
||||
/* check if debugger connected and ITM channel enabled for tracing */
|
||||
if ((CoreDebug->DEMCR & CoreDebug_DEMCR_TRCENA) &&
|
||||
(ITM->TCR & ITM_TCR_ITMENA) &&
|
||||
(ITM->TER & (1UL << 0)) )
|
||||
{
|
||||
while (ITM->PORT[0].u32 == 0);
|
||||
ITM->PORT[0].u8 = (uint8_t)ch;
|
||||
}
|
||||
return (ch);
|
||||
}</pre>
|
||||
|
||||
<h3>ITM_ReceiveChar</h3>
|
||||
<p>
|
||||
ITM communication channel is only capable for OUT direction. For IN direction
|
||||
a globel variable is used. A simple mechansim detects if a character is received.
|
||||
The project to test need to be build with debug information.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
The globale variable <strong>ITM_RxBuffer</strong> is used to transmit a 8 bit value from debug system
|
||||
to microcontroller system. <strong>ITM_RxBuffer</strong> is 32 bit wide to enshure a proper handshake.
|
||||
</p>
|
||||
<pre>
|
||||
extern volatile int ITM_RxBuffer; /* variable to receive characters */
|
||||
</pre>
|
||||
<p>
|
||||
A dedicated bit pattern is used to determin if <strong>ITM_RxBuffer</strong> is empty
|
||||
or contains a valid value.
|
||||
</p>
|
||||
<pre>
|
||||
#define ITM_RXBUFFER_EMPTY 0x5AA55AA5 /* value identifying ITM_RxBuffer is ready for next character */
|
||||
</pre>
|
||||
<p>
|
||||
<strong>ITM_ReceiveChar</strong> is used to receive a 8 bit value from the debug system. The function is nonblocking.
|
||||
It returns the received character or '-1' if no character was available.
|
||||
</p>
|
||||
<pre>
|
||||
static __INLINE int ITM_ReceiveChar (void) {
|
||||
int ch = -1; /* no character available */
|
||||
|
||||
if (ITM_RxBuffer != ITM_RXBUFFER_EMPTY) {
|
||||
ch = ITM_RxBuffer;
|
||||
ITM_RxBuffer = ITM_RXBUFFER_EMPTY; /* ready for next character */
|
||||
}
|
||||
|
||||
return (ch);
|
||||
}
|
||||
</pre>
|
||||
|
||||
<h3>ITM_CheckChar</h3>
|
||||
<p>
|
||||
<strong>ITM_CheckChar</strong> is used to check if a character is received.
|
||||
</p>
|
||||
<pre>
|
||||
static __INLINE int ITM_CheckChar (void) {
|
||||
|
||||
if (ITM_RxBuffer == ITM_RXBUFFER_EMPTY) {
|
||||
return (0); /* no character available */
|
||||
} else {
|
||||
return (1); /* character available */
|
||||
}
|
||||
}</pre>
|
||||
|
||||
|
||||
<h2>ITM Debug Support in uVision</h2>
|
||||
<p>
|
||||
uVision uses in a debug session the <strong>Debug (printf) Viewer</strong> window to
|
||||
display the debug data.
|
||||
</p>
|
||||
<p>Direction microcontroller system -> uVision:</p>
|
||||
<ul>
|
||||
<li>
|
||||
Characters received via ITM communication channel 0 are written in a printf style
|
||||
to <strong>Debug (printf) Viewer</strong> window.
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<p>Direction uVision -> microcontroller system:</p>
|
||||
<ul>
|
||||
<li>Check if <strong>ITM_RxBuffer</strong> variable is available (only performed once).</li>
|
||||
<li>Read character from <strong>Debug (printf) Viewer</strong> window.</li>
|
||||
<li>If <strong>ITM_RxBuffer</strong> empty write character to <strong>ITM_RxBuffer</strong>.</li>
|
||||
</ul>
|
||||
|
||||
<p class="Note">Note</p>
|
||||
<ul>
|
||||
<li><p>Current solution does not use a buffer machanism for trasmitting the characters.</p>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h2>RTX Kernel awareness in uVision</h2>
|
||||
<p>
|
||||
uVision / RTX are using a simple and efficient solution for RTX Kernel awareness.
|
||||
No format overhead is necessary.<br>
|
||||
uVsion debugger decodes the RTX events via the 32 / 16 / 8 bit ITM write access
|
||||
to ITM communication channel 31.
|
||||
</p>
|
||||
|
||||
<p>Following RTX events are traced:</p>
|
||||
<ul>
|
||||
<li>Task Create / Delete event
|
||||
<ol>
|
||||
<li>32 bit access. Task start address is transmitted</li>
|
||||
<li>16 bit access. Task ID and Create/Delete flag are transmitted<br>
|
||||
High byte holds Create/Delete flag, Low byte holds TASK ID.
|
||||
</li>
|
||||
</ol>
|
||||
</li>
|
||||
<li>Task switch event
|
||||
<ol>
|
||||
<li>8 bit access. Task ID of current task is transmitted</li>
|
||||
</ol>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<p class="Note">Note</p>
|
||||
<ul>
|
||||
<li><p>Other RTOS information could be retrieved via memory read access in a polling mode manner.</p>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<p class="MsoNormal"><span lang="EN-GB"> </span></p>
|
||||
|
||||
<hr>
|
||||
|
||||
<p class="TinyT">Copyright © KEIL - An ARM Company.<br>
|
||||
All rights reserved.<br>
|
||||
Visit our web site at <a href="http://www.keil.com">www.keil.com</a>.
|
||||
</p>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
File diff suppressed because it is too large
Load diff
Binary file not shown.
|
@ -1,126 +0,0 @@
|
|||
/*
|
||||
FreeRTOS V9.0.0rc2 - Copyright (C) 2016 Real Time Engineers Ltd.
|
||||
All rights reserved
|
||||
|
||||
VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.
|
||||
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
FreeRTOS is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License (version 2) as published by the
|
||||
Free Software Foundation >>>> AND MODIFIED BY <<<< the FreeRTOS exception.
|
||||
|
||||
***************************************************************************
|
||||
>>! NOTE: The modification to the GPL is included to allow you to !<<
|
||||
>>! distribute a combined work that includes FreeRTOS without being !<<
|
||||
>>! obliged to provide the source code for proprietary components !<<
|
||||
>>! outside of the FreeRTOS kernel. !<<
|
||||
***************************************************************************
|
||||
|
||||
FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
FOR A PARTICULAR PURPOSE. Full license text is available on the following
|
||||
link: http://www.freertos.org/a00114.html
|
||||
|
||||
***************************************************************************
|
||||
* *
|
||||
* FreeRTOS provides completely free yet professionally developed, *
|
||||
* robust, strictly quality controlled, supported, and cross *
|
||||
* platform software that is more than just the market leader, it *
|
||||
* is the industry's de facto standard. *
|
||||
* *
|
||||
* Help yourself get started quickly while simultaneously helping *
|
||||
* to support the FreeRTOS project by purchasing a FreeRTOS *
|
||||
* tutorial book, reference manual, or both: *
|
||||
* http://www.FreeRTOS.org/Documentation *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
http://www.FreeRTOS.org/FAQHelp.html - Having a problem? Start by reading
|
||||
the FAQ page "My application does not run, what could be wrong?". Have you
|
||||
defined configASSERT()?
|
||||
|
||||
http://www.FreeRTOS.org/support - In return for receiving this top quality
|
||||
embedded software for free we request you assist our global community by
|
||||
participating in the support forum.
|
||||
|
||||
http://www.FreeRTOS.org/training - Investing in training allows your team to
|
||||
be as productive as possible as early as possible. Now you can receive
|
||||
FreeRTOS training directly from Richard Barry, CEO of Real Time Engineers
|
||||
Ltd, and the world's leading authority on the world's leading RTOS.
|
||||
|
||||
http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,
|
||||
including FreeRTOS+Trace - an indispensable productivity tool, a DOS
|
||||
compatible FAT file system, and our tiny thread aware UDP/IP stack.
|
||||
|
||||
http://www.FreeRTOS.org/labs - Where new FreeRTOS products go to incubate.
|
||||
Come and try FreeRTOS+TCP, our new open source TCP/IP stack for FreeRTOS.
|
||||
|
||||
http://www.OpenRTOS.com - Real Time Engineers ltd. license FreeRTOS to High
|
||||
Integrity Systems ltd. to sell under the OpenRTOS brand. Low cost OpenRTOS
|
||||
licenses offer ticketed support, indemnification and commercial middleware.
|
||||
|
||||
http://www.SafeRTOS.com - High Integrity Systems also provide a safety
|
||||
engineered and independently SIL3 certified version for use in safety and
|
||||
mission critical applications that require provable dependability.
|
||||
|
||||
1 tab == 4 spaces!
|
||||
*/
|
||||
|
||||
#ifndef FREERTOS_CONFIG_H
|
||||
#define FREERTOS_CONFIG_H
|
||||
|
||||
/*-----------------------------------------------------------
|
||||
* Application specific definitions.
|
||||
*
|
||||
* These definitions should be adjusted for your particular hardware and
|
||||
* application requirements.
|
||||
*
|
||||
* THESE PARAMETERS ARE DESCRIBED WITHIN THE 'CONFIGURATION' SECTION OF THE
|
||||
* FreeRTOS API DOCUMENTATION AVAILABLE ON THE FreeRTOS.org WEB SITE.
|
||||
*
|
||||
* See http://www.freertos.org/a00110.html.
|
||||
*----------------------------------------------------------*/
|
||||
|
||||
#define configUSE_PREEMPTION 1
|
||||
#define configUSE_IDLE_HOOK 1
|
||||
#define configUSE_TICK_HOOK 0
|
||||
#define configCPU_CLOCK_HZ ( 14000000UL )
|
||||
#define configTICK_RATE_HZ ( ( TickType_t ) 100 )
|
||||
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 70 )
|
||||
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 10 * 1024 ) )
|
||||
#define configMAX_TASK_NAME_LEN ( 10 )
|
||||
#define configUSE_TRACE_FACILITY 0
|
||||
#define configUSE_16_BIT_TICKS 0
|
||||
#define configIDLE_SHOULD_YIELD 0
|
||||
#define configUSE_CO_ROUTINES 1
|
||||
#define configUSE_MUTEXES 1
|
||||
|
||||
#define configMAX_PRIORITIES ( 4 )
|
||||
#define configMAX_CO_ROUTINE_PRIORITIES ( 2 )
|
||||
|
||||
#define configUSE_COUNTING_SEMAPHORES 0
|
||||
#define configUSE_ALTERNATIVE_API 0
|
||||
#define configCHECK_FOR_STACK_OVERFLOW 2
|
||||
#define configUSE_RECURSIVE_MUTEXES 1
|
||||
#define configQUEUE_REGISTRY_SIZE 0
|
||||
#define configGENERATE_RUN_TIME_STATS 0
|
||||
|
||||
/* Set the following definitions to 1 to include the API function, or zero
|
||||
to exclude the API function. */
|
||||
#define INCLUDE_vTaskPrioritySet 1
|
||||
#define INCLUDE_uxTaskPriorityGet 1
|
||||
#define INCLUDE_vTaskDelete 0
|
||||
#define INCLUDE_vTaskCleanUpResources 0
|
||||
#define INCLUDE_vTaskSuspend 1
|
||||
#define INCLUDE_vTaskDelayUntil 1
|
||||
#define INCLUDE_vTaskDelay 1
|
||||
|
||||
|
||||
#define configKERNEL_INTERRUPT_PRIORITY 255
|
||||
/* !!!! configMAX_SYSCALL_INTERRUPT_PRIORITY must not be set to zero !!!!
|
||||
See http://www.FreeRTOS.org/RTOS-Cortex-M3-M4.html. */
|
||||
#define configMAX_SYSCALL_INTERRUPT_PRIORITY 191 /* equivalent to 0xa0, or priority 5. */
|
||||
|
||||
|
||||
#endif /* FREERTOS_CONFIG_H */
|
|
@ -1,125 +0,0 @@
|
|||
/*
|
||||
FreeRTOS V9.0.0rc2 - Copyright (C) 2016 Real Time Engineers Ltd.
|
||||
All rights reserved
|
||||
|
||||
VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.
|
||||
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
FreeRTOS is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License (version 2) as published by the
|
||||
Free Software Foundation >>>> AND MODIFIED BY <<<< the FreeRTOS exception.
|
||||
|
||||
***************************************************************************
|
||||
>>! NOTE: The modification to the GPL is included to allow you to !<<
|
||||
>>! distribute a combined work that includes FreeRTOS without being !<<
|
||||
>>! obliged to provide the source code for proprietary components !<<
|
||||
>>! outside of the FreeRTOS kernel. !<<
|
||||
***************************************************************************
|
||||
|
||||
FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
FOR A PARTICULAR PURPOSE. Full license text is available on the following
|
||||
link: http://www.freertos.org/a00114.html
|
||||
|
||||
***************************************************************************
|
||||
* *
|
||||
* FreeRTOS provides completely free yet professionally developed, *
|
||||
* robust, strictly quality controlled, supported, and cross *
|
||||
* platform software that is more than just the market leader, it *
|
||||
* is the industry's de facto standard. *
|
||||
* *
|
||||
* Help yourself get started quickly while simultaneously helping *
|
||||
* to support the FreeRTOS project by purchasing a FreeRTOS *
|
||||
* tutorial book, reference manual, or both: *
|
||||
* http://www.FreeRTOS.org/Documentation *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
http://www.FreeRTOS.org/FAQHelp.html - Having a problem? Start by reading
|
||||
the FAQ page "My application does not run, what could be wrong?". Have you
|
||||
defined configASSERT()?
|
||||
|
||||
http://www.FreeRTOS.org/support - In return for receiving this top quality
|
||||
embedded software for free we request you assist our global community by
|
||||
participating in the support forum.
|
||||
|
||||
http://www.FreeRTOS.org/training - Investing in training allows your team to
|
||||
be as productive as possible as early as possible. Now you can receive
|
||||
FreeRTOS training directly from Richard Barry, CEO of Real Time Engineers
|
||||
Ltd, and the world's leading authority on the world's leading RTOS.
|
||||
|
||||
http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,
|
||||
including FreeRTOS+Trace - an indispensable productivity tool, a DOS
|
||||
compatible FAT file system, and our tiny thread aware UDP/IP stack.
|
||||
|
||||
http://www.FreeRTOS.org/labs - Where new FreeRTOS products go to incubate.
|
||||
Come and try FreeRTOS+TCP, our new open source TCP/IP stack for FreeRTOS.
|
||||
|
||||
http://www.OpenRTOS.com - Real Time Engineers ltd. license FreeRTOS to High
|
||||
Integrity Systems ltd. to sell under the OpenRTOS brand. Low cost OpenRTOS
|
||||
licenses offer ticketed support, indemnification and commercial middleware.
|
||||
|
||||
http://www.SafeRTOS.com - High Integrity Systems also provide a safety
|
||||
engineered and independently SIL3 certified version for use in safety and
|
||||
mission critical applications that require provable dependability.
|
||||
|
||||
1 tab == 4 spaces!
|
||||
*/
|
||||
|
||||
/* Scheduler includes. */
|
||||
#include "FreeRTOS.h"
|
||||
#include "task.h"
|
||||
|
||||
/* Demo app includes. */
|
||||
#include "partest.h"
|
||||
|
||||
/* Library includes. */
|
||||
#include "dvk.h"
|
||||
|
||||
void vParTestInitialise( void )
|
||||
{
|
||||
DVK_init();
|
||||
DVK_setLEDs( 0 );
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
void vParTestSetLED( unsigned portBASE_TYPE uxLED, signed portBASE_TYPE xValue )
|
||||
{
|
||||
unsigned long ulLEDs;
|
||||
|
||||
/* Suspend all other tasks, in order to make sure no other tasks excecutes
|
||||
this code at the same time. */
|
||||
vTaskSuspendAll();
|
||||
{
|
||||
ulLEDs = DVK_getLEDs();
|
||||
|
||||
if( xValue == pdTRUE )
|
||||
{
|
||||
/* Turn the LED on if xValue is true. */
|
||||
ulLEDs = ulLEDs | ( 1 << uxLED );
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Turn the LED off if xValue is not true. */
|
||||
ulLEDs &= ~( 1 << uxLED );
|
||||
}
|
||||
|
||||
DVK_setLEDs( ulLEDs );
|
||||
}
|
||||
xTaskResumeAll();
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
void vParTestToggleLED( unsigned portBASE_TYPE uxLED )
|
||||
{
|
||||
unsigned long ulLEDs;
|
||||
|
||||
vTaskSuspendAll();
|
||||
{
|
||||
ulLEDs = DVK_getLEDs();
|
||||
ulLEDs = ulLEDs ^ ( 1 << uxLED );
|
||||
DVK_setLEDs( ulLEDs );
|
||||
}
|
||||
xTaskResumeAll();
|
||||
}
|
|
@ -1,879 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
|
||||
<project>
|
||||
<fileVersion>2</fileVersion>
|
||||
<configuration>
|
||||
<name>Debug</name>
|
||||
<toolchain>
|
||||
<name>ARM</name>
|
||||
</toolchain>
|
||||
<debug>1</debug>
|
||||
<settings>
|
||||
<name>C-SPY</name>
|
||||
<archiveVersion>2</archiveVersion>
|
||||
<data>
|
||||
<version>22</version>
|
||||
<wantNonLocal>1</wantNonLocal>
|
||||
<debug>1</debug>
|
||||
<option>
|
||||
<name>CInput</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CEndian</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CProcessor</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCVariant</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>MacOverride</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>MacFile</name>
|
||||
<state></state>
|
||||
</option>
|
||||
<option>
|
||||
<name>MemOverride</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>MemFile</name>
|
||||
<state>$TOOLKIT_DIR$\CONFIG\debugger\EnergyMicro\EFM32G890F128.ddf</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>RunToEnable</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>RunToName</name>
|
||||
<state>main</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CExtraOptionsCheck</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CExtraOptions</name>
|
||||
<state></state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CFpuProcessor</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCDDFArgumentProducer</name>
|
||||
<state></state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCDownloadSuppressDownload</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCDownloadVerifyAll</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCProductVersion</name>
|
||||
<state>5.41.2.51798</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCDynDriverList</name>
|
||||
<state>JLINK_ID</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCLastSavedByProductVersion</name>
|
||||
<state>6.20.1.52589</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCDownloadAttachToProgram</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>UseFlashLoader</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CLowLevel</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCBE8Slave</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>MacFile2</name>
|
||||
<state></state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CDevice</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>FlashLoadersV3</name>
|
||||
<state>$TOOLKIT_DIR$\config\flashloader\EnergyMicro\FlashEFM32.board</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCImagesSuppressCheck1</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCImagesPath1</name>
|
||||
<state></state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCImagesSuppressCheck2</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCImagesPath2</name>
|
||||
<state></state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCImagesSuppressCheck3</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCImagesPath3</name>
|
||||
<state></state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OverrideDefFlashBoard</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCImagesOffset1</name>
|
||||
<state></state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCImagesOffset2</name>
|
||||
<state></state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCImagesOffset3</name>
|
||||
<state></state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCImagesUse1</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCImagesUse2</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCImagesUse3</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
</data>
|
||||
</settings>
|
||||
<settings>
|
||||
<name>ARMSIM_ID</name>
|
||||
<archiveVersion>2</archiveVersion>
|
||||
<data>
|
||||
<version>1</version>
|
||||
<wantNonLocal>1</wantNonLocal>
|
||||
<debug>1</debug>
|
||||
<option>
|
||||
<name>OCSimDriverInfo</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCSimEnablePSP</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCSimPspOverrideConfig</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCSimPspConfigFile</name>
|
||||
<state></state>
|
||||
</option>
|
||||
</data>
|
||||
</settings>
|
||||
<settings>
|
||||
<name>ANGEL_ID</name>
|
||||
<archiveVersion>2</archiveVersion>
|
||||
<data>
|
||||
<version>0</version>
|
||||
<wantNonLocal>1</wantNonLocal>
|
||||
<debug>1</debug>
|
||||
<option>
|
||||
<name>CCAngelHeartbeat</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CAngelCommunication</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CAngelCommBaud</name>
|
||||
<version>0</version>
|
||||
<state>3</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CAngelCommPort</name>
|
||||
<version>0</version>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>ANGELTCPIP</name>
|
||||
<state>aaa.bbb.ccc.ddd</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>DoAngelLogfile</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>AngelLogFile</name>
|
||||
<state>$PROJ_DIR$\cspycomm.log</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCDriverInfo</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
</data>
|
||||
</settings>
|
||||
<settings>
|
||||
<name>GDBSERVER_ID</name>
|
||||
<archiveVersion>2</archiveVersion>
|
||||
<data>
|
||||
<version>0</version>
|
||||
<wantNonLocal>1</wantNonLocal>
|
||||
<debug>1</debug>
|
||||
<option>
|
||||
<name>OCDriverInfo</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>TCPIP</name>
|
||||
<state>aaa.bbb.ccc.ddd</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>DoLogfile</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>LogFile</name>
|
||||
<state>$PROJ_DIR$\cspycomm.log</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCJTagBreakpointRadio</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCJTagDoUpdateBreakpoints</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCJTagUpdateBreakpoints</name>
|
||||
<state>main</state>
|
||||
</option>
|
||||
</data>
|
||||
</settings>
|
||||
<settings>
|
||||
<name>IARROM_ID</name>
|
||||
<archiveVersion>2</archiveVersion>
|
||||
<data>
|
||||
<version>1</version>
|
||||
<wantNonLocal>1</wantNonLocal>
|
||||
<debug>1</debug>
|
||||
<option>
|
||||
<name>CRomLogFileCheck</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CRomLogFileEditB</name>
|
||||
<state>$PROJ_DIR$\cspycomm.log</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CRomCommPort</name>
|
||||
<version>0</version>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CRomCommBaud</name>
|
||||
<version>0</version>
|
||||
<state>7</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCDriverInfo</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
</data>
|
||||
</settings>
|
||||
<settings>
|
||||
<name>JLINK_ID</name>
|
||||
<archiveVersion>2</archiveVersion>
|
||||
<data>
|
||||
<version>13</version>
|
||||
<wantNonLocal>1</wantNonLocal>
|
||||
<debug>1</debug>
|
||||
<option>
|
||||
<name>JLinkSpeed</name>
|
||||
<state>32</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCJLinkDoLogfile</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCJLinkLogFile</name>
|
||||
<state>$PROJ_DIR$\cspycomm.log</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCJLinkHWResetDelay</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCDriverInfo</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>JLinkInitialSpeed</name>
|
||||
<state>32</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCDoJlinkMultiTarget</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCScanChainNonARMDevices</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCJLinkMultiTarget</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCJLinkIRLength</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCJLinkCommRadio</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCJLinkTCPIP</name>
|
||||
<state>aaa.bbb.ccc.ddd</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCJLinkSpeedRadioV2</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCUSBDevice</name>
|
||||
<version>1</version>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCRDICatchReset</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCRDICatchUndef</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCRDICatchSWI</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCRDICatchData</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCRDICatchPrefetch</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCRDICatchIRQ</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCRDICatchFIQ</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCJLinkBreakpointRadio</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCJLinkDoUpdateBreakpoints</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCJLinkUpdateBreakpoints</name>
|
||||
<state>main</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCJLinkInterfaceRadio</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCJLinkAttachSlave</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCJLinkResetList</name>
|
||||
<version>5</version>
|
||||
<state>7</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCJLinkInterfaceCmdLine</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCCatchCORERESET</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCCatchMMERR</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCCatchNOCPERR</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCCatchCHRERR</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCCatchSTATERR</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCCatchBUSERR</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCCatchINTERR</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCCatchHARDERR</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCCatchDummy</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCJLinkScriptFile</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCJLinkUsbSerialNo</name>
|
||||
<state></state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCTcpIpAlt</name>
|
||||
<version>0</version>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCJLinkTcpIpSerialNo</name>
|
||||
<state></state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCCpuClockEdit</name>
|
||||
<state>72.0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCSwoClockAuto</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCSwoClockEdit</name>
|
||||
<state>2000</state>
|
||||
</option>
|
||||
</data>
|
||||
</settings>
|
||||
<settings>
|
||||
<name>LMIFTDI_ID</name>
|
||||
<archiveVersion>2</archiveVersion>
|
||||
<data>
|
||||
<version>2</version>
|
||||
<wantNonLocal>1</wantNonLocal>
|
||||
<debug>1</debug>
|
||||
<option>
|
||||
<name>OCDriverInfo</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>LmiftdiSpeed</name>
|
||||
<state>500</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCLmiftdiDoLogfile</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCLmiftdiLogFile</name>
|
||||
<state>$PROJ_DIR$\cspycomm.log</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCLmiFtdiInterfaceRadio</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCLmiFtdiInterfaceCmdLine</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
</data>
|
||||
</settings>
|
||||
<settings>
|
||||
<name>MACRAIGOR_ID</name>
|
||||
<archiveVersion>2</archiveVersion>
|
||||
<data>
|
||||
<version>3</version>
|
||||
<wantNonLocal>1</wantNonLocal>
|
||||
<debug>1</debug>
|
||||
<option>
|
||||
<name>jtag</name>
|
||||
<version>0</version>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>EmuSpeed</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>TCPIP</name>
|
||||
<state>aaa.bbb.ccc.ddd</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>DoLogfile</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>LogFile</name>
|
||||
<state>$PROJ_DIR$\cspycomm.log</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>DoEmuMultiTarget</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>EmuMultiTarget</name>
|
||||
<state>0@ARM7TDMI</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>EmuHWReset</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CEmuCommBaud</name>
|
||||
<version>0</version>
|
||||
<state>4</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CEmuCommPort</name>
|
||||
<version>0</version>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>jtago</name>
|
||||
<version>0</version>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCDriverInfo</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>UnusedAddr</name>
|
||||
<state>0x00800000</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCMacraigorHWResetDelay</name>
|
||||
<state></state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCJTagBreakpointRadio</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCJTagDoUpdateBreakpoints</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCJTagUpdateBreakpoints</name>
|
||||
<state>main</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCMacraigorInterfaceRadio</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCMacraigorInterfaceCmdLine</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
</data>
|
||||
</settings>
|
||||
<settings>
|
||||
<name>PEMICRO_ID</name>
|
||||
<archiveVersion>2</archiveVersion>
|
||||
<data>
|
||||
<version>0</version>
|
||||
<wantNonLocal>1</wantNonLocal>
|
||||
<debug>1</debug>
|
||||
<option>
|
||||
<name>OCDriverInfo</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCPEMicroAttachSlave</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCPEMicroInterfaceList</name>
|
||||
<version>0</version>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCPEMicroResetDelay</name>
|
||||
<state></state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCPEMicroJtagSpeed</name>
|
||||
<state>#UNINITIALIZED#</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCJPEMicroShowSettings</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>DoLogfile</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>LogFile</name>
|
||||
<state>$PROJ_DIR$\cspycomm.log</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCPEMicroUSBDevice</name>
|
||||
<version>0</version>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCPEMicroSerialPort</name>
|
||||
<version>0</version>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCJPEMicroTCPIPAutoScanNetwork</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCPEMicroTCPIP</name>
|
||||
<state>10.0.0.1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCPEMicroCommCmdLineProducer</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
</data>
|
||||
</settings>
|
||||
<settings>
|
||||
<name>RDI_ID</name>
|
||||
<archiveVersion>2</archiveVersion>
|
||||
<data>
|
||||
<version>2</version>
|
||||
<wantNonLocal>1</wantNonLocal>
|
||||
<debug>1</debug>
|
||||
<option>
|
||||
<name>CRDIDriverDll</name>
|
||||
<state>###Uninitialized###</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CRDILogFileCheck</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CRDILogFileEdit</name>
|
||||
<state>$PROJ_DIR$\cspycomm.log</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCRDIHWReset</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCRDICatchReset</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCRDICatchUndef</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCRDICatchSWI</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCRDICatchData</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCRDICatchPrefetch</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCRDICatchIRQ</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCRDICatchFIQ</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCDriverInfo</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
</data>
|
||||
</settings>
|
||||
<settings>
|
||||
<name>STLINK_ID</name>
|
||||
<archiveVersion>2</archiveVersion>
|
||||
<data>
|
||||
<version>2</version>
|
||||
<wantNonLocal>1</wantNonLocal>
|
||||
<debug>1</debug>
|
||||
<option>
|
||||
<name>OCDriverInfo</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCSTLinkInterfaceRadio</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCSTLinkInterfaceCmdLine</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCSTLinkResetList</name>
|
||||
<version>1</version>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCCpuClockEdit</name>
|
||||
<state>72.0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCSwoClockAuto</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCSwoClockEdit</name>
|
||||
<state>2000</state>
|
||||
</option>
|
||||
</data>
|
||||
</settings>
|
||||
<settings>
|
||||
<name>THIRDPARTY_ID</name>
|
||||
<archiveVersion>2</archiveVersion>
|
||||
<data>
|
||||
<version>0</version>
|
||||
<wantNonLocal>1</wantNonLocal>
|
||||
<debug>1</debug>
|
||||
<option>
|
||||
<name>CThirdPartyDriverDll</name>
|
||||
<state>###Uninitialized###</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CThirdPartyLogFileCheck</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CThirdPartyLogFileEditB</name>
|
||||
<state>$PROJ_DIR$\cspycomm.log</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCDriverInfo</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
</data>
|
||||
</settings>
|
||||
<debuggerPlugins>
|
||||
<plugin>
|
||||
<file>$TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin</file>
|
||||
<loadFlag>0</loadFlag>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<file>$TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin</file>
|
||||
<loadFlag>0</loadFlag>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<file>$TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin</file>
|
||||
<loadFlag>0</loadFlag>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<file>$TOOLKIT_DIR$\plugins\rtos\MQX\MQXRtosPlugin.ewplugin</file>
|
||||
<loadFlag>0</loadFlag>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<file>$TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin</file>
|
||||
<loadFlag>0</loadFlag>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<file>$TOOLKIT_DIR$\plugins\rtos\PowerPac\PowerPacRTOS.ewplugin</file>
|
||||
<loadFlag>0</loadFlag>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<file>$TOOLKIT_DIR$\plugins\rtos\Quadros\Quadros_EWB6_Plugin.ewplugin</file>
|
||||
<loadFlag>0</loadFlag>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<file>$TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin</file>
|
||||
<loadFlag>0</loadFlag>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<file>$TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin</file>
|
||||
<loadFlag>0</loadFlag>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<file>$TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin</file>
|
||||
<loadFlag>0</loadFlag>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<file>$TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin</file>
|
||||
<loadFlag>0</loadFlag>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<file>$EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin</file>
|
||||
<loadFlag>1</loadFlag>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<file>$EW_DIR$\common\plugins\FreeRTOS\FreeRTOSPlugin.ewplugin</file>
|
||||
<loadFlag>0</loadFlag>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<file>$EW_DIR$\common\plugins\OpenRTOS\OpenRTOSPlugin.ewplugin</file>
|
||||
<loadFlag>0</loadFlag>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<file>$EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin</file>
|
||||
<loadFlag>0</loadFlag>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<file>$EW_DIR$\common\plugins\Stack\Stack.ENU.ewplugin</file>
|
||||
<loadFlag>1</loadFlag>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<file>$EW_DIR$\common\plugins\SymList\SymList.ENU.ewplugin</file>
|
||||
<loadFlag>1</loadFlag>
|
||||
</plugin>
|
||||
</debuggerPlugins>
|
||||
</configuration>
|
||||
</project>
|
||||
|
||||
|
|
@ -1,995 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
|
||||
<project>
|
||||
<fileVersion>2</fileVersion>
|
||||
<configuration>
|
||||
<name>Debug</name>
|
||||
<toolchain>
|
||||
<name>ARM</name>
|
||||
</toolchain>
|
||||
<debug>1</debug>
|
||||
<settings>
|
||||
<name>General</name>
|
||||
<archiveVersion>3</archiveVersion>
|
||||
<data>
|
||||
<version>21</version>
|
||||
<wantNonLocal>1</wantNonLocal>
|
||||
<debug>1</debug>
|
||||
<option>
|
||||
<name>ExePath</name>
|
||||
<state>Debug\Exe</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>ObjPath</name>
|
||||
<state>Debug\Obj</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>ListPath</name>
|
||||
<state>Debug\List</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>Variant</name>
|
||||
<version>19</version>
|
||||
<state>37</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>GEndianMode</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>Input variant</name>
|
||||
<version>3</version>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>Input description</name>
|
||||
<state>Full formatting.</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>Output variant</name>
|
||||
<version>2</version>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>Output description</name>
|
||||
<state>Full formatting.</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>GOutputBinary</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>FPU</name>
|
||||
<version>2</version>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OGCoreOrChip</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>GRuntimeLibSelect</name>
|
||||
<version>0</version>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>GRuntimeLibSelectSlave</name>
|
||||
<version>0</version>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>RTDescription</name>
|
||||
<state>Use the normal configuration of the C/C++ runtime library. No locale interface, C locale, no file descriptor support, no multibytes in printf and scanf, and no hex floats in strtod.</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OGProductVersion</name>
|
||||
<state>5.41.0.51757</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OGLastSavedByProductVersion</name>
|
||||
<state>6.20.1.52589</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>GeneralEnableMisra</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>GeneralMisraVerbose</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OGChipSelectEditMenu</name>
|
||||
<state>EFM32G890F128 EnergyMicro EFM32G890F128</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>GenLowLevelInterface</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>GEndianModeBE</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OGBufferedTerminalOutput</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>GenStdoutInterface</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>GeneralMisraRules98</name>
|
||||
<version>0</version>
|
||||
<state>1000111110110101101110011100111111101110011011000101110111101101100111111111111100110011111001110111001111111111111111111111111</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>GeneralMisraVer</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>GeneralMisraRules04</name>
|
||||
<version>0</version>
|
||||
<state>111101110010111111111000110111111111111111111111111110010111101111010101111111111111111111111111101111111011111001111011111011111111111111111</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>RTConfigPath2</name>
|
||||
<state>$TOOLKIT_DIR$\INC\c\DLib_Config_Normal.h</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>GFPUCoreSlave</name>
|
||||
<version>19</version>
|
||||
<state>37</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>GBECoreSlave</name>
|
||||
<version>19</version>
|
||||
<state>37</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OGUseCmsis</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OGUseCmsisDspLib</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
</data>
|
||||
</settings>
|
||||
<settings>
|
||||
<name>ICCARM</name>
|
||||
<archiveVersion>2</archiveVersion>
|
||||
<data>
|
||||
<version>28</version>
|
||||
<wantNonLocal>1</wantNonLocal>
|
||||
<debug>1</debug>
|
||||
<option>
|
||||
<name>CCDefines</name>
|
||||
<state>EFM32G890F128</state>
|
||||
<state>IAR_ARM_CM3</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCPreprocFile</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCPreprocComments</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCPreprocLine</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCListCFile</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCListCMnemonics</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCListCMessages</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCListAssFile</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCListAssSource</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCEnableRemarks</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCDiagSuppress</name>
|
||||
<state>Pa082</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCDiagRemark</name>
|
||||
<state></state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCDiagWarning</name>
|
||||
<state></state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCDiagError</name>
|
||||
<state></state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCObjPrefix</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCAllowList</name>
|
||||
<version>1</version>
|
||||
<state>0000000</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCDebugInfo</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>IEndianMode</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>IProcessor</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>IExtraOptionsCheck</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>IExtraOptions</name>
|
||||
<state></state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCLangConformance</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCSignedPlainChar</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCRequirePrototypes</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCMultibyteSupport</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCDiagWarnAreErr</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCCompilerRuntimeInfo</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>IFpuProcessor</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OutputFile</name>
|
||||
<state>$FILE_BNAME$.o</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCLibConfigHeader</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>PreInclude</name>
|
||||
<state></state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CompilerMisraOverride</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCIncludePath2</name>
|
||||
<state>$PROJ_DIR$\</state>
|
||||
<state>$PROJ_DIR$\..\common\include</state>
|
||||
<state>$PROJ_DIR$\..\..\Source\include</state>
|
||||
<state>$PROJ_DIR$\lcd</state>
|
||||
<state>$PROJ_DIR$\CMSIS\CM3\CoreSupport</state>
|
||||
<state>$PROJ_DIR$\CMSIS\CM3\DeviceSupport\EnergyMicro\EFM32</state>
|
||||
<state>$PROJ_DIR$\bsp</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCStdIncCheck</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCCodeSection</name>
|
||||
<state>.text</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>IInterwork2</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>IProcessorMode2</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCOptLevel</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCOptStrategy</name>
|
||||
<version>0</version>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCOptLevelSlave</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CompilerMisraRules98</name>
|
||||
<version>0</version>
|
||||
<state>1000111110110101101110011100111111101110011011000101110111101101100111111111111100110011111001110111001111111111111111111111111</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CompilerMisraRules04</name>
|
||||
<version>0</version>
|
||||
<state>111101110010111111111000110111111111111111111111111110010111101111010101111111111111111111111111101111111011111001111011111011111111111111111</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCPosIndRopi</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCPosIndRwpi</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCPosIndNoDynInit</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>IccLang</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>IccCDialect</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>IccAllowVLA</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>IccCppDialect</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>IccExceptions</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>IccRTTI</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>IccStaticDestr</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>IccCppInlineSemantics</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>IccCmsis</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>IccFloatSemantics</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
</data>
|
||||
</settings>
|
||||
<settings>
|
||||
<name>AARM</name>
|
||||
<archiveVersion>2</archiveVersion>
|
||||
<data>
|
||||
<version>8</version>
|
||||
<wantNonLocal>1</wantNonLocal>
|
||||
<debug>1</debug>
|
||||
<option>
|
||||
<name>AObjPrefix</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>AEndian</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>ACaseSensitivity</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>MacroChars</name>
|
||||
<version>0</version>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>AWarnEnable</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>AWarnWhat</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>AWarnOne</name>
|
||||
<state></state>
|
||||
</option>
|
||||
<option>
|
||||
<name>AWarnRange1</name>
|
||||
<state></state>
|
||||
</option>
|
||||
<option>
|
||||
<name>AWarnRange2</name>
|
||||
<state></state>
|
||||
</option>
|
||||
<option>
|
||||
<name>ADebug</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>AltRegisterNames</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>ADefines</name>
|
||||
<state></state>
|
||||
</option>
|
||||
<option>
|
||||
<name>AList</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>AListHeader</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>AListing</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>Includes</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>MacDefs</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>MacExps</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>MacExec</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OnlyAssed</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>MultiLine</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>PageLengthCheck</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>PageLength</name>
|
||||
<state>80</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>TabSpacing</name>
|
||||
<state>8</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>AXRef</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>AXRefDefines</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>AXRefInternal</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>AXRefDual</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>AProcessor</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>AFpuProcessor</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>AOutputFile</name>
|
||||
<state>$FILE_BNAME$.o</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>AMultibyteSupport</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>ALimitErrorsCheck</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>ALimitErrorsEdit</name>
|
||||
<state>100</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>AIgnoreStdInclude</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>AUserIncludes</name>
|
||||
<state>$PROJ_DIR$\</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>AExtraOptionsCheckV2</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>AExtraOptionsV2</name>
|
||||
<state></state>
|
||||
</option>
|
||||
</data>
|
||||
</settings>
|
||||
<settings>
|
||||
<name>OBJCOPY</name>
|
||||
<archiveVersion>0</archiveVersion>
|
||||
<data>
|
||||
<version>1</version>
|
||||
<wantNonLocal>1</wantNonLocal>
|
||||
<debug>1</debug>
|
||||
<option>
|
||||
<name>OOCOutputFormat</name>
|
||||
<version>2</version>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCOutputOverride</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OOCOutputFile</name>
|
||||
<state>RTOSDemo.srec</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OOCCommandLineProducer</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OOCObjCopyEnable</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
</data>
|
||||
</settings>
|
||||
<settings>
|
||||
<name>CUSTOM</name>
|
||||
<archiveVersion>3</archiveVersion>
|
||||
<data>
|
||||
<extensions></extensions>
|
||||
<cmdline></cmdline>
|
||||
</data>
|
||||
</settings>
|
||||
<settings>
|
||||
<name>BICOMP</name>
|
||||
<archiveVersion>0</archiveVersion>
|
||||
<data/>
|
||||
</settings>
|
||||
<settings>
|
||||
<name>BUILDACTION</name>
|
||||
<archiveVersion>1</archiveVersion>
|
||||
<data>
|
||||
<prebuild></prebuild>
|
||||
<postbuild></postbuild>
|
||||
</data>
|
||||
</settings>
|
||||
<settings>
|
||||
<name>ILINK</name>
|
||||
<archiveVersion>0</archiveVersion>
|
||||
<data>
|
||||
<version>13</version>
|
||||
<wantNonLocal>1</wantNonLocal>
|
||||
<debug>1</debug>
|
||||
<option>
|
||||
<name>IlinkLibIOConfig</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>XLinkMisraHandler</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>IlinkInputFileSlave</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>IlinkOutputFile</name>
|
||||
<state>RTOSDemo.out</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>IlinkDebugInfoEnable</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>IlinkKeepSymbols</name>
|
||||
<state></state>
|
||||
</option>
|
||||
<option>
|
||||
<name>IlinkRawBinaryFile</name>
|
||||
<state></state>
|
||||
</option>
|
||||
<option>
|
||||
<name>IlinkRawBinarySymbol</name>
|
||||
<state></state>
|
||||
</option>
|
||||
<option>
|
||||
<name>IlinkRawBinarySegment</name>
|
||||
<state></state>
|
||||
</option>
|
||||
<option>
|
||||
<name>IlinkRawBinaryAlign</name>
|
||||
<state></state>
|
||||
</option>
|
||||
<option>
|
||||
<name>IlinkDefines</name>
|
||||
<state></state>
|
||||
</option>
|
||||
<option>
|
||||
<name>IlinkConfigDefines</name>
|
||||
<state></state>
|
||||
</option>
|
||||
<option>
|
||||
<name>IlinkMapFile</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>IlinkLogFile</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>IlinkLogInitialization</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>IlinkLogModule</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>IlinkLogSection</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>IlinkLogVeneer</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>IlinkIcfOverride</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>IlinkIcfFile</name>
|
||||
<state>$TOOLKIT_DIR$\config\linker\EnergyMicro\EFM32G290F128.icf</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>IlinkIcfFileSlave</name>
|
||||
<state></state>
|
||||
</option>
|
||||
<option>
|
||||
<name>IlinkEnableRemarks</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>IlinkSuppressDiags</name>
|
||||
<state></state>
|
||||
</option>
|
||||
<option>
|
||||
<name>IlinkTreatAsRem</name>
|
||||
<state></state>
|
||||
</option>
|
||||
<option>
|
||||
<name>IlinkTreatAsWarn</name>
|
||||
<state></state>
|
||||
</option>
|
||||
<option>
|
||||
<name>IlinkTreatAsErr</name>
|
||||
<state></state>
|
||||
</option>
|
||||
<option>
|
||||
<name>IlinkWarningsAreErrors</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>IlinkUseExtraOptions</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>IlinkExtraOptions</name>
|
||||
<state></state>
|
||||
</option>
|
||||
<option>
|
||||
<name>IlinkLowLevelInterfaceSlave</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>IlinkAutoLibEnable</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>IlinkAdditionalLibs</name>
|
||||
<state></state>
|
||||
</option>
|
||||
<option>
|
||||
<name>IlinkOverrideProgramEntryLabel</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>IlinkProgramEntryLabelSelect</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>IlinkProgramEntryLabel</name>
|
||||
<state>__iar_program_start</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>DoFill</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>FillerByte</name>
|
||||
<state>0xFF</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>FillerStart</name>
|
||||
<state>0x0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>FillerEnd</name>
|
||||
<state>0x0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CrcSize</name>
|
||||
<version>0</version>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CrcAlign</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CrcAlgo</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CrcPoly</name>
|
||||
<state>0x11021</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CrcCompl</name>
|
||||
<version>0</version>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CrcBitOrder</name>
|
||||
<version>0</version>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CrcInitialValue</name>
|
||||
<state>0x0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>DoCrc</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>IlinkBE8Slave</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>IlinkBufferedTerminalOutput</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>IlinkStdoutInterfaceSlave</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CrcFullSize</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>IlinkIElfToolPostProcess</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>IlinkLogAutoLibSelect</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>IlinkLogRedirSymbols</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>IlinkLogUnusedFragments</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>IlinkCrcReverseByteOrder</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>IlinkCrcUseAsInput</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>IlinkOptInline</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>IlinkOptExceptionsAllow</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>IlinkOptExceptionsForce</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>IlinkCmsis</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>IlinkOptMergeDuplSections</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>IlinkOptUseVfe</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>IlinkOptForceVfe</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
</data>
|
||||
</settings>
|
||||
<settings>
|
||||
<name>IARCHIVE</name>
|
||||
<archiveVersion>0</archiveVersion>
|
||||
<data>
|
||||
<version>0</version>
|
||||
<wantNonLocal>1</wantNonLocal>
|
||||
<debug>1</debug>
|
||||
<option>
|
||||
<name>IarchiveInputs</name>
|
||||
<state></state>
|
||||
</option>
|
||||
<option>
|
||||
<name>IarchiveOverride</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>IarchiveOutput</name>
|
||||
<state>###Unitialized###</state>
|
||||
</option>
|
||||
</data>
|
||||
</settings>
|
||||
<settings>
|
||||
<name>BILINK</name>
|
||||
<archiveVersion>0</archiveVersion>
|
||||
<data/>
|
||||
</settings>
|
||||
</configuration>
|
||||
<group>
|
||||
<name>Demo</name>
|
||||
<group>
|
||||
<name>Common demo tasks</name>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\..\Common\Minimal\GenQTest.c</name>
|
||||
</file>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\..\Common\Minimal\QPeek.c</name>
|
||||
</file>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\..\Common\Minimal\recmutex.c</name>
|
||||
</file>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\..\Common\Minimal\semtest.c</name>
|
||||
</file>
|
||||
</group>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\lcdtest.c</name>
|
||||
</file>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\ledtest.c</name>
|
||||
</file>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\main.c</name>
|
||||
</file>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\ParTest.c</name>
|
||||
</file>
|
||||
</group>
|
||||
<group>
|
||||
<name>Energy Micro Code</name>
|
||||
<group>
|
||||
<name>bsp</name>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\bsp\dvk.c</name>
|
||||
</file>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\bsp\dvk_boardcontrol.c</name>
|
||||
</file>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\bsp\dvk_ebi.c</name>
|
||||
</file>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\bsp\dvk_spi.c</name>
|
||||
</file>
|
||||
</group>
|
||||
<group>
|
||||
<name>CMSIS</name>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\CMSIS\CM3\CoreSupport\core_cm3.c</name>
|
||||
</file>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\CMSIS\CM3\DeviceSupport\EnergyMicro\EFM32\system_efm32.c</name>
|
||||
</file>
|
||||
</group>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\lcd\lcdcontroller.c</name>
|
||||
</file>
|
||||
</group>
|
||||
<group>
|
||||
<name>FreeRTOS source</name>
|
||||
<group>
|
||||
<name>Port layer</name>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\..\..\Source\portable\IAR\ARM_CM3\port.c</name>
|
||||
</file>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\..\..\Source\portable\IAR\ARM_CM3\portasm.s</name>
|
||||
</file>
|
||||
</group>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\..\..\Source\portable\MemMang\heap_2.c</name>
|
||||
</file>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\..\..\Source\list.c</name>
|
||||
</file>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\..\..\Source\queue.c</name>
|
||||
</file>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\..\..\Source\tasks.c</name>
|
||||
</file>
|
||||
</group>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\startup_efm32.s</name>
|
||||
</file>
|
||||
</project>
|
||||
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
|
||||
<workspace>
|
||||
<project>
|
||||
<path>$WS_DIR$\RTOSDemo.ewp</path>
|
||||
</project>
|
||||
<batchBuild/>
|
||||
</workspace>
|
||||
|
||||
|
8
FreeRTOS/Demo/CORTEX_EFMG890F128_IAR/ReadMe.txt
Normal file
8
FreeRTOS/Demo/CORTEX_EFMG890F128_IAR/ReadMe.txt
Normal file
|
@ -0,0 +1,8 @@
|
|||
If you need the demo that used to be in this directory then download FreeRTOS V8.2.3
|
||||
from http://sourceforge.net/projects/freertos/files/FreeRTOS/
|
||||
|
||||
See the following link for information on newer EFM32 demos:
|
||||
http://www.freertos.org/a00090.html#SILICONLABS
|
||||
|
||||
|
||||
|
|
@ -1,72 +0,0 @@
|
|||
/**************************************************************************//**
|
||||
* @file
|
||||
* @brief Chip initialization, SW workarounds for chip errata issues
|
||||
* @author Energy Micro AS
|
||||
* @version 1.1.1
|
||||
******************************************************************************
|
||||
* @section License
|
||||
* <b>(C) Copyright 2009 Energy Micro AS, http://www.energymicro.com</b>
|
||||
******************************************************************************
|
||||
*
|
||||
* This source code is the property of Energy Micro AS. The source and compiled
|
||||
* code may only be used on Energy Micro "EFM32" microcontrollers.
|
||||
*
|
||||
* This copyright notice may not be removed from the source code nor changed.
|
||||
*
|
||||
* DISCLAIMER OF WARRANTY/LIMITATION OF REMEDIES: Energy Micro AS has no
|
||||
* obligation to support this Software. Energy Micro AS is providing the
|
||||
* Software "AS IS", with no express or implied warranties of any kind,
|
||||
* including, but not limited to, any implied warranties of merchantability
|
||||
* or fitness for any particular purpose or warranties against infringement
|
||||
* of any proprietary rights of a third party.
|
||||
*
|
||||
* Energy Micro AS will not be liable for any consequential, incidental, or
|
||||
* special damages, or any other relief, or for any claim by any third party,
|
||||
* arising from your use of this Software.
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
#ifndef __CHIP_H
|
||||
#define __CHIP_H
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
/**************************************************************************//**
|
||||
* @brief Chip errata workarounds
|
||||
*****************************************************************************/
|
||||
static inline void CHIP_init(void)
|
||||
{
|
||||
uint32_t rev;
|
||||
volatile uint32_t *reg;
|
||||
|
||||
rev = *(volatile uint32_t *)(0x0FE081FC);
|
||||
/* Engineering Sample calibration setup */
|
||||
if ((rev >> 24) == 0)
|
||||
{
|
||||
reg = (volatile uint32_t *) 0x400CA00C;
|
||||
*reg &= ~(0x70UL);
|
||||
/* DREG */
|
||||
reg = (volatile uint32_t *) 0x400C6020;
|
||||
*reg &= ~(0xE0000000UL);
|
||||
*reg |= ~(7 << 25);
|
||||
}
|
||||
if ((rev >> 24) <= 1)
|
||||
{
|
||||
/* DREG */
|
||||
reg = (volatile uint32_t *) 0x400C6020;
|
||||
*reg &= ~(0x00001F80UL);
|
||||
/* Update CMU reset values */
|
||||
reg = (volatile uint32_t *) 0x400C8040;
|
||||
*reg = 0;
|
||||
reg = (volatile uint32_t *) 0x400C8044;
|
||||
*reg = 0;
|
||||
reg = (volatile uint32_t *) 0x400C8058;
|
||||
*reg = 0;
|
||||
reg = (volatile uint32_t *) 0x400C8060;
|
||||
*reg = 0;
|
||||
reg = (volatile uint32_t *) 0x400C8078;
|
||||
*reg = 0;
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
|
@ -1,62 +0,0 @@
|
|||
/**************************************************************************//**
|
||||
* @file
|
||||
* @brief DVK board support package, initialization
|
||||
* @author Energy Micro AS
|
||||
* @version 1.0.1
|
||||
******************************************************************************
|
||||
* @section License
|
||||
* <b>(C) Copyright 2009 Energy Micro AS, http://www.energymicro.com</b>
|
||||
******************************************************************************
|
||||
*
|
||||
* This source code is the property of Energy Micro AS. The source and compiled
|
||||
* code may only be used on Energy Micro "EFM32" microcontrollers.
|
||||
*
|
||||
* This copyright notice may not be removed from the source code nor changed.
|
||||
*
|
||||
* DISCLAIMER OF WARRANTY/LIMITATION OF REMEDIES: Energy Micro AS has no
|
||||
* obligation to support this Software. Energy Micro AS is providing the
|
||||
* Software "AS IS", with no express or implied warranties of any kind,
|
||||
* including, but not limited to, any implied warranties of merchantability
|
||||
* or fitness for any particular purpose or warranties against infringement
|
||||
* of any proprietary rights of a third party.
|
||||
*
|
||||
* Energy Micro AS will not be liable for any consequential, incidental, or
|
||||
* special damages, or any other relief, or for any claim by any third party,
|
||||
* arising from your use of this Software.
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
#include "efm32.h"
|
||||
#include "dvk.h"
|
||||
|
||||
/**************************************************************************//**
|
||||
* @brief Initializes DVK, configures board control access
|
||||
*****************************************************************************/
|
||||
void DVK_init(void)
|
||||
{
|
||||
#ifdef DVK_EBI_CONTROL
|
||||
DVK_EBI_init();
|
||||
#endif
|
||||
#ifdef DVK_SPI_CONTROL
|
||||
DVK_SPI_init();
|
||||
#endif
|
||||
/* Inform AEM application that we are in Energy Mode 0 by default */
|
||||
DVK_setEnergyMode(0);
|
||||
}
|
||||
|
||||
/**************************************************************************//**
|
||||
* @brief Disables DVK, free up resources
|
||||
*****************************************************************************/
|
||||
void DVK_disable(void)
|
||||
{
|
||||
#ifdef DVK_EBI_CONTROL
|
||||
/* Handover bus control */
|
||||
DVK_disableBus();
|
||||
/* Disable EBI interface */
|
||||
DVK_EBI_disable();
|
||||
#endif
|
||||
|
||||
#ifdef DVK_SPI_CONTROL
|
||||
DVK_SPI_disable();
|
||||
#endif
|
||||
}
|
|
@ -1,122 +0,0 @@
|
|||
/**************************************************************************//**
|
||||
* @file
|
||||
* @brief DVK Board Support, master header file
|
||||
* @author Energy Micro AS
|
||||
* @version 1.0.1
|
||||
******************************************************************************
|
||||
* @section License
|
||||
* <b>(C) Copyright 2009 Energy Micro AS, http://www.energymicro.com</b>
|
||||
******************************************************************************
|
||||
*
|
||||
* This source code is the property of Energy Micro AS. The source and compiled
|
||||
* code may only be used on Energy Micro "EFM32" microcontrollers.
|
||||
*
|
||||
* This copyright notice may not be removed from the source code nor changed.
|
||||
*
|
||||
* DISCLAIMER OF WARRANTY/LIMITATION OF REMEDIES: Energy Micro AS has no
|
||||
* obligation to support this Software. Energy Micro AS is providing the
|
||||
* Software "AS IS", with no express or implied warranties of any kind,
|
||||
* including, but not limited to, any implied warranties of merchantability
|
||||
* or fitness for any particular purpose or warranties against infringement
|
||||
* of any proprietary rights of a third party.
|
||||
*
|
||||
* Energy Micro AS will not be liable for any consequential, incidental, or
|
||||
* special damages, or any other relief, or for any claim by any third party,
|
||||
* arising from your use of this Software.
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
#ifndef __DVK_H
|
||||
#define __DVK_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include "dvk_boardcontrol.h"
|
||||
#include "dvk_bcregisters.h"
|
||||
|
||||
/* IF not user overrides default, try to decide DVK access interface based on
|
||||
* part number */
|
||||
#ifndef DVK_SPI_CONTROL
|
||||
#ifndef DVK_EBI_CONTROL
|
||||
|
||||
#if defined(EFM32G200F16)
|
||||
#define DVK_SPI_CONTROL
|
||||
#elif defined(EFM32G200F32)
|
||||
#define DVK_SPI_CONTROL
|
||||
#elif defined(EFM32G200F64)
|
||||
#define DVK_SPI_CONTROL
|
||||
#elif defined(EFM32G210F128)
|
||||
#define DVK_SPI_CONTROL
|
||||
#elif defined(EFM32G230F128)
|
||||
#define DVK_SPI_CONTROL
|
||||
#elif defined(EFM32G230F32)
|
||||
#define DVK_SPI_CONTROL
|
||||
#elif defined(EFM32G230F64)
|
||||
#define DVK_SPI_CONTROL
|
||||
#elif defined(EFM32G280F128)
|
||||
#define DVK_EBI_CONTROL
|
||||
#elif defined(EFM32G280F32)
|
||||
#define DVK_EBI_CONTROL
|
||||
#elif defined(EFM32G280F64)
|
||||
#define DVK_EBI_CONTROL
|
||||
#elif defined(EFM32G290F128)
|
||||
#define DVK_EBI_CONTROL
|
||||
#elif defined(EFM32G290F32)
|
||||
#define DVK_EBI_CONTROL
|
||||
#elif defined(EFM32G290F64)
|
||||
#define DVK_EBI_CONTROL
|
||||
#elif defined(EFM32G840F128)
|
||||
#define DVK_SPI_CONTROL
|
||||
#elif defined(EFM32G840F32)
|
||||
#define DVK_SPI_CONTROL
|
||||
#elif defined(EFM32G840F64)
|
||||
#define DVK_SPI_CONTROL
|
||||
#elif defined(EFM32G880F128)
|
||||
#define DVK_SPI_CONTROL
|
||||
#elif defined(EFM32G880F32)
|
||||
#define DVK_SPI_CONTROL
|
||||
#elif defined(EFM32G880F64)
|
||||
#define DVK_SPI_CONTROL
|
||||
#elif defined(EFM32G890F128)
|
||||
#define DVK_SPI_CONTROL
|
||||
#elif defined(EFM32G890F32)
|
||||
#define DVK_SPI_CONTROL
|
||||
#elif defined(EFM32G890F64)
|
||||
#define DVK_SPI_CONTROL
|
||||
#else
|
||||
#define DVK_SPI_CONTROL
|
||||
#endif
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* EBI access */
|
||||
void DVK_EBI_init(void);
|
||||
void DVK_EBI_disable(void);
|
||||
|
||||
void DVK_EBI_writeRegister(volatile uint16_t *addr, uint16_t data);
|
||||
uint16_t DVK_EBI_readRegister(volatile uint16_t *addr);
|
||||
|
||||
/* SPI access */
|
||||
void DVK_SPI_init(void);
|
||||
void DVK_SPI_disable(void);
|
||||
|
||||
void DVK_SPI_writeRegister(volatile uint16_t *addr, uint16_t data);
|
||||
uint16_t DVK_SPI_readRegister(volatile uint16_t *addr);
|
||||
|
||||
|
||||
/* Accodring to configuration, use either SPI or EBI */
|
||||
#ifdef DVK_EBI_CONTROL
|
||||
#define DVK_writeRegister(A, B) DVK_EBI_writeRegister(A, B)
|
||||
#define DVK_readRegister(A) DVK_EBI_readRegister(A)
|
||||
#endif
|
||||
|
||||
#ifdef DVK_SPI_CONTROL
|
||||
#define DVK_writeRegister(A, B) DVK_SPI_writeRegister(A, B)
|
||||
#define DVK_readRegister(A) DVK_SPI_readRegister(A)
|
||||
#endif
|
||||
|
||||
/* General initialization routines */
|
||||
void DVK_init(void);
|
||||
void DVK_disable(void);
|
||||
|
||||
#endif
|
|
@ -1,103 +0,0 @@
|
|||
/**************************************************************************//**
|
||||
* @file
|
||||
* @brief Board Control register definitions
|
||||
* @author Energy Micro AS
|
||||
* @version 1.0.1
|
||||
******************************************************************************
|
||||
* @section License
|
||||
* <b>(C) Copyright 2009 Energy Micro AS, http://www.energymicro.com</b>
|
||||
******************************************************************************
|
||||
*
|
||||
* This source code is the property of Energy Micro AS. The source and compiled
|
||||
* code may only be used on Energy Micro "EFM32" microcontrollers.
|
||||
*
|
||||
* This copyright notice may not be removed from the source code nor changed.
|
||||
*
|
||||
* DISCLAIMER OF WARRANTY/LIMITATION OF REMEDIES: Energy Micro AS has no
|
||||
* obligation to support this Software. Energy Micro AS is providing the
|
||||
* Software "AS IS", with no express or implied warranties of any kind,
|
||||
* including, but not limited to, any implied warranties of merchantability
|
||||
* or fitness for any particular purpose or warranties against infringement
|
||||
* of any proprietary rights of a third party.
|
||||
*
|
||||
* Energy Micro AS will not be liable for any consequential, incidental, or
|
||||
* special damages, or any other relief, or for any claim by any third party,
|
||||
* arising from your use of this Software.
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
#ifndef __DVK_BCREGISTERS_H
|
||||
#define __DVK_BCREGISTERS_H
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
/**************************************************************************//**
|
||||
* Defines FPGA register bank for Energy Micro Development Kit (DVK) board,
|
||||
* i.e. board control registers
|
||||
*****************************************************************************/
|
||||
#define BC_REGISTER_BASE 0x8c000000
|
||||
|
||||
#define BC_CFG ((volatile uint16_t *)(BC_REGISTER_BASE + sizeof(uint16_t) * 0x00))
|
||||
#define BC_EM ((volatile uint16_t *)(BC_REGISTER_BASE + sizeof(uint16_t) * 0x01))
|
||||
#define BC_MAGIC ((volatile uint16_t *)(BC_REGISTER_BASE + sizeof(uint16_t) * 0x02))
|
||||
#define BC_LED ((volatile uint16_t *)(BC_REGISTER_BASE + sizeof(uint16_t) * 0x03))
|
||||
#define BC_PUSHBUTTON ((volatile uint16_t *)(BC_REGISTER_BASE + sizeof(uint16_t) * 0x04))
|
||||
#define BC_DIPSWITCH ((volatile uint16_t *)(BC_REGISTER_BASE + sizeof(uint16_t) * 0x05))
|
||||
#define BC_JOYSTICK ((volatile uint16_t *)(BC_REGISTER_BASE + sizeof(uint16_t) * 0x06))
|
||||
#define BC_AEM ((volatile uint16_t *)(BC_REGISTER_BASE + sizeof(uint16_t) * 0x07))
|
||||
#define BC_DISPLAY_CTRL ((volatile uint16_t *)(BC_REGISTER_BASE + sizeof(uint16_t) * 0x08))
|
||||
#define BC_EBI_CFG ((volatile uint16_t *)(BC_REGISTER_BASE + sizeof(uint16_t) * 0x09))
|
||||
#define BC_BUS_CFG ((volatile uint16_t *)(BC_REGISTER_BASE + sizeof(uint16_t) * 0x0a))
|
||||
#define BC_PERCTRL ((volatile uint16_t *)(BC_REGISTER_BASE + sizeof(uint16_t) * 0x0c))
|
||||
#define BC_AEMSTATE ((volatile uint16_t *)(BC_REGISTER_BASE + sizeof(uint16_t) * 0x0d))
|
||||
#define BC_SPI_CFG ((volatile uint16_t *)(BC_REGISTER_BASE + sizeof(uint16_t) * 0x0e))
|
||||
#define BC_RESET ((volatile uint16_t *)(BC_REGISTER_BASE + sizeof(uint16_t) * 0x0f))
|
||||
#define BC_ADC_START ((volatile uint16_t *)(BC_REGISTER_BASE + sizeof(uint16_t) * 0x10))
|
||||
#define BC_ADC_STATUS ((volatile uint16_t *)(BC_REGISTER_BASE + sizeof(uint16_t) * 0x11))
|
||||
#define BC_ADC_DATA ((volatile uint16_t *)(BC_REGISTER_BASE + sizeof(uint16_t) * 0x12))
|
||||
#define BC_HW_VERSION ((volatile uint16_t *)(BC_REGISTER_BASE + sizeof(uint16_t) * 0x14))
|
||||
#define BC_FW_BUILDNO ((volatile uint16_t *)(BC_REGISTER_BASE + sizeof(uint16_t) * 0x15))
|
||||
#define BC_FW_VERSION ((volatile uint16_t *)(BC_REGISTER_BASE + sizeof(uint16_t) * 0x16))
|
||||
#define BC_SCRATCH_COMMON ((volatile uint16_t *)(BC_REGISTER_BASE + sizeof(uint16_t) * 0x17))
|
||||
#define BC_SCRATCH_EFM0 ((volatile uint16_t *)(BC_REGISTER_BASE + sizeof(uint16_t) * 0x18))
|
||||
#define BC_SCRATCH_EFM1 ((volatile uint16_t *)(BC_REGISTER_BASE + sizeof(uint16_t) * 0x19))
|
||||
#define BC_SCRATCH_EFM2 ((volatile uint16_t *)(BC_REGISTER_BASE + sizeof(uint16_t) * 0x1A))
|
||||
#define BC_SCRATCH_EFM3 ((volatile uint16_t *)(BC_REGISTER_BASE + sizeof(uint16_t) * 0x1B))
|
||||
#define BC_SCRATCH_BC0 ((volatile uint16_t *)(BC_REGISTER_BASE + sizeof(uint16_t) * 0x1C))
|
||||
#define BC_SCRATCH_BC1 ((volatile uint16_t *)(BC_REGISTER_BASE + sizeof(uint16_t) * 0x1D))
|
||||
#define BC_SCRATCH_BC2 ((volatile uint16_t *)(BC_REGISTER_BASE + sizeof(uint16_t) * 0x1E))
|
||||
#define BC_SCRATCH_BC3 ((volatile uint16_t *)(BC_REGISTER_BASE + sizeof(uint16_t) * 0x1f))
|
||||
#define BC_INTFLAG ((volatile uint16_t *)(BC_REGISTER_BASE + sizeof(uint16_t) * 0x20))
|
||||
#define BC_INTEN ((volatile uint16_t *)(BC_REGISTER_BASE + sizeof(uint16_t) * 0x21))
|
||||
|
||||
/**************************************************************************//**
|
||||
* Defines bit fields for board control registers
|
||||
*****************************************************************************/
|
||||
#define BC_PERCTRL_ACCEL (1 << 0)
|
||||
#define BC_PERCTRL_AMBIENT (1 << 1)
|
||||
#define BC_PERCTRL_POTMETER (1 << 2)
|
||||
#define BC_PERCTRL_RS232A (1 << 3)
|
||||
#define BC_PERCTRL_RS232B (1 << 4)
|
||||
#define BC_PERCTRL_SPI (1 << 5)
|
||||
#define BC_PERCTRL_I2C (1 << 6)
|
||||
#define BC_PERCTRL_IRDA (1 << 7)
|
||||
#define BC_PERCTRL_ANALOG_SE (1 << 8)
|
||||
#define BC_PERCTRL_ANALOG_DIFF (1 << 9)
|
||||
#define BC_PERCTRL_AUDIO_OUT (1 << 10)
|
||||
#define BC_PERCTRL_AUDIO_IN (1 << 11)
|
||||
#define BC_PERCTRL_ACCEL_GSEL (1 << 12)
|
||||
#define BC_PERCTRL_ACCEL_SELFTEST (1 << 13)
|
||||
#define BC_PERCTRL_RS232_SHUTDOWN (1 << 14)
|
||||
#define BC_PERCTRL_IRDA_SHUTDOWN (1 << 15)
|
||||
|
||||
#define BC_INTEN_PB (1 << 0)
|
||||
#define BC_INTEN_DIP (1 << 1)
|
||||
#define BC_INTEN_JOYSTICK (1 << 2)
|
||||
#define BC_INTEN_AEM (1 << 3)
|
||||
|
||||
#define BC_CFG_SPI (0)
|
||||
#define BC_CFG_EBI (1)
|
||||
|
||||
#define BC_MAGIC_VALUE (0xef32)
|
||||
|
||||
#endif
|
|
@ -1,235 +0,0 @@
|
|||
/**************************************************************************//**
|
||||
* @file
|
||||
* @brief DVK Peripheral Board Control API implementation
|
||||
* @author Energy Micro AS
|
||||
* @version 1.0.1
|
||||
******************************************************************************
|
||||
* @section License
|
||||
* <b>(C) Copyright 2009 Energy Micro AS, http://www.energymicro.com</b>
|
||||
******************************************************************************
|
||||
*
|
||||
* This source code is the property of Energy Micro AS. The source and compiled
|
||||
* code may only be used on Energy Micro "EFM32" microcontrollers.
|
||||
*
|
||||
* This copyright notice may not be removed from the source code nor changed.
|
||||
*
|
||||
* DISCLAIMER OF WARRANTY/LIMITATION OF REMEDIES: Energy Micro AS has no
|
||||
* obligation to support this Software. Energy Micro AS is providing the
|
||||
* Software "AS IS", with no express or implied warranties of any kind,
|
||||
* including, but not limited to, any implied warranties of merchantability
|
||||
* or fitness for any particular purpose or warranties against infringement
|
||||
* of any proprietary rights of a third party.
|
||||
*
|
||||
* Energy Micro AS will not be liable for any consequential, incidental, or
|
||||
* special damages, or any other relief, or for any claim by any third party,
|
||||
* arising from your use of this Software.
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
#include "efm32.h"
|
||||
#include "dvk.h"
|
||||
#include "dvk_boardcontrol.h"
|
||||
#include "dvk_bcregisters.h"
|
||||
|
||||
/**************************************************************************//**
|
||||
* @brief Enable EFM32 access to periheral on DVK board
|
||||
* @param peri Peripheral to enable
|
||||
*****************************************************************************/
|
||||
void DVK_enablePeripheral(DVKPeripheral peri)
|
||||
{
|
||||
uint16_t bit;
|
||||
uint16_t tmp;
|
||||
|
||||
/* Calculate which bit to set */
|
||||
bit = (uint16_t) peri;
|
||||
|
||||
/* Read peripheral control register */
|
||||
tmp = DVK_readRegister(BC_PERCTRL);
|
||||
|
||||
/* Enable peripheral */
|
||||
tmp |= bit;
|
||||
|
||||
/* Special case for RS232, if enabled disable shutdown */
|
||||
if ((peri == DVK_RS232A) || (peri == DVK_RS232B))
|
||||
{
|
||||
/* clear shutdown bit */
|
||||
tmp &= ~(BC_PERCTRL_RS232_SHUTDOWN);
|
||||
}
|
||||
|
||||
/* Special case for IRDA if enabled disable shutdown */
|
||||
if (peri == DVK_IRDA)
|
||||
{
|
||||
/* clear shutdown bit */
|
||||
tmp &= ~(BC_PERCTRL_IRDA_SHUTDOWN);
|
||||
}
|
||||
|
||||
DVK_writeRegister(BC_PERCTRL, tmp);
|
||||
}
|
||||
|
||||
/**************************************************************************//**
|
||||
* @brief Disable EFM32 access to peripheral on DVK board
|
||||
* @param peri Peripheral to disable
|
||||
*****************************************************************************/
|
||||
void DVK_disablePeripheral(DVKPeripheral peri)
|
||||
{
|
||||
uint16_t bit;
|
||||
uint16_t tmp;
|
||||
|
||||
/* Calculate which bit to set */
|
||||
bit = (uint16_t) peri;
|
||||
|
||||
/* Read peripheral control register */
|
||||
tmp = DVK_readRegister(BC_PERCTRL);
|
||||
|
||||
/* Disable peripheral */
|
||||
tmp &= ~(bit);
|
||||
|
||||
/* Special case for RS232, if enabled disable shutdown */
|
||||
if ((peri == DVK_RS232A) || (peri == DVK_RS232B))
|
||||
{
|
||||
/* Set shutdown bit */
|
||||
tmp |= (BC_PERCTRL_RS232_SHUTDOWN);
|
||||
}
|
||||
|
||||
/* Special case for IRDA */
|
||||
if (peri == DVK_IRDA)
|
||||
{
|
||||
/* Set shutdown bit */
|
||||
tmp |= (BC_PERCTRL_IRDA_SHUTDOWN);
|
||||
}
|
||||
|
||||
|
||||
DVK_writeRegister(BC_PERCTRL, tmp);
|
||||
}
|
||||
|
||||
|
||||
/**************************************************************************//**
|
||||
* @brief Enable BUS access
|
||||
*****************************************************************************/
|
||||
void DVK_enableBus(void)
|
||||
{
|
||||
/* Enable bus access */
|
||||
DVK_writeRegister(BC_BUS_CFG, 1);
|
||||
}
|
||||
|
||||
|
||||
/**************************************************************************//**
|
||||
* @brief Disable BUS access
|
||||
*****************************************************************************/
|
||||
void DVK_disableBus(void)
|
||||
{
|
||||
DVK_writeRegister(BC_BUS_CFG, 0);
|
||||
}
|
||||
|
||||
|
||||
/**************************************************************************//**
|
||||
* @brief Inform AEM about current energy mode
|
||||
* @param energyMode What energy mode we are going to use next
|
||||
*****************************************************************************/
|
||||
void DVK_setEnergyMode(uint16_t energyMode)
|
||||
{
|
||||
DVK_writeRegister(BC_EM, energyMode);
|
||||
}
|
||||
|
||||
|
||||
/**************************************************************************//**
|
||||
* @brief Get status of bush buttons
|
||||
* @return Status of push buttons
|
||||
*****************************************************************************/
|
||||
uint16_t DVK_getPushButtons(void)
|
||||
{
|
||||
uint16_t tmp;
|
||||
|
||||
tmp = (~(DVK_readRegister(BC_PUSHBUTTON))) & 0x000f;
|
||||
return tmp;
|
||||
}
|
||||
|
||||
/**************************************************************************//**
|
||||
* @brief Get joystick button status
|
||||
* @return Joystick controller status
|
||||
*****************************************************************************/
|
||||
uint16_t DVK_getJoystick(void)
|
||||
{
|
||||
uint16_t tmp;
|
||||
|
||||
tmp = (~(DVK_readRegister(BC_JOYSTICK))) & 0x001f;
|
||||
return tmp;
|
||||
}
|
||||
|
||||
/**************************************************************************//**
|
||||
* @brief Get dipswitch status
|
||||
* The DIP switches are free for user programmable purposes
|
||||
* @return Joystick controller status
|
||||
*****************************************************************************/
|
||||
uint16_t DVK_getDipSwitch(void)
|
||||
{
|
||||
uint16_t tmp;
|
||||
|
||||
tmp = (~(DVK_readRegister(BC_DIPSWITCH))) & 0x00ff;
|
||||
return tmp;
|
||||
}
|
||||
|
||||
/**************************************************************************//**
|
||||
* @brief Sets user leds
|
||||
* @param leds 16-bits which enables or disables the board "User leds"
|
||||
*****************************************************************************/
|
||||
void DVK_setLEDs(uint16_t leds)
|
||||
{
|
||||
DVK_writeRegister(BC_LED, leds);
|
||||
}
|
||||
|
||||
/**************************************************************************//**
|
||||
* @brief Get status of user LEDs
|
||||
* @return Status of 16 user leds, bit 1 = on, bit 0 = off
|
||||
*****************************************************************************/
|
||||
uint16_t DVK_getLEDs(void)
|
||||
{
|
||||
return DVK_readRegister(BC_LED);
|
||||
}
|
||||
|
||||
/**************************************************************************//**
|
||||
* @brief Enable "Control" buttons/joystick/dip switch interrupts
|
||||
* @param flags Board control interrupt flags, BC_INTEN_<something>
|
||||
*****************************************************************************/
|
||||
void DVK_enableInterrupt(uint16_t flags)
|
||||
{
|
||||
uint16_t tmp;
|
||||
|
||||
/* Add flags to interrupt enable register */
|
||||
tmp = DVK_readRegister(BC_INTEN);
|
||||
tmp |= flags;
|
||||
DVK_writeRegister(BC_INTEN, tmp);
|
||||
}
|
||||
|
||||
/**************************************************************************//**
|
||||
* @brief Disable "Control" buttons/joystick/dip switch interrupts
|
||||
* @param flags Board control interrupt flags, BC_INTEN_<something>
|
||||
*****************************************************************************/
|
||||
void DVK_disableInterrupt(uint16_t flags)
|
||||
{
|
||||
uint16_t tmp;
|
||||
|
||||
/* Clear flags from interrupt enable register */
|
||||
tmp = DVK_readRegister(BC_INTEN);
|
||||
flags = ~(flags);
|
||||
tmp &= flags;
|
||||
DVK_writeRegister(BC_INTEN, tmp);
|
||||
}
|
||||
|
||||
/**************************************************************************//**
|
||||
* @brief Clear interrupts
|
||||
* @param flags Board control interrupt flags, BC_INTEN_<something>
|
||||
*****************************************************************************/
|
||||
void DVK_clearInterruptFlags(uint16_t flags)
|
||||
{
|
||||
DVK_writeRegister(BC_INTFLAG, flags);
|
||||
}
|
||||
|
||||
/**************************************************************************//**
|
||||
* @brief Read interrupt flags
|
||||
* @return Returns currently triggered interrupts
|
||||
*****************************************************************************/
|
||||
uint16_t DVK_getInterruptFlags(void)
|
||||
{
|
||||
return DVK_readRegister(BC_INTFLAG);
|
||||
}
|
|
@ -1,81 +0,0 @@
|
|||
/**************************************************************************//**
|
||||
* @file
|
||||
* @brief DVK Peripheral Board Control, prototypes and definitions
|
||||
* @author Energy Micro AS
|
||||
* @version 1.0.1
|
||||
******************************************************************************
|
||||
* @section License
|
||||
* <b>(C) Copyright 2009 Energy Micro AS, http://www.energymicro.com</b>
|
||||
******************************************************************************
|
||||
*
|
||||
* This source code is the property of Energy Micro AS. The source and compiled
|
||||
* code may only be used on Energy Micro "EFM32" microcontrollers.
|
||||
*
|
||||
* This copyright notice may not be removed from the source code nor changed.
|
||||
*
|
||||
* DISCLAIMER OF WARRANTY/LIMITATION OF REMEDIES: Energy Micro AS has no
|
||||
* obligation to support this Software. Energy Micro AS is providing the
|
||||
* Software "AS IS", with no express or implied warranties of any kind,
|
||||
* including, but not limited to, any implied warranties of merchantability
|
||||
* or fitness for any particular purpose or warranties against infringement
|
||||
* of any proprietary rights of a third party.
|
||||
*
|
||||
* Energy Micro AS will not be liable for any consequential, incidental, or
|
||||
* special damages, or any other relief, or for any claim by any third party,
|
||||
* arising from your use of this Software.
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
#ifndef __DVK_BOARDCONTROL_H
|
||||
#define __DVK_BOARDCONTROL_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include "dvk_bcregisters.h"
|
||||
|
||||
/** Periperhal access switches */
|
||||
typedef enum
|
||||
{
|
||||
DVK_ACCEL = BC_PERCTRL_ACCEL,
|
||||
DVK_AMBIENT = BC_PERCTRL_AMBIENT,
|
||||
DVK_POTMETER = BC_PERCTRL_POTMETER,
|
||||
DVK_RS232A = BC_PERCTRL_RS232A,
|
||||
DVK_RS232B = BC_PERCTRL_RS232B,
|
||||
DVK_SPI = BC_PERCTRL_SPI,
|
||||
DVK_I2C = BC_PERCTRL_I2C,
|
||||
DVK_IRDA = BC_PERCTRL_IRDA,
|
||||
DVK_ANALOG_SE = BC_PERCTRL_ANALOG_SE,
|
||||
DVK_ANALOG_DIFF = BC_PERCTRL_ANALOG_DIFF,
|
||||
DVK_AUDIO_OUT = BC_PERCTRL_AUDIO_OUT,
|
||||
DVK_AUDIO_IN = BC_PERCTRL_AUDIO_IN,
|
||||
DVK_ACCEL_GSEL = BC_PERCTRL_ACCEL_GSEL,
|
||||
DVK_ACCEL_SELFTEST = BC_PERCTRL_ACCEL_SELFTEST,
|
||||
DVK_RS232_SHUTDOWN = BC_PERCTRL_RS232_SHUTDOWN,
|
||||
DVK_IRDA_SHUTDOWN = BC_PERCTRL_IRDA_SHUTDOWN,
|
||||
} DVKPeripheral;
|
||||
|
||||
/* Peripheral Control */
|
||||
void DVK_enablePeripheral(DVKPeripheral peri);
|
||||
void DVK_disablePeripheral(DVKPeripheral peri);
|
||||
void DVK_enableBus(void);
|
||||
void DVK_disableBus(void);
|
||||
|
||||
/* Read board controllers */
|
||||
uint16_t DVK_getPushButtons(void);
|
||||
uint16_t DVK_getJoystick(void);
|
||||
uint16_t DVK_getDipSwitch(void);
|
||||
|
||||
/* Report AEM status */
|
||||
void DVK_setEnergyMode(uint16_t energyMode);
|
||||
|
||||
/* User LEDs */
|
||||
void DVK_setLEDs(uint16_t leds);
|
||||
uint16_t DVK_getLEDs(void);
|
||||
|
||||
/* Interrupt callback */
|
||||
void DVK_enableInterrupt(uint16_t flags);
|
||||
void DVK_disableInterrupt(uint16_t flags);
|
||||
|
||||
uint16_t DVK_getInterruptFlags(void);
|
||||
void DVK_clearInterruptFlags(uint16_t flags);
|
||||
|
||||
#endif
|
|
@ -1,248 +0,0 @@
|
|||
/**************************************************************************//**
|
||||
* @file
|
||||
* @brief EBI implementation of Board Control interface
|
||||
* This implementation works for devices w/o LCD display on the
|
||||
* MCU module, specifically the EFM32_G2xx_DK development board
|
||||
* @author Energy Micro AS
|
||||
* @version 1.0.1
|
||||
******************************************************************************
|
||||
* @section License
|
||||
* <b>(C) Copyright 2009 Energy Micro AS, http://www.energymicro.com</b>
|
||||
******************************************************************************
|
||||
*
|
||||
* This source code is the property of Energy Micro AS. The source and compiled
|
||||
* code may only be used on Energy Micro "EFM32" microcontrollers.
|
||||
*
|
||||
* This copyright notice may not be removed from the source code nor changed.
|
||||
*
|
||||
* DISCLAIMER OF WARRANTY/LIMITATION OF REMEDIES: Energy Micro AS has no
|
||||
* obligation to support this Software. Energy Micro AS is providing the
|
||||
* Software "AS IS", with no express or implied warranties of any kind,
|
||||
* including, but not limited to, any implied warranties of merchantability
|
||||
* or fitness for any particular purpose or warranties against infringement
|
||||
* of any proprietary rights of a third party.
|
||||
*
|
||||
* Energy Micro AS will not be liable for any consequential, incidental, or
|
||||
* special damages, or any other relief, or for any claim by any third party,
|
||||
* arising from your use of this Software.
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
#include "efm32.h"
|
||||
#include "dvk.h"
|
||||
#include "dvk_bcregisters.h"
|
||||
|
||||
/**************************************************************************//**
|
||||
* @brief Configure EBI (external bus interface) for Board Control register
|
||||
* access
|
||||
*****************************************************************************/
|
||||
void DVK_EBI_configure(void)
|
||||
{
|
||||
GPIO_TypeDef *gpio = GPIO;
|
||||
EBI_TypeDef *ebi = EBI;
|
||||
CMU_TypeDef *cmu = CMU;
|
||||
|
||||
/* Run time check if we have EBI on-chip capability on this device */
|
||||
switch ((DEVINFO->PART & _DEVINFO_PART_DEVICE_NUMBER_MASK) >>
|
||||
_DEVINFO_PART_DEVICE_NUMBER_SHIFT)
|
||||
{
|
||||
/* Only device types EFM32G 280/290/880 and 890 have EBI capability */
|
||||
case 280:
|
||||
case 290:
|
||||
case 880:
|
||||
case 890:
|
||||
break;
|
||||
default:
|
||||
/* This device do not have EBI capability - use SPI to interface DVK */
|
||||
/* With high probability your project has been configured for an */
|
||||
/* incorrect part number. */
|
||||
while (1) ;
|
||||
}
|
||||
|
||||
/* Enable clocks */
|
||||
cmu->HFCORECLKEN0 |= CMU_HFCORECLKEN0_EBI;
|
||||
cmu->HFPERCLKEN0 |= CMU_HFPERCLKEN0_GPIO;
|
||||
|
||||
/* Configure bus connect PC bit 12 active low */
|
||||
gpio->P[2].MODEH |=
|
||||
GPIO_P_MODEH_MODE12_PUSHPULL;
|
||||
|
||||
gpio->P[2].DOUT &= ~(1UL << 12);
|
||||
|
||||
/* Configure GPIO pins as push pull */
|
||||
/* EBI AD9..15 */
|
||||
gpio->P[0].MODEL |=
|
||||
(GPIO_P_MODEL_MODE0_PUSHPULL |
|
||||
GPIO_P_MODEL_MODE1_PUSHPULL |
|
||||
GPIO_P_MODEL_MODE2_PUSHPULL |
|
||||
GPIO_P_MODEL_MODE3_PUSHPULL |
|
||||
GPIO_P_MODEL_MODE4_PUSHPULL |
|
||||
GPIO_P_MODEL_MODE5_PUSHPULL |
|
||||
GPIO_P_MODEL_MODE6_PUSHPULL);
|
||||
/* EBI AD8 */
|
||||
gpio->P[0].MODEH |=
|
||||
GPIO_P_MODEH_MODE15_PUSHPULL;
|
||||
/* EBI CS0-CS3 */
|
||||
gpio->P[3].MODEH |=
|
||||
(GPIO_P_MODEH_MODE9_PUSHPULL |
|
||||
GPIO_P_MODEH_MODE10_PUSHPULL |
|
||||
GPIO_P_MODEH_MODE11_PUSHPULL |
|
||||
GPIO_P_MODEH_MODE12_PUSHPULL);
|
||||
/* EBI AD0..7 */
|
||||
gpio->P[4].MODEH |=
|
||||
(GPIO_P_MODEH_MODE8_PUSHPULL |
|
||||
GPIO_P_MODEH_MODE9_PUSHPULL |
|
||||
GPIO_P_MODEH_MODE10_PUSHPULL |
|
||||
GPIO_P_MODEH_MODE11_PUSHPULL |
|
||||
GPIO_P_MODEH_MODE12_PUSHPULL |
|
||||
GPIO_P_MODEH_MODE13_PUSHPULL |
|
||||
GPIO_P_MODEH_MODE14_PUSHPULL |
|
||||
GPIO_P_MODEH_MODE15_PUSHPULL);
|
||||
/* EBI ARDY/ALEN/Wen/Ren */
|
||||
gpio->P[5].MODEL |=
|
||||
(GPIO_P_MODEL_MODE2_PUSHPULL |
|
||||
GPIO_P_MODEL_MODE3_PUSHPULL |
|
||||
GPIO_P_MODEL_MODE4_PUSHPULL |
|
||||
GPIO_P_MODEL_MODE5_PUSHPULL);
|
||||
|
||||
/* Configure EBI controller */
|
||||
/* 16 bit address, 16 bit data mode */
|
||||
/* Enable bank 0 address map 0x80000000, FPGA Flash */
|
||||
/* Enable bank 1 address map 0x84000000, FPGA SRAM */
|
||||
/* Enable bank 2 address map 0x88000000, FPGA TFT Display (SSD2119) */
|
||||
/* Enable bank 3 address map 0x8c000000, FPGA Board Control Registers */
|
||||
ebi->CTRL =
|
||||
EBI_CTRL_MODE_D16A16ALE |
|
||||
EBI_CTRL_BANK0EN |
|
||||
EBI_CTRL_BANK1EN |
|
||||
EBI_CTRL_BANK2EN |
|
||||
EBI_CTRL_BANK3EN;
|
||||
|
||||
/* Setup and hold time */
|
||||
ebi->ADDRTIMING = 3 << _EBI_ADDRTIMING_ADDRHOLD_SHIFT | 3 << _EBI_ADDRTIMING_ADDRSET_SHIFT;
|
||||
|
||||
/* Default values for all write timing registers, read timing conservative */
|
||||
ebi->RDTIMING = 7 << _EBI_RDTIMING_RDSTRB_SHIFT | 3 << _EBI_RDTIMING_RDHOLD_SHIFT | 3 << _EBI_RDTIMING_RDSETUP_SHIFT;
|
||||
ebi->WRTIMING = 7 << _EBI_WRTIMING_WRSTRB_SHIFT | 3 << _EBI_WRTIMING_WRHOLD_SHIFT | 3 << _EBI_WRTIMING_WRSETUP_SHIFT;
|
||||
ebi->POLARITY = _EBI_POLARITY_RESETVALUE;
|
||||
|
||||
/* Toggle on all chip selects for all banks */
|
||||
ebi->ROUTE =
|
||||
EBI_ROUTE_CS0PEN |
|
||||
EBI_ROUTE_CS1PEN |
|
||||
EBI_ROUTE_CS2PEN |
|
||||
EBI_ROUTE_CS3PEN |
|
||||
EBI_ROUTE_ALEPEN |
|
||||
EBI_ROUTE_EBIPEN;
|
||||
}
|
||||
|
||||
|
||||
/**************************************************************************//**
|
||||
* @brief Initialize EBI
|
||||
* access
|
||||
*****************************************************************************/
|
||||
void DVK_EBI_init(void)
|
||||
{
|
||||
uint16_t ebiMagic;
|
||||
int ctr;
|
||||
volatile int i;
|
||||
|
||||
/* Configure EBI */
|
||||
DVK_EBI_configure();
|
||||
/* Verify that EBI access is working, if not kit is in SPI mode and needs to
|
||||
* be configured for EBI access */
|
||||
ebiMagic = DVK_EBI_readRegister(BC_MAGIC);
|
||||
if (ebiMagic != BC_MAGIC_VALUE)
|
||||
{
|
||||
/* Disable EBI */
|
||||
DVK_EBI_disable();
|
||||
/* Enable SPI interface */
|
||||
DVK_SPI_init();
|
||||
/* Set EBI mode - after this SPI access will no longer be available */
|
||||
DVK_SPI_writeRegister(BC_CFG, BC_CFG_EBI);
|
||||
/* Disable SPI */
|
||||
DVK_SPI_disable();
|
||||
/* Now setup EBI again */
|
||||
DVK_EBI_configure();
|
||||
/* Wait until ready */
|
||||
ctr = 0;
|
||||
do {
|
||||
/* Check if FPGA responds */
|
||||
ebiMagic = DVK_EBI_readRegister(BC_MAGIC);
|
||||
ctr++;
|
||||
DVK_EBI_writeRegister(BC_LED, ctr);
|
||||
} while (ebiMagic != BC_MAGIC_VALUE);
|
||||
}
|
||||
}
|
||||
|
||||
/**************************************************************************//**
|
||||
* @brief Disable EBI interface, free all GPIO pins
|
||||
*****************************************************************************/
|
||||
void DVK_EBI_disable(void)
|
||||
{
|
||||
GPIO_TypeDef *gpio = GPIO;
|
||||
EBI_TypeDef *ebi = EBI;
|
||||
CMU_TypeDef *cmu = CMU;
|
||||
|
||||
/* Toggle off all chip selects for all banks */
|
||||
ebi->ROUTE = _EBI_ROUTE_RESETVALUE;
|
||||
|
||||
/* Disable EBI controller */
|
||||
ebi->CTRL = _EBI_CTRL_RESETVALUE;
|
||||
|
||||
/* Disable EBI clock */
|
||||
cmu->HFCORECLKEN0 &= ~(CMU_HFCORECLKEN0_EBI);
|
||||
|
||||
/* Disable EBI _BC_BUS_CONNECT */
|
||||
gpio->P[2].MODEH &= ~(_GPIO_P_MODEH_MODE12_MASK);
|
||||
|
||||
/* Configure GPIO pins as disabled */
|
||||
gpio->P[0].MODEL &= ~(
|
||||
_GPIO_P_MODEL_MODE0_MASK |
|
||||
_GPIO_P_MODEL_MODE1_MASK |
|
||||
_GPIO_P_MODEL_MODE2_MASK |
|
||||
_GPIO_P_MODEL_MODE3_MASK |
|
||||
_GPIO_P_MODEL_MODE4_MASK |
|
||||
_GPIO_P_MODEL_MODE5_MASK |
|
||||
_GPIO_P_MODEL_MODE6_MASK);
|
||||
gpio->P[0].MODEH &= ~(_GPIO_P_MODEH_MODE15_MASK);
|
||||
gpio->P[3].MODEH &= ~(
|
||||
_GPIO_P_MODEH_MODE9_MASK|
|
||||
_GPIO_P_MODEH_MODE10_MASK|
|
||||
_GPIO_P_MODEH_MODE11_MASK|
|
||||
_GPIO_P_MODEH_MODE12_MASK
|
||||
);
|
||||
gpio->P[4].MODEH &= ~(
|
||||
_GPIO_P_MODEH_MODE8_MASK |
|
||||
_GPIO_P_MODEH_MODE9_MASK |
|
||||
_GPIO_P_MODEH_MODE10_MASK |
|
||||
_GPIO_P_MODEH_MODE11_MASK |
|
||||
_GPIO_P_MODEH_MODE12_MASK |
|
||||
_GPIO_P_MODEH_MODE13_MASK |
|
||||
_GPIO_P_MODEH_MODE14_MASK |
|
||||
_GPIO_P_MODEH_MODE15_MASK);
|
||||
gpio->P[5].MODEL &= ~(
|
||||
_GPIO_P_MODEL_MODE2_MASK |
|
||||
_GPIO_P_MODEL_MODE3_MASK |
|
||||
_GPIO_P_MODEL_MODE4_MASK |
|
||||
_GPIO_P_MODEL_MODE5_MASK);
|
||||
}
|
||||
|
||||
/**************************************************************************//**
|
||||
* @brief Write data into 16-bit board control register
|
||||
* @param addr Address to board control register
|
||||
* @param data Data to write into register
|
||||
*****************************************************************************/
|
||||
void DVK_EBI_writeRegister(volatile uint16_t *addr, uint16_t data)
|
||||
{
|
||||
*addr = data;
|
||||
}
|
||||
|
||||
/**************************************************************************//**
|
||||
* @brief Write data into 16-bit board control register
|
||||
* @param addr Register to read from
|
||||
*****************************************************************************/
|
||||
uint16_t DVK_EBI_readRegister(volatile uint16_t *addr)
|
||||
{
|
||||
return *addr;
|
||||
}
|
|
@ -1,229 +0,0 @@
|
|||
/**************************************************************************//**
|
||||
* @file
|
||||
* @brief SPI implementation of Board Control interface
|
||||
* This implementation use the USART2 SPI interface to control board
|
||||
* control registers. It works
|
||||
* @author Energy Micro AS
|
||||
* @version 1.0.1
|
||||
******************************************************************************
|
||||
* @section License
|
||||
* <b>(C) Copyright 2009 Energy Micro AS, http://www.energymicro.com</b>
|
||||
******************************************************************************
|
||||
*
|
||||
* This source code is the property of Energy Micro AS. The source and compiled
|
||||
* code may only be used on Energy Micro "EFM32" microcontrollers.
|
||||
*
|
||||
* This copyright notice may not be removed from the source code nor changed.
|
||||
*
|
||||
* DISCLAIMER OF WARRANTY/LIMITATION OF REMEDIES: Energy Micro AS has no
|
||||
* obligation to support this Software. Energy Micro AS is providing the
|
||||
* Software "AS IS", with no express or implied warranties of any kind,
|
||||
* including, but not limited to, any implied warranties of merchantability
|
||||
* or fitness for any particular purpose or warranties against infringement
|
||||
* of any proprietary rights of a third party.
|
||||
*
|
||||
* Energy Micro AS will not be liable for any consequential, incidental, or
|
||||
* special damages, or any other relief, or for any claim by any third party,
|
||||
* arising from your use of this Software.
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
#include "efm32.h"
|
||||
#include "dvk.h"
|
||||
#include "dvk_bcregisters.h"
|
||||
|
||||
#define clear_bit(reg, bit) (reg &= ~(1 << bit))
|
||||
|
||||
static volatile uint16_t *lastAddr = 0;
|
||||
|
||||
/**************************************************************************//**
|
||||
* @brief Initializes USART2 SPI interface for access to FPGA registers
|
||||
* for board control
|
||||
*****************************************************************************/
|
||||
static void spiInit(void)
|
||||
{
|
||||
USART_TypeDef *usart = USART2;
|
||||
GPIO_TypeDef *gpio = GPIO;
|
||||
uint32_t clk, spidiv;
|
||||
const uint32_t baudrate = 7000000;
|
||||
const uint32_t div = (2 * baudrate / 256);
|
||||
|
||||
/* Configure SPI bus connect pins */
|
||||
gpio->P[2].MODEH &= ~(_GPIO_P_MODEH_MODE13_MASK);
|
||||
gpio->P[2].MODEH |= (GPIO_P_MODEH_MODE13_PUSHPULL);
|
||||
gpio->P[2].DOUT &= ~(1UL << 13);
|
||||
|
||||
/* Configure SPI pins */
|
||||
gpio->P[2].MODEL &= ~(_GPIO_P_MODEL_MODE2_MASK |
|
||||
_GPIO_P_MODEL_MODE3_MASK |
|
||||
_GPIO_P_MODEL_MODE4_MASK |
|
||||
_GPIO_P_MODEL_MODE5_MASK);
|
||||
gpio->P[2].MODEL |= (GPIO_P_MODEL_MODE2_PUSHPULL |
|
||||
GPIO_P_MODEL_MODE3_PUSHPULL |
|
||||
GPIO_P_MODEL_MODE4_PUSHPULL |
|
||||
GPIO_P_MODEL_MODE5_PUSHPULL);
|
||||
gpio->P[2].DOUT |= (1UL << 5);
|
||||
|
||||
/* Configure USART2 as SPI master with manual CS */
|
||||
/* Get peripheral clock - ensure updated SystemCoreClock */
|
||||
SystemCoreClockUpdate();
|
||||
clk = (SystemCoreClock >> ((CMU->HFPERCLKDIV & _CMU_HFPERCLKDIV_HFPERCLKDIV_MASK) >>
|
||||
_CMU_HFPERCLKDIV_HFPERCLKDIV_SHIFT));
|
||||
/* Drive spi at max 7Mhz or half clockrate if core freq < 14Mhz */
|
||||
if (clk < 14000000)
|
||||
{
|
||||
spidiv = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
spidiv = (clk) / (div) - 256;
|
||||
}
|
||||
|
||||
/* Never allow higher frequency than specified, round up 1/4 div */
|
||||
if (spidiv & 0x3f) spidiv += 0x40;
|
||||
|
||||
usart->CLKDIV = spidiv;
|
||||
usart->CTRL = USART_CTRL_SYNC;
|
||||
usart->CMD = USART_CMD_CLEARRX | USART_CMD_CLEARTX;
|
||||
usart->ROUTE = USART_ROUTE_TXPEN | USART_ROUTE_RXPEN | USART_ROUTE_CLKPEN;
|
||||
usart->CMD = USART_CMD_MASTEREN | USART_CMD_TXEN | USART_CMD_RXEN;
|
||||
}
|
||||
|
||||
/**************************************************************************//**
|
||||
* @brief Disables GPIO pins and USART2 from FPGA register access
|
||||
*****************************************************************************/
|
||||
static void spiDisable(void)
|
||||
{
|
||||
USART_TypeDef *usart = USART2;
|
||||
GPIO_TypeDef *gpio = GPIO;
|
||||
|
||||
/* Disable USART2 */
|
||||
usart->CTRL = _USART_CTRL_RESETVALUE;
|
||||
usart->ROUTE = _USART_ROUTE_RESETVALUE;
|
||||
usart->CMD = USART_CMD_MASTERDIS | USART_CMD_TXDIS | USART_CMD_RXDIS;
|
||||
|
||||
/* Disable SPI pins */
|
||||
gpio->P[2].MODEH &= ~(_GPIO_P_MODEH_MODE13_MASK);
|
||||
gpio->P[2].MODEL &= ~(_GPIO_P_MODEL_MODE2_MASK |
|
||||
_GPIO_P_MODEL_MODE3_MASK |
|
||||
_GPIO_P_MODEL_MODE4_MASK |
|
||||
_GPIO_P_MODEL_MODE5_MASK);
|
||||
}
|
||||
|
||||
/**************************************************************************//**
|
||||
* @brief Performs USART2 SPI Transfer
|
||||
*****************************************************************************/
|
||||
static uint16_t spiAccess(uint8_t spiadr, uint8_t rw, uint16_t spidata)
|
||||
{
|
||||
USART_TypeDef *usart = USART2;
|
||||
GPIO_TypeDef *gpio = GPIO;
|
||||
uint16_t tmp;
|
||||
|
||||
clear_bit(gpio->P[2].DOUT, 5);
|
||||
|
||||
/* SPI address */
|
||||
usart->TXDATA = (spiadr & 0x3) | rw << 3;
|
||||
while (!(usart->STATUS & USART_STATUS_TXC)) ;
|
||||
tmp = (usart->RXDATA) << 0;
|
||||
|
||||
/* SPI data LSB */
|
||||
usart->TXDATA = spidata & 0xFF;
|
||||
while (!(usart->STATUS & USART_STATUS_TXC)) ;
|
||||
tmp = (usart->RXDATA);
|
||||
|
||||
/* SPI data MSB */
|
||||
usart->TXDATA = spidata >> 8;
|
||||
while (!(usart->STATUS & USART_STATUS_TXC)) ;
|
||||
tmp |= (usart->RXDATA) << 8;
|
||||
|
||||
gpio->P[2].DOUT |= (1 << 5);
|
||||
|
||||
return tmp;
|
||||
}
|
||||
|
||||
/**************************************************************************//**
|
||||
* @brief Performs USART2 SPI write to FPGA register
|
||||
* @param spiadr Address of register
|
||||
* @param spidata Data to write
|
||||
*****************************************************************************/
|
||||
static void spiWrite(uint8_t spiadr, uint16_t spidata)
|
||||
{
|
||||
spiAccess(spiadr, 0, spidata);
|
||||
}
|
||||
|
||||
/**************************************************************************//**
|
||||
* @brief Performs USART2 SPI read from FPGA register
|
||||
* @param spiadr Address of register
|
||||
* @param spidata Dummy data
|
||||
*****************************************************************************/
|
||||
static uint16_t spiRead(uint8_t spiadr, uint16_t spidata)
|
||||
{
|
||||
return spiAccess(spiadr, 1, spidata);
|
||||
}
|
||||
|
||||
/**************************************************************************//**
|
||||
* @brief Initializes DVK register access
|
||||
*****************************************************************************/
|
||||
void DVK_SPI_init(void)
|
||||
{
|
||||
uint16_t spiMagic;
|
||||
|
||||
spiInit();
|
||||
/* Read "board control Magic" register to verify SPI is up and running */
|
||||
/* if not FPGA is configured to be in EBI mode */
|
||||
|
||||
spiMagic = DVK_SPI_readRegister(BC_MAGIC);
|
||||
if (spiMagic != BC_MAGIC_VALUE)
|
||||
{
|
||||
/* Development Kit is configured to use EBI mode, restart of kit required */
|
||||
/* to use USART2-SPI for configuration */
|
||||
spiDisable();
|
||||
while (1) ;
|
||||
}
|
||||
}
|
||||
|
||||
/**************************************************************************//**
|
||||
* @brief Disable and free up resources used by SPI board control access
|
||||
*****************************************************************************/
|
||||
void DVK_SPI_disable(void)
|
||||
{
|
||||
spiDisable();
|
||||
}
|
||||
|
||||
/**************************************************************************//**
|
||||
* @brief Perform read from DVK board control register
|
||||
* @param addr Address of register to read from
|
||||
*****************************************************************************/
|
||||
uint16_t DVK_SPI_readRegister(volatile uint16_t *addr)
|
||||
{
|
||||
uint16_t data;
|
||||
|
||||
if (addr != lastAddr)
|
||||
{
|
||||
spiWrite(0x00, 0xFFFF & ((uint32_t) addr)); /*LSBs of address*/
|
||||
spiWrite(0x01, 0xFF & ((uint32_t) addr >> 16)); /*MSBs of address*/
|
||||
spiWrite(0x02, (0x0C000000 & (uint32_t) addr) >> 26); /*Chip select*/
|
||||
}
|
||||
/* Read twice */
|
||||
data = spiRead(0x03, 0);
|
||||
data = spiRead(0x03, 0);
|
||||
lastAddr = addr;
|
||||
return data;
|
||||
}
|
||||
|
||||
/**************************************************************************//**
|
||||
* @brief Perform write to DVK board control register
|
||||
* @param addr Address of register to write to
|
||||
* @param data 16-bit to write into register
|
||||
*****************************************************************************/
|
||||
void DVK_SPI_writeRegister(volatile uint16_t *addr, uint16_t data)
|
||||
{
|
||||
if (addr != lastAddr)
|
||||
{
|
||||
spiWrite(0x00, 0xFFFF & ((uint32_t) addr)); /*LSBs of address*/
|
||||
spiWrite(0x01, 0xFF & ((uint32_t) addr >> 16)); /*MSBs of address*/
|
||||
spiWrite(0x02, (0x0C000000 & (uint32_t) addr) >> 26); /*Chip select*/
|
||||
}
|
||||
spiWrite(0x03, data); /*Data*/
|
||||
lastAddr = addr;
|
||||
}
|
|
@ -1,542 +0,0 @@
|
|||
/**************************************************************************//**
|
||||
* @file
|
||||
* @brief LCD Controller driver
|
||||
* @author Energy Micro AS
|
||||
* @version 1.0.1
|
||||
******************************************************************************
|
||||
* @section License
|
||||
* <b>(C) Copyright 2009 Energy Micro AS, http://www.energymicro.com</b>
|
||||
******************************************************************************
|
||||
*
|
||||
* This source code is the property of Energy Micro AS. The source and compiled
|
||||
* code may only be used on Energy Micro "EFM32" microcontrollers.
|
||||
*
|
||||
* This copyright notice may not be removed from the source code nor changed.
|
||||
*
|
||||
* DISCLAIMER OF WARRANTY/LIMITATION OF REMEDIES: Energy Micro AS has no
|
||||
* obligation to support this Software. Energy Micro AS is providing the
|
||||
* Software "AS IS", with no express or implied warranties of any kind,
|
||||
* including, but not limited to, any implied warranties of merchantability
|
||||
* or fitness for any particular purpose or warranties against infringement
|
||||
* of any proprietary rights of a third party.
|
||||
*
|
||||
* Energy Micro AS will not be liable for any consequential, incidental, or
|
||||
* special damages, or any other relief, or for any claim by any third party,
|
||||
* arising from your use of this Software.
|
||||
*
|
||||
*****************************************************************************/
|
||||
#include "FreeRTOS.h"
|
||||
#include "task.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include "efm32.h"
|
||||
#include "lcdcontroller.h"
|
||||
#include "lcddisplay.h"
|
||||
|
||||
/** Counts every n'th frame */
|
||||
int frameCounter = 0;
|
||||
|
||||
/**************************************************************************//**
|
||||
* @brief LCD Interrupt Handler, triggers on frame counter, every n'th frame
|
||||
*****************************************************************************/
|
||||
void LCD_IRQHandler(void)
|
||||
{
|
||||
LCD_TypeDef *lcd = LCD;
|
||||
|
||||
/* clear interrupt */
|
||||
lcd->IFC = 0xFFFFFFFF;
|
||||
frameCounter++;
|
||||
}
|
||||
|
||||
/**************************************************************************//**
|
||||
* @brief Enables a segment on the LCD display
|
||||
* @param lcd Pointer to LCD register block
|
||||
* @param com COM segment number
|
||||
* @param bitvalue Bit value for segment
|
||||
*****************************************************************************/
|
||||
static void LCD_enableSegment(LCD_TypeDef * lcd, int com, int bitvalue)
|
||||
{
|
||||
switch (com)
|
||||
{
|
||||
case 0:
|
||||
lcd->SEGD0L |= bitvalue;
|
||||
break;
|
||||
case 1:
|
||||
lcd->SEGD1L |= bitvalue;
|
||||
break;
|
||||
case 2:
|
||||
lcd->SEGD2L |= bitvalue;
|
||||
break;
|
||||
case 3:
|
||||
lcd->SEGD3L |= bitvalue;
|
||||
break;
|
||||
case 4:
|
||||
lcd->SEGD0H |= bitvalue;
|
||||
break;
|
||||
case 5:
|
||||
lcd->SEGD1H |= bitvalue;
|
||||
break;
|
||||
case 6:
|
||||
lcd->SEGD2H |= bitvalue;
|
||||
break;
|
||||
case 7:
|
||||
lcd->SEGD3H |= bitvalue;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/**************************************************************************//**
|
||||
* @brief Disables a segment on the LCD Display
|
||||
* @param lcd Pointer to LCD register structure
|
||||
* @param com COM segment number
|
||||
* @param bitvalue Bit value for segment
|
||||
*****************************************************************************/
|
||||
static void LCD_disableSegment(LCD_TypeDef * lcd, int com, int bitvalue)
|
||||
{
|
||||
switch (com)
|
||||
{
|
||||
case 0:
|
||||
lcd->SEGD0L &= ~bitvalue;
|
||||
break;
|
||||
case 1:
|
||||
lcd->SEGD1L &= ~bitvalue;
|
||||
break;
|
||||
case 2:
|
||||
lcd->SEGD2L &= ~bitvalue;
|
||||
break;
|
||||
case 3:
|
||||
lcd->SEGD3L &= ~bitvalue;
|
||||
break;
|
||||
case 4:
|
||||
lcd->SEGD0H &= ~bitvalue;
|
||||
break;
|
||||
case 5:
|
||||
lcd->SEGD1H &= ~bitvalue;
|
||||
break;
|
||||
case 6:
|
||||
lcd->SEGD2H &= ~bitvalue;
|
||||
break;
|
||||
case 7:
|
||||
lcd->SEGD3H &= ~bitvalue;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/**************************************************************************//**
|
||||
* @brief Write number on numeric part on LCD display
|
||||
* @param lcd Pointer to LCD control block
|
||||
* @param value Numeric value to put on display, in range -999 to +9999
|
||||
*****************************************************************************/
|
||||
void LCD_Number(LCD_TypeDef *lcd, int value)
|
||||
{
|
||||
int num, i, com, bit, digit, div, neg;
|
||||
uint16_t bitpattern;
|
||||
|
||||
/* Parameter consistancy check */
|
||||
if (value >= 9999)
|
||||
{
|
||||
value = 9999;
|
||||
}
|
||||
if (value <= -1000)
|
||||
{
|
||||
value = -999;
|
||||
}
|
||||
if (value < 0)
|
||||
{
|
||||
value = abs(value);
|
||||
neg = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
neg = 0;
|
||||
}
|
||||
/* Extract useful digits */
|
||||
div = 1;
|
||||
for (digit = 0; digit < 4; digit++)
|
||||
{
|
||||
num = (value / div) % 10;
|
||||
if ((neg == 1) && (digit == 3)) num = 10;
|
||||
bitpattern = EM_Numbers[num];
|
||||
for (i = 0; i < 7; i++)
|
||||
{
|
||||
bit = EFMDisplay.Number[digit].bit[i];
|
||||
com = EFMDisplay.Number[digit].com[i];
|
||||
if (bitpattern & (1 << i))
|
||||
{
|
||||
LCD_enableSegment(lcd, com, 1 << bit);
|
||||
}
|
||||
else
|
||||
{
|
||||
LCD_disableSegment(lcd, com, 1 << bit);
|
||||
}
|
||||
}
|
||||
div = div * 10;
|
||||
}
|
||||
}
|
||||
|
||||
/**************************************************************************//**
|
||||
* @brief Turn all segments on numeric display off
|
||||
* @param lcd Pointer to LCD register structure
|
||||
*****************************************************************************/
|
||||
void LCD_NumberOff(LCD_TypeDef *lcd)
|
||||
{
|
||||
int digit, i, bit, com;
|
||||
|
||||
/* Turn off all segments */
|
||||
for (digit = 0; digit < 4; digit++)
|
||||
{
|
||||
for (i = 0; i < 7; i++)
|
||||
{
|
||||
bit = EFMDisplay.Number[digit].bit[i];
|
||||
com = EFMDisplay.Number[digit].com[i];
|
||||
LCD_disableSegment(lcd, com, 1 << bit);
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
/**************************************************************************//**
|
||||
* @brief Write text on LCD display
|
||||
* @param lcd Pointer to LCD register structure
|
||||
* @param string Text string to show on display
|
||||
*****************************************************************************/
|
||||
void LCD_Write(LCD_TypeDef *lcd, char *string)
|
||||
{
|
||||
int data, length, index;
|
||||
uint16_t bitfield;
|
||||
uint32_t value;
|
||||
uint32_t com, bit;
|
||||
int i;
|
||||
|
||||
length = strlen(string);
|
||||
index = 0;
|
||||
/* fill out all characters on display */
|
||||
for (index = 0; index < 7; index++)
|
||||
{
|
||||
if (index < length)
|
||||
{
|
||||
data = (int) *string;
|
||||
}
|
||||
else /* padding with space */
|
||||
{
|
||||
data = 0x20; /* SPACE */
|
||||
}
|
||||
/* defined letters currently starts at "SPACE" - 0x20; */
|
||||
data = data - 0x20;
|
||||
bitfield = EM_alphabet[data];
|
||||
|
||||
|
||||
for (i = 0; i < 14; i++)
|
||||
{
|
||||
bit = EFMDisplay.Text[index].bit[i];
|
||||
com = EFMDisplay.Text[index].com[i];
|
||||
value = (1 << bit);
|
||||
|
||||
if (bitfield & (1 << i))
|
||||
{
|
||||
/* Turn on segment */
|
||||
LCD_enableSegment(lcd, com, value);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Turn off segment */
|
||||
LCD_disableSegment(lcd, com, value);
|
||||
}
|
||||
}
|
||||
string++;
|
||||
}
|
||||
while (lcd->SYNCBUSY) ;
|
||||
}
|
||||
|
||||
/**************************************************************************//**
|
||||
* @brief LCD Disable all segments
|
||||
* @param lcd Pointer to LCD register block
|
||||
*****************************************************************************/
|
||||
void LCD_AllOff(LCD_TypeDef *lcd)
|
||||
{
|
||||
lcd->SEGD0L = 0x00000000;
|
||||
lcd->SEGD0H = 0x00000000;
|
||||
lcd->SEGD1L = 0x00000000;
|
||||
lcd->SEGD1H = 0x00000000;
|
||||
lcd->SEGD2L = 0x00000000;
|
||||
lcd->SEGD2H = 0x00000000;
|
||||
lcd->SEGD3L = 0x00000000;
|
||||
lcd->SEGD3H = 0x00000000;
|
||||
while (lcd->SYNCBUSY) ;
|
||||
}
|
||||
|
||||
/**************************************************************************//**
|
||||
* @brief LCD Enable all segments
|
||||
* @param lcd Pointer to LCD register block
|
||||
*****************************************************************************/
|
||||
void LCD_AllOn(LCD_TypeDef *lcd)
|
||||
{
|
||||
lcd->SEGD0L = 0xffffffff;
|
||||
lcd->SEGD0H = 0xffffffff;
|
||||
lcd->SEGD1L = 0xffffffff;
|
||||
lcd->SEGD1H = 0xffffffff;
|
||||
lcd->SEGD2L = 0xffffffff;
|
||||
lcd->SEGD2H = 0xffffffff;
|
||||
lcd->SEGD3L = 0xffffffff;
|
||||
lcd->SEGD3H = 0xffffffff;
|
||||
while (lcd->SYNCBUSY) ;
|
||||
}
|
||||
|
||||
/**************************************************************************//**
|
||||
* @brief LCD Light up or shut off Energy Mode indicator
|
||||
* @param lcd Pointer to LCD register block
|
||||
* @pararm em Energy Mode numer 0 to 4
|
||||
* @param on Zero is off, non-zero is on
|
||||
*****************************************************************************/
|
||||
void LCD_EnergyMode(LCD_TypeDef *lcd, int em, int on)
|
||||
{
|
||||
uint32_t com, bitvalue;
|
||||
|
||||
com = EFMDisplay.EMode.com[em];
|
||||
bitvalue = 1 << EFMDisplay.EMode.bit[em];
|
||||
|
||||
if (on)
|
||||
{
|
||||
LCD_enableSegment(lcd, com, bitvalue);
|
||||
}
|
||||
else
|
||||
{
|
||||
LCD_disableSegment(lcd, com, bitvalue);
|
||||
}
|
||||
}
|
||||
|
||||
/**************************************************************************//**
|
||||
* @brief LCD Light up or shut off Ring of Indicators
|
||||
* @param lcd Pointer to LCD register block
|
||||
* @param anum "Segment number" on "Ring", range 0 - 7
|
||||
* @param on Zero is off, non-zero is on
|
||||
*****************************************************************************/
|
||||
void LCD_ARing(LCD_TypeDef *lcd, int anum, int on)
|
||||
{
|
||||
uint32_t com, bitvalue;
|
||||
|
||||
com = EFMDisplay.ARing.com[anum];
|
||||
bitvalue = 1 << EFMDisplay.ARing.bit[anum];
|
||||
|
||||
if (on)
|
||||
{
|
||||
LCD_enableSegment(lcd, com, bitvalue);
|
||||
}
|
||||
else
|
||||
{
|
||||
LCD_disableSegment(lcd, com, bitvalue);
|
||||
}
|
||||
}
|
||||
|
||||
/**************************************************************************//**
|
||||
* @brief LCD Light up or shut off various symbols on LCD Display
|
||||
* @param lcd Pointer to LCD register block
|
||||
* @param s Which symbol to turn on or off
|
||||
* @param on Zero is off, non-zero is on
|
||||
*****************************************************************************/
|
||||
void LCD_Symbol(LCD_TypeDef *lcd, lcdSymbol s, int on)
|
||||
{
|
||||
int com, bit;
|
||||
|
||||
switch (s)
|
||||
{
|
||||
case LCD_SYMBOL_GECKO:
|
||||
com = 3; bit = 8;
|
||||
break;
|
||||
case LCD_SYMBOL_ANT:
|
||||
com = 3; bit = 1;
|
||||
break;
|
||||
case LCD_SYMBOL_PAD0:
|
||||
com = 1; bit = 8;
|
||||
break;
|
||||
case LCD_SYMBOL_PAD1:
|
||||
com = 2; bit = 8;
|
||||
break;
|
||||
case LCD_SYMBOL_AM:
|
||||
com = 4; bit = 0;
|
||||
break;
|
||||
case LCD_SYMBOL_PM:
|
||||
com = 4; bit = 3;
|
||||
break;
|
||||
case LCD_SYMBOL_EFM32:
|
||||
com = 0; bit = 8;
|
||||
break;
|
||||
case LCD_SYMBOL_MINUS:
|
||||
com = 0; bit = 9;
|
||||
break;
|
||||
case LCD_SYMBOL_COL3:
|
||||
com = 0; bit = 16;
|
||||
break;
|
||||
case LCD_SYMBOL_COL5:
|
||||
com = 0; bit = 24;
|
||||
break;
|
||||
case LCD_SYMBOL_COL10:
|
||||
com = 4; bit = 7;
|
||||
break;
|
||||
case LCD_SYMBOL_DP2:
|
||||
com = 4; bit = 2;
|
||||
break;
|
||||
case LCD_SYMBOL_DP3:
|
||||
com = 5; bit = 2;
|
||||
break;
|
||||
case LCD_SYMBOL_DP4:
|
||||
com = 6; bit = 2;
|
||||
break;
|
||||
case LCD_SYMBOL_DP5:
|
||||
com = 7; bit = 2;
|
||||
break;
|
||||
case LCD_SYMBOL_DP6:
|
||||
com = 0; bit = 21;
|
||||
break;
|
||||
case LCD_SYMBOL_DP10:
|
||||
com = 4; bit = 5;
|
||||
break;
|
||||
}
|
||||
if (on)
|
||||
{
|
||||
LCD_enableSegment(lcd, com, 1 << bit);
|
||||
}
|
||||
else
|
||||
{
|
||||
LCD_disableSegment(lcd, com, 1 << bit);
|
||||
}
|
||||
}
|
||||
|
||||
/**************************************************************************//**
|
||||
* @brief LCD Light up or shut off Battery Indicator
|
||||
* @param lcd Pointer to LCD register block
|
||||
* @param batteryLevel Battery Level, 0 to 4 (0 turns all off)
|
||||
*****************************************************************************/
|
||||
void LCD_Battery(LCD_TypeDef *lcd, int batteryLevel)
|
||||
{
|
||||
uint32_t com, bitvalue;
|
||||
int i, on;
|
||||
|
||||
for (i = 0; i < 4; i++)
|
||||
{
|
||||
if (i < batteryLevel)
|
||||
{
|
||||
on = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
on = 0;
|
||||
}
|
||||
com = EFMDisplay.Battery.com[i];
|
||||
bitvalue = 1 << EFMDisplay.Battery.bit[i];
|
||||
|
||||
if (on)
|
||||
{
|
||||
LCD_enableSegment(lcd, com, bitvalue);
|
||||
}
|
||||
else
|
||||
{
|
||||
LCD_disableSegment(lcd, com, bitvalue);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**************************************************************************//**
|
||||
* @brief LCD Initialization routine for EFM32 DVK display
|
||||
* @param lcd Pointer to LCD register block
|
||||
*****************************************************************************/
|
||||
void LCD_Init(LCD_TypeDef *lcd)
|
||||
{
|
||||
CMU_TypeDef *cmu = CMU;
|
||||
|
||||
/* Enable LFXO oscillator */
|
||||
cmu->OSCENCMD |= CMU_OSCENCMD_LFXOEN;
|
||||
while (!(cmu->STATUS & CMU_STATUS_LFXORDY)) ;
|
||||
|
||||
/* Enable LCD clock in CMU */
|
||||
cmu->LFACLKEN0 |= CMU_LFACLKEN0_LCD;
|
||||
|
||||
/* Select LFXO for LCD */
|
||||
cmu->LFCLKSEL = CMU_LFCLKSEL_LFA_LFXO | CMU_LFCLKSEL_LFB_LFXO;
|
||||
|
||||
/* LCD Controller Prescaler (divide by 1) */
|
||||
/* CLKlcd = 0.25 kHz */
|
||||
cmu->LFAPRESC0 &= ~_CMU_LFAPRESC0_LCD_MASK;
|
||||
cmu->LFAPRESC0 |= _CMU_LFAPRESC0_LCD_DIV128 << _CMU_LFAPRESC0_LCD_SHIFT;
|
||||
|
||||
/* Set up interrupt handler */
|
||||
lcd->IEN = 0;
|
||||
while (lcd->SYNCBUSY) ;
|
||||
|
||||
/* Clear pending interrupts */
|
||||
lcd->IFC = ~0;
|
||||
/* Enable interrupt */
|
||||
NVIC_EnableIRQ(LCD_IRQn);
|
||||
lcd->IEN = LCD_IEN_FC;
|
||||
|
||||
/* Frame rate is 32Hz, 0.25Khz LFCLK128, QUADRUPLEX mode, FDIV=0 */
|
||||
lcd->DISPCTRL = LCD_DISPCTRL_MUX_QUADRUPLEX |
|
||||
LCD_DISPCTRL_BIAS_ONETHIRD |
|
||||
LCD_DISPCTRL_WAVE_LOWPOWER |
|
||||
LCD_DISPCTRL_CONLEV_MAX |
|
||||
LCD_DISPCTRL_VLCDSEL_VDD |
|
||||
LCD_DISPCTRL_VBLEV_3V00;
|
||||
|
||||
/* No voltage boost, framerate 32Hz */
|
||||
cmu->LCDCTRL = 0;
|
||||
|
||||
/* Turn all segments off */
|
||||
LCD_AllOff(lcd);
|
||||
|
||||
/* Enable all segment registers */
|
||||
lcd->SEGEN = 0x000003FF;
|
||||
lcd->CTRL = LCD_CTRL_EN | LCD_CTRL_UDCTRL_FRAMESTART;
|
||||
while (lcd->SYNCBUSY) ;
|
||||
|
||||
/* Configure LCD to give a frame counter interrupt every 8th frame. */
|
||||
lcd->BACTRL = LCD_BACTRL_FCEN | (7 << _LCD_BACTRL_FCTOP_SHIFT) | (0 << _LCD_BACTRL_FCPRESC_SHIFT);
|
||||
while (lcd->SYNCBUSY) ;
|
||||
lcd->IFC = LCD_IFC_FC;
|
||||
lcd->IEN = LCD_IEN_FC;
|
||||
}
|
||||
|
||||
|
||||
/**************************************************************************//**
|
||||
* @brief Disables LCD controller
|
||||
* @param lcd Pointer to LCD register block
|
||||
*****************************************************************************/
|
||||
void LCD_Disable(LCD_TypeDef *lcd)
|
||||
{
|
||||
CMU_TypeDef *cmu = CMU;
|
||||
|
||||
/* Turn off interrupts */
|
||||
lcd->IEN = 0x00000000;
|
||||
lcd->IFC = LCD_IFC_FC;
|
||||
NVIC_DisableIRQ(LCD_IRQn);
|
||||
/* Disable LCD */
|
||||
lcd->CTRL = 0;
|
||||
/* Turn off LCD clock */
|
||||
cmu->LFACLKEN0 &= ~(CMU_LFACLKEN0_LCD);
|
||||
/* Turn off voltage boost if enabled */
|
||||
cmu->LCDCTRL = 0;
|
||||
}
|
||||
|
||||
/**************************************************************************//**
|
||||
* @brief LCD scrolls a text over the display, sort of "polled printf"
|
||||
* @param lcd Pointer to LCD register block
|
||||
*****************************************************************************/
|
||||
void LCD_ScrollText(LCD_TypeDef *lcd, char *scrolltext)
|
||||
{
|
||||
int i, len;
|
||||
char buffer[8];
|
||||
|
||||
buffer[7] = 0x00;
|
||||
len = strlen(scrolltext);
|
||||
if (len < 7) return;
|
||||
for (i = 0; i < (len - 7); i++)
|
||||
{
|
||||
memcpy(buffer, scrolltext + i, 7);
|
||||
LCD_Write(lcd, buffer);
|
||||
vTaskDelay(100/portTICK_PERIOD_MS);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1,73 +0,0 @@
|
|||
/**************************************************************************//**
|
||||
* @file
|
||||
* @brief LCD Controller header file
|
||||
* @author Energy Micro AS
|
||||
* @version 1.0.1
|
||||
******************************************************************************
|
||||
* @section License
|
||||
* <b>(C) Copyright 2009 Energy Micro AS, http://www.energymicro.com</b>
|
||||
******************************************************************************
|
||||
*
|
||||
* This source code is the property of Energy Micro AS. The source and compiled
|
||||
* code may only be used on Energy Micro "EFM32" microcontrollers.
|
||||
*
|
||||
* This copyright notice may not be removed from the source code nor changed.
|
||||
*
|
||||
* DISCLAIMER OF WARRANTY/LIMITATION OF REMEDIES: Energy Micro AS has no
|
||||
* obligation to support this Software. Energy Micro AS is providing the
|
||||
* Software "AS IS", with no express or implied warranties of any kind,
|
||||
* including, but not limited to, any implied warranties of merchantability
|
||||
* or fitness for any particular purpose or warranties against infringement
|
||||
* of any proprietary rights of a third party.
|
||||
*
|
||||
* Energy Micro AS will not be liable for any consequential, incidental, or
|
||||
* special damages, or any other relief, or for any claim by any third party,
|
||||
* arising from your use of this Software.
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
#ifndef _LCDCONTROLLER_H
|
||||
#define _LCDCONTROLLER_H
|
||||
|
||||
#include "efm32.h"
|
||||
|
||||
/* Range of symbols available on display */
|
||||
typedef enum
|
||||
{
|
||||
LCD_SYMBOL_GECKO,
|
||||
LCD_SYMBOL_ANT,
|
||||
LCD_SYMBOL_PAD0,
|
||||
LCD_SYMBOL_PAD1,
|
||||
LCD_SYMBOL_AM,
|
||||
LCD_SYMBOL_PM,
|
||||
LCD_SYMBOL_EFM32,
|
||||
LCD_SYMBOL_MINUS,
|
||||
LCD_SYMBOL_COL3,
|
||||
LCD_SYMBOL_COL5,
|
||||
LCD_SYMBOL_COL10,
|
||||
LCD_SYMBOL_DP2,
|
||||
LCD_SYMBOL_DP3,
|
||||
LCD_SYMBOL_DP4,
|
||||
LCD_SYMBOL_DP5,
|
||||
LCD_SYMBOL_DP6,
|
||||
LCD_SYMBOL_DP10,
|
||||
} lcdSymbol;
|
||||
|
||||
/* Regular functions */
|
||||
void LCD_Init(LCD_TypeDef *lcd);
|
||||
void LCD_IRQHandler(void);
|
||||
void LCD_Disable(LCD_TypeDef *lcd);
|
||||
|
||||
void LCD_AllOff(LCD_TypeDef *lcd);
|
||||
void LCD_AllOn(LCD_TypeDef *lcd);
|
||||
|
||||
void LCD_ARing(LCD_TypeDef *lcd, int anum, int on);
|
||||
void LCD_Battery(LCD_TypeDef *lcd, int batteryLevel);
|
||||
void LCD_EnergyMode(LCD_TypeDef *lcd, int em, int on);
|
||||
void LCD_Number(LCD_TypeDef *lcd, int value);
|
||||
void LCD_NumberOff(LCD_TypeDef *lcd);
|
||||
void LCD_Symbol(LCD_TypeDef *lcd, lcdSymbol s, int on);
|
||||
void LCD_Write(LCD_TypeDef *lcd, char *string);
|
||||
void LCD_ScrollText(LCD_TypeDef *lcd, char *scrolltext);
|
||||
|
||||
#endif
|
|
@ -1,391 +0,0 @@
|
|||
/**************************************************************************//**
|
||||
* @file
|
||||
* @brief LCD Controller font and display layout for EFM32 development MCU
|
||||
* module
|
||||
* @author Energy Micro AS
|
||||
* @version 1.0.1
|
||||
******************************************************************************
|
||||
* @section License
|
||||
* <b>(C) Copyright 2009 Energy Micro AS, http://www.energymicro.com</b>
|
||||
******************************************************************************
|
||||
*
|
||||
* This source code is the property of Energy Micro AS. The source and compiled
|
||||
* code may only be used on Energy Micro "EFM32" microcontrollers.
|
||||
*
|
||||
* This copyright notice may not be removed from the source code nor changed.
|
||||
*
|
||||
* DISCLAIMER OF WARRANTY/LIMITATION OF REMEDIES: Energy Micro AS has no
|
||||
* obligation to support this Software. Energy Micro AS is providing the
|
||||
* Software "AS IS", with no express or implied warranties of any kind,
|
||||
* including, but not limited to, any implied warranties of merchantability
|
||||
* or fitness for any particular purpose or warranties against infringement
|
||||
* of any proprietary rights of a third party.
|
||||
*
|
||||
* Energy Micro AS will not be liable for any consequential, incidental, or
|
||||
* special damages, or any other relief, or for any claim by any third party,
|
||||
* arising from your use of this Software.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef _LCDDISPLAY_H
|
||||
#define _LCDDISPLAY_H
|
||||
|
||||
#include <stdint.h>
|
||||
/**************************************************************************//**
|
||||
* @brief
|
||||
* Defines each text symbol's segment in terms of COM and BIT numbers,
|
||||
* in a way that we can enumerate each bit for each text segment in the
|
||||
* following bit pattern:
|
||||
* @verbatim
|
||||
* -------0------
|
||||
*
|
||||
* | \7 |8 /9 |
|
||||
* |5 \ | / |1
|
||||
*
|
||||
* --6--- ---10--
|
||||
*
|
||||
* | / | \11 |
|
||||
* |4 /13 |12 \ |2
|
||||
*
|
||||
* -------3------
|
||||
* @endverbatim
|
||||
* E.g.: First text character bit pattern #3 (above) is
|
||||
* Segment 1D for Display
|
||||
* Location COM 3, BIT 0
|
||||
*****************************************************************************/
|
||||
typedef struct
|
||||
{
|
||||
uint32_t com[14]; /**< LCD COM line (for multiplexing) */
|
||||
uint32_t bit[14]; /**< LCD bit number */
|
||||
} CHAR_TypeDef;
|
||||
|
||||
|
||||
/**************************************************************************//**
|
||||
* @brief Defines segment COM and BIT fields numeric display
|
||||
*****************************************************************************/
|
||||
typedef struct
|
||||
{
|
||||
uint32_t com[7];
|
||||
uint32_t bit[7];
|
||||
} NUMBER_TypeDef;
|
||||
|
||||
/**************************************************************************//**
|
||||
* @brief Defines segment COM and BIT fields for Energy Modes on display
|
||||
*****************************************************************************/
|
||||
typedef struct
|
||||
{
|
||||
uint32_t com[5]; /**< LCD COM line (for multiplexing) */
|
||||
uint32_t bit[5]; /**< LCD bit number */
|
||||
} EM_TypeDef;
|
||||
|
||||
/**************************************************************************//**
|
||||
* @brief Defines segment COM and BIT fields for A-wheel (suited for Anim)
|
||||
*****************************************************************************/
|
||||
typedef struct
|
||||
{
|
||||
uint32_t com[8]; /**< LCD COM line (for multiplexing) */
|
||||
uint32_t bit[8]; /**< LCD bit number */
|
||||
} ARING_TypeDef;
|
||||
|
||||
/**************************************************************************//**
|
||||
* @brief Defines segment COM and BIT fields for A-wheel (suited for Anim)
|
||||
*****************************************************************************/
|
||||
typedef struct
|
||||
{
|
||||
uint32_t com[4]; /**< LCD COM line (for multiplexing) */
|
||||
uint32_t bit[4]; /**< LCD bit number */
|
||||
} BATTERY_TypeDef;
|
||||
|
||||
/**************************************************************************//**
|
||||
* @brief Defines prototype for all segments in display
|
||||
*****************************************************************************/
|
||||
typedef struct
|
||||
{
|
||||
CHAR_TypeDef Text[7];
|
||||
NUMBER_TypeDef Number[4];
|
||||
EM_TypeDef EMode;
|
||||
ARING_TypeDef ARing;
|
||||
BATTERY_TypeDef Battery;
|
||||
} MCU_DISPLAY;
|
||||
|
||||
/**************************************************************************//**
|
||||
* @brief Working instance of LCD display
|
||||
*****************************************************************************/
|
||||
MCU_DISPLAY EFMDisplay = {
|
||||
.Text = {
|
||||
{ /* 1 */
|
||||
.com[0] = 3, .com[1] = 3, .com[2] = 1, .com[3] = 0,
|
||||
.bit[0] = 10, .bit[1] = 12, .bit[2] = 12, .bit[3] = 10,
|
||||
|
||||
.com[4] = 1, .com[5] = 3, .com[6] = 2, .com[7] = 2,
|
||||
.bit[4] = 9, .bit[5] = 9, .bit[6] = 9, .bit[7] = 10,
|
||||
|
||||
.com[8] = 2, .com[9] = 3, .com[10] = 2, .com[11] = 0,
|
||||
.bit[8] = 11, .bit[9] = 11, .bit[10] = 12, .bit[11] = 11,
|
||||
|
||||
.com[12] = 1, .com[13] = 1,
|
||||
.bit[12] = 11, .bit[13] = 10
|
||||
},
|
||||
{ /* 2 */
|
||||
.com[0] = 3, .com[1] = 3, .com[2] = 1, .com[3] = 0,
|
||||
.bit[0] = 14, .bit[1] = 16, .bit[2] = 16, .bit[3] = 14,
|
||||
|
||||
.com[4] = 1, .com[5] = 3, .com[6] = 2, .com[7] = 2,
|
||||
.bit[4] = 13, .bit[5] = 13, .bit[6] = 13, .bit[7] = 14,
|
||||
|
||||
.com[8] = 2, .com[9] = 3, .com[10] = 2, .com[11] = 0,
|
||||
.bit[8] = 15, .bit[9] = 15, .bit[10] = 16, .bit[11] = 15,
|
||||
|
||||
.com[12] = 1, .com[13] = 1,
|
||||
.bit[12] = 15, .bit[13] = 14
|
||||
},
|
||||
{ /* 3 */
|
||||
.com[0] = 3, .com[1] = 3, .com[2] = 1, .com[3] = 0,
|
||||
.bit[0] = 18, .bit[1] = 20, .bit[2] = 20, .bit[3] = 18,
|
||||
|
||||
.com[4] = 1, .com[5] = 3, .com[6] = 2, .com[7] = 2,
|
||||
.bit[4] = 17, .bit[5] = 17, .bit[6] = 17, .bit[7] = 18,
|
||||
|
||||
.com[8] = 2, .com[9] = 3, .com[10] = 2, .com[11] = 0,
|
||||
.bit[8] = 19, .bit[9] = 19, .bit[10] = 20, .bit[11] = 19,
|
||||
|
||||
.com[12] = 1, .com[13] = 1,
|
||||
.bit[12] = 19, .bit[13] = 18
|
||||
},
|
||||
{ /* 4 */
|
||||
.com[0] = 3, .com[1] = 3, .com[2] = 1, .com[3] = 0,
|
||||
.bit[0] = 22, .bit[1] = 24, .bit[2] = 24, .bit[3] = 22,
|
||||
|
||||
.com[4] = 1, .com[5] = 3, .com[6] = 2, .com[7] = 2,
|
||||
.bit[4] = 21, .bit[5] = 21, .bit[6] = 21, .bit[7] = 22,
|
||||
|
||||
.com[8] = 2, .com[9] = 3, .com[10] = 2, .com[11] = 0,
|
||||
.bit[8] = 23, .bit[9] = 23, .bit[10] = 24, .bit[11] = 23,
|
||||
|
||||
.com[12] = 1, .com[13] = 1,
|
||||
.bit[12] = 23, .bit[13] = 22
|
||||
},
|
||||
{ /* 5 */
|
||||
.com[0] = 3, .com[1] = 3, .com[2] = 1, .com[3] = 0,
|
||||
.bit[0] = 25, .bit[1] = 6, .bit[2] = 6, .bit[3] = 25,
|
||||
|
||||
.com[4] = 1, .com[5] = 3, .com[6] = 2, .com[7] = 2,
|
||||
.bit[4] = 7, .bit[5] = 7, .bit[6] = 7, .bit[7] = 25,
|
||||
|
||||
.com[8] = 2, .com[9] = 3, .com[10] = 2, .com[11] = 0,
|
||||
.bit[8] = 26, .bit[9] = 26, .bit[10] = 6, .bit[11] = 26,
|
||||
|
||||
.com[12] = 1, .com[13] = 1,
|
||||
.bit[12] = 26, .bit[13] = 25
|
||||
},
|
||||
{ /* 6 */
|
||||
.com[0] = 3, .com[1] = 3, .com[2] = 1, .com[3] = 0,
|
||||
.bit[0] = 27, .bit[1] = 04, .bit[2] = 04, .bit[3] = 27,
|
||||
|
||||
.com[4] = 1, .com[5] = 3, .com[6] = 2, .com[7] = 2,
|
||||
.bit[4] = 5, .bit[5] = 5, .bit[6] = 5, .bit[7] = 27,
|
||||
|
||||
.com[8] = 2, .com[9] = 3, .com[10] = 2, .com[11] = 0,
|
||||
.bit[8] = 28, .bit[9] = 28, .bit[10] = 4, .bit[11] = 28,
|
||||
|
||||
.com[12] = 1, .com[13] = 1,
|
||||
.bit[12] = 28, .bit[13] = 27
|
||||
},
|
||||
{ /* 7 */
|
||||
.com[0] = 3, .com[1] = 3, .com[2] = 1, .com[3] = 0,
|
||||
.bit[0] = 29, .bit[1] = 2, .bit[2] = 2, .bit[3] = 29,
|
||||
|
||||
.com[4] = 1, .com[5] = 3, .com[6] = 2, .com[7] = 2,
|
||||
.bit[4] = 03, .bit[5] = 3, .bit[6] = 3, .bit[7] = 29,
|
||||
|
||||
.com[8] = 2, .com[9] = 3, .com[10] = 2, .com[11] = 0,
|
||||
.bit[8] = 30, .bit[9] = 30, .bit[10] = 2, .bit[11] = 30,
|
||||
|
||||
.com[12] = 1, .com[13] = 1,
|
||||
.bit[12] = 30, .bit[13] = 29
|
||||
}
|
||||
},
|
||||
.Number = {
|
||||
{
|
||||
.com[0] = 3, .com[1] = 2, .com[2] = 1, .com[3] = 0,
|
||||
.bit[0] = 31, .bit[1] = 31, .bit[2] = 31, .bit[3] = 31,
|
||||
|
||||
.com[4] = 5, .com[5] = 7, .com[6] = 6,
|
||||
.bit[4] = 0, .bit[5] = 0, .bit[6] = 0,
|
||||
},
|
||||
{
|
||||
.com[0] = 7, .com[1] = 6, .com[2] = 5, .com[3] = 4,
|
||||
.bit[0] = 1, .bit[1] = 1, .bit[2] = 1, .bit[3] = 1,
|
||||
|
||||
.com[4] = 5, .com[5] = 7, .com[6] = 6,
|
||||
.bit[4] = 3, .bit[5] = 3, .bit[6] = 3,
|
||||
},
|
||||
{
|
||||
.com[0] = 7, .com[1] = 6, .com[2] = 5, .com[3] = 4,
|
||||
.bit[0] = 4, .bit[1] = 4, .bit[2] = 4, .bit[3] = 4,
|
||||
|
||||
.com[4] = 5, .com[5] = 7, .com[6] = 6,
|
||||
.bit[4] = 5, .bit[5] = 5, .bit[6] = 5,
|
||||
},
|
||||
{
|
||||
.com[0] = 7, .com[1] = 6, .com[2] = 5, .com[3] = 4,
|
||||
.bit[0] = 6, .bit[1] = 6, .bit[2] = 6, .bit[3] = 6,
|
||||
|
||||
.com[4] = 5, .com[5] = 7, .com[6] = 6,
|
||||
.bit[4] = 7, .bit[5] = 7, .bit[6] = 7,
|
||||
},
|
||||
},
|
||||
.EMode = {
|
||||
.com[0] = 1, .bit[0] = 1,
|
||||
.com[1] = 2, .bit[1] = 1,
|
||||
.com[2] = 1, .bit[2] = 0,
|
||||
.com[3] = 2, .bit[3] = 0,
|
||||
.com[4] = 3, .bit[4] = 0,
|
||||
},
|
||||
.ARing = {
|
||||
.com[0] = 0, .bit[0] = 0,
|
||||
.com[1] = 0, .bit[1] = 1,
|
||||
.com[2] = 0, .bit[2] = 2,
|
||||
.com[3] = 0, .bit[3] = 3,
|
||||
|
||||
.com[4] = 0, .bit[4] = 4,
|
||||
.com[5] = 0, .bit[5] = 5,
|
||||
.com[6] = 0, .bit[6] = 6,
|
||||
.com[7] = 0, .bit[7] = 7,
|
||||
},
|
||||
.Battery = {
|
||||
.com[0] = 0, .bit[0] = 12,
|
||||
.com[1] = 0, .bit[1] = 17,
|
||||
.com[2] = 0, .bit[2] = 20,
|
||||
.com[3] = 0, .bit[3] = 13,
|
||||
}
|
||||
};
|
||||
|
||||
/**************************************************************************//**
|
||||
* @brief
|
||||
* Defines higlighted segments for the alphabet, starting from "blank" (SPACE)
|
||||
* Uses bit pattern as defined for text segments above.
|
||||
* E.g. a capital O, would have bits 0 1 2 3 4 5 => 0x003f defined
|
||||
*****************************************************************************/
|
||||
uint16_t EM_alphabet[] = {
|
||||
0x0000, /* space */
|
||||
0x1100, /* ! */
|
||||
0x0280, /* " */
|
||||
0x0000, /* # */
|
||||
0x0000, /* $ */
|
||||
0x0000, /* % */
|
||||
0x0000, /* & */
|
||||
0x0000, /* £ */
|
||||
0x0039, /* ( */
|
||||
0x000f, /* ) */
|
||||
0x0000, /* * */
|
||||
0x1540, /* + */
|
||||
0x0000, /* , */
|
||||
0x0440, /* - */
|
||||
0x0000, /* . */
|
||||
0x2200, /* / */
|
||||
|
||||
0x003f, /* 0 */
|
||||
0x0006, /* 1 */
|
||||
0x045b, /* 2 */
|
||||
0x044f, /* 3 */
|
||||
0x0466, /* 4 */
|
||||
0x046d, /* 5 */
|
||||
0x047d, /* 6 */
|
||||
0x0007, /* 7 */
|
||||
0x047f, /* 8 */
|
||||
0x046f, /* 9 */
|
||||
|
||||
0x0000, /* : */
|
||||
0x0000, /* ; */
|
||||
0x0a00, /* < */
|
||||
0x0000, /* = */
|
||||
0x2080, /* > */
|
||||
0x0000, /* ? */
|
||||
0xffff, /* @ */
|
||||
|
||||
0x0477, /* A */
|
||||
0x0a79, /* B */
|
||||
0x0039, /* C */
|
||||
0x20b0, /* D */
|
||||
0x0079, /* E */
|
||||
0x0071, /* F */
|
||||
0x047d, /* G */
|
||||
0x0476, /* H */
|
||||
0x0006, /* I */
|
||||
0x000e, /* J */
|
||||
0x0a70, /* K */
|
||||
0x0038, /* L */
|
||||
0x02b6, /* M */
|
||||
0x08b6, /* N */
|
||||
0x003f, /* O */
|
||||
0x0473, /* P */
|
||||
0x083f, /* Q */
|
||||
0x0c73, /* R */
|
||||
0x046d, /* S */
|
||||
0x1101, /* T */
|
||||
0x003e, /* U */
|
||||
0x2230, /* V */
|
||||
0x2836, /* W */
|
||||
0x2a80, /* X */
|
||||
0x046e, /* Y */
|
||||
0x2209, /* Z */
|
||||
|
||||
0x0039, /* [ */
|
||||
0x0880, /* backslash */
|
||||
0x000f, /* ] */
|
||||
0x0001, /* ^ */
|
||||
0x0008, /* _ */
|
||||
0x0100, /* ` */
|
||||
|
||||
0x1058, /* a */
|
||||
0x047c, /* b */
|
||||
0x0058, /* c */
|
||||
0x045e, /* d */
|
||||
0x2058, /* e */
|
||||
0x0471, /* f */
|
||||
0x0c0c, /* g */
|
||||
0x0474, /* h */
|
||||
0x0004, /* i */
|
||||
0x000e, /* j */
|
||||
0x0c70, /* k */
|
||||
0x0038, /* l */
|
||||
0x1454, /* m */
|
||||
0x0454, /* n */
|
||||
0x045c, /* o */
|
||||
0x0473, /* p */
|
||||
0x0467, /* q */
|
||||
0x0450, /* r */
|
||||
0x0c08, /* s */
|
||||
0x0078, /* t */
|
||||
0x001c, /* u */
|
||||
0x2010, /* v */
|
||||
0x2814, /* w */
|
||||
0x2a80, /* x */
|
||||
0x080c, /* y */
|
||||
0x2048, /* z */
|
||||
|
||||
0x0000,
|
||||
};
|
||||
|
||||
/**************************************************************************//**
|
||||
* @brief
|
||||
* Defines higlighted segments for the numeric display
|
||||
*****************************************************************************/
|
||||
uint16_t EM_Numbers[] =
|
||||
{
|
||||
0x003f, /* 0 */
|
||||
0x0006, /* 1 */
|
||||
0x005b, /* 2 */
|
||||
0x004f, /* 3 */
|
||||
0x0066, /* 4 */
|
||||
0x006d, /* 5 */
|
||||
0x007d, /* 6 */
|
||||
0x0007, /* 7 */
|
||||
0x007f, /* 8 */
|
||||
0x006f, /* 9 */
|
||||
0x0040, /* - */
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
@ -1,141 +0,0 @@
|
|||
/*
|
||||
FreeRTOS V9.0.0rc2 - Copyright (C) 2016 Real Time Engineers Ltd.
|
||||
All rights reserved
|
||||
|
||||
VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.
|
||||
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
FreeRTOS is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License (version 2) as published by the
|
||||
Free Software Foundation >>>> AND MODIFIED BY <<<< the FreeRTOS exception.
|
||||
|
||||
***************************************************************************
|
||||
>>! NOTE: The modification to the GPL is included to allow you to !<<
|
||||
>>! distribute a combined work that includes FreeRTOS without being !<<
|
||||
>>! obliged to provide the source code for proprietary components !<<
|
||||
>>! outside of the FreeRTOS kernel. !<<
|
||||
***************************************************************************
|
||||
|
||||
FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
FOR A PARTICULAR PURPOSE. Full license text is available on the following
|
||||
link: http://www.freertos.org/a00114.html
|
||||
|
||||
***************************************************************************
|
||||
* *
|
||||
* FreeRTOS provides completely free yet professionally developed, *
|
||||
* robust, strictly quality controlled, supported, and cross *
|
||||
* platform software that is more than just the market leader, it *
|
||||
* is the industry's de facto standard. *
|
||||
* *
|
||||
* Help yourself get started quickly while simultaneously helping *
|
||||
* to support the FreeRTOS project by purchasing a FreeRTOS *
|
||||
* tutorial book, reference manual, or both: *
|
||||
* http://www.FreeRTOS.org/Documentation *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
http://www.FreeRTOS.org/FAQHelp.html - Having a problem? Start by reading
|
||||
the FAQ page "My application does not run, what could be wrong?". Have you
|
||||
defined configASSERT()?
|
||||
|
||||
http://www.FreeRTOS.org/support - In return for receiving this top quality
|
||||
embedded software for free we request you assist our global community by
|
||||
participating in the support forum.
|
||||
|
||||
http://www.FreeRTOS.org/training - Investing in training allows your team to
|
||||
be as productive as possible as early as possible. Now you can receive
|
||||
FreeRTOS training directly from Richard Barry, CEO of Real Time Engineers
|
||||
Ltd, and the world's leading authority on the world's leading RTOS.
|
||||
|
||||
http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,
|
||||
including FreeRTOS+Trace - an indispensable productivity tool, a DOS
|
||||
compatible FAT file system, and our tiny thread aware UDP/IP stack.
|
||||
|
||||
http://www.FreeRTOS.org/labs - Where new FreeRTOS products go to incubate.
|
||||
Come and try FreeRTOS+TCP, our new open source TCP/IP stack for FreeRTOS.
|
||||
|
||||
http://www.OpenRTOS.com - Real Time Engineers ltd. license FreeRTOS to High
|
||||
Integrity Systems ltd. to sell under the OpenRTOS brand. Low cost OpenRTOS
|
||||
licenses offer ticketed support, indemnification and commercial middleware.
|
||||
|
||||
http://www.SafeRTOS.com - High Integrity Systems also provide a safety
|
||||
engineered and independently SIL3 certified version for use in safety and
|
||||
mission critical applications that require provable dependability.
|
||||
|
||||
1 tab == 4 spaces!
|
||||
*/
|
||||
|
||||
/* Kernel includes. */
|
||||
#include "FreeRTOS.h"
|
||||
#include "task.h"
|
||||
|
||||
/* Demo includes. */
|
||||
#include "lcdtest.h"
|
||||
|
||||
#define lcdSHORT_DELAY ( 60 / portTICK_PERIOD_MS )
|
||||
#define lcdQUARTER_SECOND ( 250 / portTICK_PERIOD_MS )
|
||||
#define lcdONE_SECOND ( 1000 / portTICK_PERIOD_MS )
|
||||
|
||||
void vLCDTask( void *pvParameters )
|
||||
{
|
||||
long x;
|
||||
LCD_TypeDef *xLCD = LCD;
|
||||
char *pcScrollText = "FreeRTOS Energy Micro ";
|
||||
|
||||
/* Loop through various different displays. */
|
||||
for( ;; )
|
||||
{
|
||||
/* Start by scrolling some text. */
|
||||
LCD_ScrollText( xLCD, pcScrollText );
|
||||
LCD_AllOff( xLCD );
|
||||
|
||||
/* Count down from 100 on the number section of the LCD display. */
|
||||
for( x = 100; x > 0; x--)
|
||||
{
|
||||
LCD_Number( xLCD, x );
|
||||
vTaskDelay( 10 );
|
||||
}
|
||||
LCD_NumberOff( xLCD );
|
||||
|
||||
/* Turn on gecko and EFM32 symbol. */
|
||||
LCD_Symbol( xLCD, LCD_SYMBOL_GECKO, 1 );
|
||||
LCD_Symbol( xLCD, LCD_SYMBOL_EFM32, 1 );
|
||||
LCD_Write( xLCD, " Gecko " );
|
||||
vTaskDelay( lcdONE_SECOND );
|
||||
|
||||
LCD_AllOn( xLCD);
|
||||
vTaskDelay( lcdONE_SECOND );
|
||||
|
||||
LCD_AllOff( xLCD);
|
||||
LCD_Write( xLCD, "OOOOOOO" );
|
||||
vTaskDelay( lcdSHORT_DELAY );
|
||||
LCD_Write( xLCD, "XXXXXXX" );
|
||||
vTaskDelay( lcdSHORT_DELAY );
|
||||
LCD_Write( xLCD, "+++++++" );
|
||||
vTaskDelay( lcdSHORT_DELAY );
|
||||
LCD_Write( xLCD, "@@@@@@@" );
|
||||
vTaskDelay( lcdSHORT_DELAY );
|
||||
LCD_Write( xLCD, "ENERGY " );
|
||||
vTaskDelay( lcdQUARTER_SECOND );
|
||||
LCD_Write( xLCD, "@@ERGY " );
|
||||
vTaskDelay( lcdSHORT_DELAY );
|
||||
LCD_Write( xLCD, " @@RGY " );
|
||||
vTaskDelay( lcdSHORT_DELAY );
|
||||
LCD_Write( xLCD, " M@@GY " );
|
||||
vTaskDelay( lcdSHORT_DELAY );
|
||||
LCD_Write( xLCD, " MI@@Y " );
|
||||
vTaskDelay( lcdSHORT_DELAY );
|
||||
LCD_Write( xLCD, " MIC@@ " );
|
||||
vTaskDelay( lcdSHORT_DELAY );
|
||||
LCD_Write( xLCD, " MICR@@" );
|
||||
vTaskDelay( lcdSHORT_DELAY );
|
||||
LCD_Write( xLCD, " MICRO@" );
|
||||
vTaskDelay( lcdSHORT_DELAY );
|
||||
LCD_Write( xLCD, " MICRO " );
|
||||
vTaskDelay( lcdQUARTER_SECOND );
|
||||
LCD_Write( xLCD, "-EFM32-" );
|
||||
vTaskDelay( lcdQUARTER_SECOND );
|
||||
}
|
||||
}
|
|
@ -1,14 +0,0 @@
|
|||
#ifndef _LCDTEST_H
|
||||
#define _LCDTEST_H
|
||||
|
||||
#include "FreeRTOS.h"
|
||||
#include "task.h"
|
||||
|
||||
#include "lcdcontroller.h"
|
||||
|
||||
/*
|
||||
* The task that writes to the LCD.
|
||||
*/
|
||||
void vLCDTask( void *pvParameters );
|
||||
|
||||
#endif
|
|
@ -1,99 +0,0 @@
|
|||
/*
|
||||
FreeRTOS V9.0.0rc2 - Copyright (C) 2016 Real Time Engineers Ltd.
|
||||
All rights reserved
|
||||
|
||||
VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.
|
||||
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
FreeRTOS is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License (version 2) as published by the
|
||||
Free Software Foundation >>>> AND MODIFIED BY <<<< the FreeRTOS exception.
|
||||
|
||||
***************************************************************************
|
||||
>>! NOTE: The modification to the GPL is included to allow you to !<<
|
||||
>>! distribute a combined work that includes FreeRTOS without being !<<
|
||||
>>! obliged to provide the source code for proprietary components !<<
|
||||
>>! outside of the FreeRTOS kernel. !<<
|
||||
***************************************************************************
|
||||
|
||||
FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
FOR A PARTICULAR PURPOSE. Full license text is available on the following
|
||||
link: http://www.freertos.org/a00114.html
|
||||
|
||||
***************************************************************************
|
||||
* *
|
||||
* FreeRTOS provides completely free yet professionally developed, *
|
||||
* robust, strictly quality controlled, supported, and cross *
|
||||
* platform software that is more than just the market leader, it *
|
||||
* is the industry's de facto standard. *
|
||||
* *
|
||||
* Help yourself get started quickly while simultaneously helping *
|
||||
* to support the FreeRTOS project by purchasing a FreeRTOS *
|
||||
* tutorial book, reference manual, or both: *
|
||||
* http://www.FreeRTOS.org/Documentation *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
http://www.FreeRTOS.org/FAQHelp.html - Having a problem? Start by reading
|
||||
the FAQ page "My application does not run, what could be wrong?". Have you
|
||||
defined configASSERT()?
|
||||
|
||||
http://www.FreeRTOS.org/support - In return for receiving this top quality
|
||||
embedded software for free we request you assist our global community by
|
||||
participating in the support forum.
|
||||
|
||||
http://www.FreeRTOS.org/training - Investing in training allows your team to
|
||||
be as productive as possible as early as possible. Now you can receive
|
||||
FreeRTOS training directly from Richard Barry, CEO of Real Time Engineers
|
||||
Ltd, and the world's leading authority on the world's leading RTOS.
|
||||
|
||||
http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,
|
||||
including FreeRTOS+Trace - an indispensable productivity tool, a DOS
|
||||
compatible FAT file system, and our tiny thread aware UDP/IP stack.
|
||||
|
||||
http://www.FreeRTOS.org/labs - Where new FreeRTOS products go to incubate.
|
||||
Come and try FreeRTOS+TCP, our new open source TCP/IP stack for FreeRTOS.
|
||||
|
||||
http://www.OpenRTOS.com - Real Time Engineers ltd. license FreeRTOS to High
|
||||
Integrity Systems ltd. to sell under the OpenRTOS brand. Low cost OpenRTOS
|
||||
licenses offer ticketed support, indemnification and commercial middleware.
|
||||
|
||||
http://www.SafeRTOS.com - High Integrity Systems also provide a safety
|
||||
engineered and independently SIL3 certified version for use in safety and
|
||||
mission critical applications that require provable dependability.
|
||||
|
||||
1 tab == 4 spaces!
|
||||
*/
|
||||
|
||||
/* Scheduler includes. */
|
||||
#include "FreeRTOS.h"
|
||||
#include "task.h"
|
||||
|
||||
/* Demo app includes. */
|
||||
#include "ledtest.h"
|
||||
|
||||
#define lLEDOnE_SECOND ( 1000UL / portTICK_PERIOD_MS )
|
||||
|
||||
void vLEDTask( void *pvParameters )
|
||||
{
|
||||
long lLEDOn = pdTRUE, x;
|
||||
|
||||
for( ;; )
|
||||
{
|
||||
for( x = 8; x < 16; x++ )
|
||||
{
|
||||
/*Depending on if lLEDOn is true or false, turn on or off led number i*/
|
||||
vParTestSetLED( x,lLEDOn );
|
||||
|
||||
/*Delay for 1000 ms*/
|
||||
vTaskDelay( lLEDOnE_SECOND );
|
||||
}
|
||||
|
||||
/*After the for loop, we flip lLEDOn. On the next run through the
|
||||
for loop above, the leds will be flipped.*/
|
||||
lLEDOn = ~lLEDOn;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,82 +0,0 @@
|
|||
/*
|
||||
FreeRTOS V9.0.0rc2 - Copyright (C) 2016 Real Time Engineers Ltd.
|
||||
All rights reserved
|
||||
|
||||
VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.
|
||||
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
FreeRTOS is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License (version 2) as published by the
|
||||
Free Software Foundation >>>> AND MODIFIED BY <<<< the FreeRTOS exception.
|
||||
|
||||
***************************************************************************
|
||||
>>! NOTE: The modification to the GPL is included to allow you to !<<
|
||||
>>! distribute a combined work that includes FreeRTOS without being !<<
|
||||
>>! obliged to provide the source code for proprietary components !<<
|
||||
>>! outside of the FreeRTOS kernel. !<<
|
||||
***************************************************************************
|
||||
|
||||
FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
FOR A PARTICULAR PURPOSE. Full license text is available on the following
|
||||
link: http://www.freertos.org/a00114.html
|
||||
|
||||
***************************************************************************
|
||||
* *
|
||||
* FreeRTOS provides completely free yet professionally developed, *
|
||||
* robust, strictly quality controlled, supported, and cross *
|
||||
* platform software that is more than just the market leader, it *
|
||||
* is the industry's de facto standard. *
|
||||
* *
|
||||
* Help yourself get started quickly while simultaneously helping *
|
||||
* to support the FreeRTOS project by purchasing a FreeRTOS *
|
||||
* tutorial book, reference manual, or both: *
|
||||
* http://www.FreeRTOS.org/Documentation *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
http://www.FreeRTOS.org/FAQHelp.html - Having a problem? Start by reading
|
||||
the FAQ page "My application does not run, what could be wrong?". Have you
|
||||
defined configASSERT()?
|
||||
|
||||
http://www.FreeRTOS.org/support - In return for receiving this top quality
|
||||
embedded software for free we request you assist our global community by
|
||||
participating in the support forum.
|
||||
|
||||
http://www.FreeRTOS.org/training - Investing in training allows your team to
|
||||
be as productive as possible as early as possible. Now you can receive
|
||||
FreeRTOS training directly from Richard Barry, CEO of Real Time Engineers
|
||||
Ltd, and the world's leading authority on the world's leading RTOS.
|
||||
|
||||
http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,
|
||||
including FreeRTOS+Trace - an indispensable productivity tool, a DOS
|
||||
compatible FAT file system, and our tiny thread aware UDP/IP stack.
|
||||
|
||||
http://www.FreeRTOS.org/labs - Where new FreeRTOS products go to incubate.
|
||||
Come and try FreeRTOS+TCP, our new open source TCP/IP stack for FreeRTOS.
|
||||
|
||||
http://www.OpenRTOS.com - Real Time Engineers ltd. license FreeRTOS to High
|
||||
Integrity Systems ltd. to sell under the OpenRTOS brand. Low cost OpenRTOS
|
||||
licenses offer ticketed support, indemnification and commercial middleware.
|
||||
|
||||
http://www.SafeRTOS.com - High Integrity Systems also provide a safety
|
||||
engineered and independently SIL3 certified version for use in safety and
|
||||
mission critical applications that require provable dependability.
|
||||
|
||||
1 tab == 4 spaces!
|
||||
*/
|
||||
|
||||
#ifndef LEDTEST_H
|
||||
#define LEDTEST_H
|
||||
|
||||
#include "FreeRTOS.h"
|
||||
#include "task.h"
|
||||
#include "partest.h"
|
||||
|
||||
/*
|
||||
* A task that writes to the LEDs.
|
||||
*/
|
||||
void vLEDTask( void *pvParamters );
|
||||
|
||||
#endif /* LEDTEST_H */
|
|
@ -1,288 +0,0 @@
|
|||
/*
|
||||
FreeRTOS V9.0.0rc2 - Copyright (C) 2016 Real Time Engineers Ltd.
|
||||
All rights reserved
|
||||
|
||||
VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.
|
||||
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
FreeRTOS is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License (version 2) as published by the
|
||||
Free Software Foundation >>>> AND MODIFIED BY <<<< the FreeRTOS exception.
|
||||
|
||||
***************************************************************************
|
||||
>>! NOTE: The modification to the GPL is included to allow you to !<<
|
||||
>>! distribute a combined work that includes FreeRTOS without being !<<
|
||||
>>! obliged to provide the source code for proprietary components !<<
|
||||
>>! outside of the FreeRTOS kernel. !<<
|
||||
***************************************************************************
|
||||
|
||||
FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
FOR A PARTICULAR PURPOSE. Full license text is available on the following
|
||||
link: http://www.freertos.org/a00114.html
|
||||
|
||||
***************************************************************************
|
||||
* *
|
||||
* FreeRTOS provides completely free yet professionally developed, *
|
||||
* robust, strictly quality controlled, supported, and cross *
|
||||
* platform software that is more than just the market leader, it *
|
||||
* is the industry's de facto standard. *
|
||||
* *
|
||||
* Help yourself get started quickly while simultaneously helping *
|
||||
* to support the FreeRTOS project by purchasing a FreeRTOS *
|
||||
* tutorial book, reference manual, or both: *
|
||||
* http://www.FreeRTOS.org/Documentation *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
http://www.FreeRTOS.org/FAQHelp.html - Having a problem? Start by reading
|
||||
the FAQ page "My application does not run, what could be wrong?". Have you
|
||||
defined configASSERT()?
|
||||
|
||||
http://www.FreeRTOS.org/support - In return for receiving this top quality
|
||||
embedded software for free we request you assist our global community by
|
||||
participating in the support forum.
|
||||
|
||||
http://www.FreeRTOS.org/training - Investing in training allows your team to
|
||||
be as productive as possible as early as possible. Now you can receive
|
||||
FreeRTOS training directly from Richard Barry, CEO of Real Time Engineers
|
||||
Ltd, and the world's leading authority on the world's leading RTOS.
|
||||
|
||||
http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,
|
||||
including FreeRTOS+Trace - an indispensable productivity tool, a DOS
|
||||
compatible FAT file system, and our tiny thread aware UDP/IP stack.
|
||||
|
||||
http://www.FreeRTOS.org/labs - Where new FreeRTOS products go to incubate.
|
||||
Come and try FreeRTOS+TCP, our new open source TCP/IP stack for FreeRTOS.
|
||||
|
||||
http://www.OpenRTOS.com - Real Time Engineers ltd. license FreeRTOS to High
|
||||
Integrity Systems ltd. to sell under the OpenRTOS brand. Low cost OpenRTOS
|
||||
licenses offer ticketed support, indemnification and commercial middleware.
|
||||
|
||||
http://www.SafeRTOS.com - High Integrity Systems also provide a safety
|
||||
engineered and independently SIL3 certified version for use in safety and
|
||||
mission critical applications that require provable dependability.
|
||||
|
||||
1 tab == 4 spaces!
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
* Creates all the demo application tasks, then starts the scheduler. The WEB
|
||||
* documentation provides more details of the standard demo application tasks.
|
||||
* In addition to the standard demo tasks, the following tasks and tests are
|
||||
* defined and/or created within this file:
|
||||
*
|
||||
* "LCD test" task - the LCD task writes a continually repeating series of patterns
|
||||
* to the LCD display.
|
||||
*
|
||||
* "LED test" task - This is a very simple task that just turns on user LEDs
|
||||
* 8 to 15 in turn, before turning them off again.
|
||||
*
|
||||
* "Check task" - The check task only runs every five seconds but has the highest
|
||||
* priority so is guaranteed to get processing time. Its main job is to inspect
|
||||
* all the other standard demo tasks to ensure they are executing without error.
|
||||
* The Check task will toggle LED 0 every five seconds while no errors exist,
|
||||
* with the toggle frequency increasing to 200ms should an error be detected in
|
||||
* any other task.
|
||||
*
|
||||
* Both the check task and the idle task place the processor into energy saving
|
||||
* mode 1, which will be exited following each tick interrupt. The check task
|
||||
* is the highest priority task in the system, so while it is executing no other
|
||||
* task will execute. If the check task places the processor into a low power
|
||||
* mode without blocking then the energy consumption as viewed on the Energy
|
||||
* Micro Gecko board will go down noticeably as in effect no tasks will be running.
|
||||
* The check task places the processor into low power mode for two out of every
|
||||
* five seconds. The current use of low power modes is very basic. Future
|
||||
* FreeRTOS releases will aim to make significant improvements.
|
||||
*
|
||||
*/
|
||||
/* Scheduler includes. */
|
||||
#include "FreeRTOS.h"
|
||||
#include "croutine.h"
|
||||
#include "task.h"
|
||||
#include "queue.h"
|
||||
#include "semphr.h"
|
||||
|
||||
/* Common demo application includes. */
|
||||
#include "partest.h"
|
||||
#include "GenQTest.h"
|
||||
#include "QPeek.h"
|
||||
#include "recmutex.h"
|
||||
#include "semtest.h"
|
||||
|
||||
/* Demo application includes. */
|
||||
#include "lcdcontroller.h"
|
||||
#include "ledtest.h"
|
||||
#include "lcdtest.h"
|
||||
#include "chip.h"
|
||||
|
||||
/* Task priorities. */
|
||||
#define mainLCD_TASK_PRIORITY ( tskIDLE_PRIORITY + 1 )
|
||||
#define mainLED_TASK_PRIORITY ( tskIDLE_PRIORITY + 2 )
|
||||
#define mainGEN_Q_TASK_PRIORITY ( tskIDLE_PRIORITY )
|
||||
#define mainSEMAPHORE_TASK_PRIORITY ( tskIDLE_PRIORITY + 1 )
|
||||
#define mainCHECK_TASK_PRIORITY ( tskIDLE_PRIORITY + 3 )
|
||||
|
||||
/* A period of two seconds, adjusted to use the tick frequency. */
|
||||
#define mainTWO_SECONDS ( 2000 / portTICK_PERIOD_MS )
|
||||
|
||||
/* The length of the delay between each cycle of the check task when an error
|
||||
has / has not been detected. */
|
||||
#define mainNO_ERROR_CHECK_FREQUENCY ( 5000 / portTICK_PERIOD_MS )
|
||||
#define mainERROR_CHECK_FREQUENCY ( 200 / portTICK_PERIOD_MS )
|
||||
|
||||
/* The LED that is toggled by the check task. The rate of the toggle indicates
|
||||
whether or not an error has been found, as defined by the
|
||||
mainNO_ERROR_CHECK_FREQUENCY and mainERROR_CHECK_FREQUENCY definitions above. */
|
||||
#define mainCHECK_LED ( 0 )
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
/*
|
||||
* Configure the hardware as required by the demo.
|
||||
*/
|
||||
static void prvSetupHardware( void );
|
||||
|
||||
/*
|
||||
* The check task as described at the top of this file.
|
||||
*/
|
||||
static void prvCheckTask( void *pvParameters );
|
||||
|
||||
/*
|
||||
* Put the CPU into the least low power low power mode.
|
||||
*/
|
||||
static void prvLowPowerMode1( void );
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
int main( void )
|
||||
{
|
||||
/* Perform the necessary hardware configuration. */
|
||||
prvSetupHardware();
|
||||
|
||||
/* Create the task that writes various text and patterns to the LCD. */
|
||||
xTaskCreate( vLCDTask, "LCD", configMINIMAL_STACK_SIZE, NULL, mainLCD_TASK_PRIORITY, NULL );
|
||||
|
||||
/* Create a task that writes to LEDs 8 to 15. */
|
||||
xTaskCreate( vLEDTask, "LEDTask", configMINIMAL_STACK_SIZE, NULL, mainLED_TASK_PRIORITY, NULL );
|
||||
|
||||
/* Create some of the standard demo tasks. These just test the port and
|
||||
demonstrate how the FreeRTOS API can be used. They do not provide any
|
||||
specific functionality. */
|
||||
vStartGenericQueueTasks( mainGEN_Q_TASK_PRIORITY );
|
||||
vStartQueuePeekTasks();
|
||||
vStartRecursiveMutexTasks();
|
||||
vStartSemaphoreTasks( mainSEMAPHORE_TASK_PRIORITY );
|
||||
|
||||
/* Create the check task as described at the top of this file. */
|
||||
xTaskCreate( prvCheckTask, "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL );
|
||||
|
||||
/* Start the scheduler. */
|
||||
vTaskStartScheduler();
|
||||
|
||||
/* The scheduler should now be running the tasks so the following code should
|
||||
never be reached. If it is reached then there was insufficient heap space
|
||||
for the idle task to be created. In this case the heap size is set by
|
||||
configTOTAL_HEAP_SIZE in FreeRTOSConfig.h. */
|
||||
for( ;; );
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
void vApplicationIdleHook( void )
|
||||
{
|
||||
/* Use the idle task to place the CPU into a low power mode. Greater power
|
||||
saving could be achieved by not including any demo tasks that never block. */
|
||||
prvLowPowerMode1();
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName )
|
||||
{
|
||||
/* This function will be called if a task overflows its stack, if
|
||||
configCHECK_FOR_STACK_OVERFLOW != 0. It might be that the function
|
||||
parameters have been corrupted, depending on the severity of the stack
|
||||
overflow. When this is the case pxCurrentTCB can be inspected in the
|
||||
debugger to find the offending task. */
|
||||
for( ;; );
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
static void prvCheckTask( void *pvParameters )
|
||||
{
|
||||
TickType_t xLastExecutionTime, xFrequency = mainNO_ERROR_CHECK_FREQUENCY;
|
||||
long lCount;
|
||||
|
||||
/* Initialise xLastExecutionTime so the first call to vTaskDelayUntil()
|
||||
works correctly. */
|
||||
xLastExecutionTime = xTaskGetTickCount();
|
||||
|
||||
for( ;; )
|
||||
{
|
||||
/* Perform this check at a frequency that indicates whether or not an
|
||||
error has been found. */
|
||||
vTaskDelayUntil( &xLastExecutionTime, xFrequency );
|
||||
|
||||
/* Check all the other tasks are running without error. */
|
||||
if( xAreGenericQueueTasksStillRunning() != pdPASS )
|
||||
{
|
||||
xFrequency = mainERROR_CHECK_FREQUENCY;
|
||||
}
|
||||
|
||||
if( xAreQueuePeekTasksStillRunning() != pdPASS )
|
||||
{
|
||||
xFrequency = mainERROR_CHECK_FREQUENCY;
|
||||
}
|
||||
|
||||
if( xAreRecursiveMutexTasksStillRunning() != pdPASS )
|
||||
{
|
||||
xFrequency = mainERROR_CHECK_FREQUENCY;
|
||||
}
|
||||
|
||||
if( xAreSemaphoreTasksStillRunning() != pdPASS )
|
||||
{
|
||||
xFrequency = mainERROR_CHECK_FREQUENCY;
|
||||
}
|
||||
|
||||
/* Toggle the LED to show that the check hook function is running.
|
||||
The toggle freequency will increase if an error has been found in any
|
||||
task. */
|
||||
vParTestToggleLED( mainCHECK_LED );
|
||||
|
||||
/* Just loop around putting the processor into low power mode 1 for
|
||||
a while. This is the highest priority task, and this loop does not
|
||||
cause it to block, so it will remain as the running task. Each time it
|
||||
runs for the next two seconds it will simply put the processor to sleep.
|
||||
No other task will run so nothing else will happen. This periodic two
|
||||
seconds of lower power should be viewable using the Advanced Energy
|
||||
Monitor on the Energy Micro Gecko board. */
|
||||
for( lCount = 0; lCount < mainTWO_SECONDS; lCount++ )
|
||||
{
|
||||
prvLowPowerMode1();
|
||||
}
|
||||
}
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
static void prvSetupHardware( void )
|
||||
{
|
||||
/* Initialise the LEDs. */
|
||||
vParTestInitialise();
|
||||
|
||||
/* Configure the LCD. */
|
||||
LCD_Init( LCD );
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
static void prvLowPowerMode1( void )
|
||||
{
|
||||
/* Clear SLEEPDEEP for EM1 */
|
||||
SCB->SCR &= ~( 1 << SCB_SCR_SLEEPDEEP_Pos );
|
||||
|
||||
/* Power down. */
|
||||
__DSB();
|
||||
__WFI();
|
||||
}
|
||||
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
@REM This batch file has been generated by the IAR Embedded Workbench
|
||||
@REM C-SPY Debugger, as an aid to preparing a command line for running
|
||||
@REM the cspybat command line utility using the appropriate settings.
|
||||
@REM
|
||||
@REM You can launch cspybat by typing the name of this batch file followed
|
||||
@REM by the name of the debug file (usually an ELF/DWARF or UBROF file).
|
||||
@REM Note that this file is generated every time a new debug session
|
||||
@REM is initialized, so you may want to move or rename the file before
|
||||
@REM making changes.
|
||||
@REM
|
||||
|
||||
|
||||
"C:\devtools\IAR Systems\Embedded Workbench 6.0\common\bin\cspybat" "C:\devtools\IAR Systems\Embedded Workbench 6.0\arm\bin\armproc.dll" "C:\devtools\IAR Systems\Embedded Workbench 6.0\arm\bin\armjlink.dll" %1 --plugin "C:\devtools\IAR Systems\Embedded Workbench 6.0\arm\bin\armbat.dll" --flash_loader "C:\devtools\IAR Systems\Embedded Workbench 6.0\arm\config\flashloader\EnergyMicro\FlashEFM32.board" --backend -B "--endian=little" "--cpu=Cortex-M3" "--fpu=None" "-p" "C:\devtools\IAR Systems\Embedded Workbench 6.0\arm\CONFIG\debugger\EnergyMicro\EFM32G890F128.ddf" "--semihosting" "--device=EFM32G890F128" "--drv_communication=USB0" "--jlink_speed=auto" "--jlink_initial_speed=32" "--jlink_reset_strategy=0,0" "--jlink_interface=SWD" "--drv_catch_exceptions=0x000" "--drv_swo_clock_setup=72000000,0,2000000"
|
||||
|
||||
|
|
@ -1,79 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
|
||||
<Project>
|
||||
<Desktop>
|
||||
<Static>
|
||||
<Debug-Log>
|
||||
|
||||
|
||||
<ColumnWidth0>20</ColumnWidth0><ColumnWidth1>1622</ColumnWidth1></Debug-Log>
|
||||
<Build>
|
||||
<ColumnWidth0>20</ColumnWidth0>
|
||||
<ColumnWidth1>1216</ColumnWidth1>
|
||||
<ColumnWidth2>324</ColumnWidth2>
|
||||
<ColumnWidth3>81</ColumnWidth3>
|
||||
</Build>
|
||||
<Workspace>
|
||||
<ColumnWidths>
|
||||
|
||||
|
||||
|
||||
|
||||
<Column0>231</Column0><Column1>27</Column1><Column2>27</Column2><Column3>27</Column3></ColumnWidths>
|
||||
</Workspace>
|
||||
<Disassembly>
|
||||
|
||||
|
||||
|
||||
<PreferedWindows><Position>2</Position><ScreenPosX>0</ScreenPosX><ScreenPosY>0</ScreenPosY><Windows/></PreferedWindows><MixedMode>1</MixedMode><CodeCovShow>0</CodeCovShow><InstrProfShow>0</InstrProfShow></Disassembly>
|
||||
<Watch><Format><struct_types/><watch_formats/></Format><PreferedWindows><Position>2</Position><ScreenPosX>0</ScreenPosX><ScreenPosY>0</ScreenPosY><Windows/></PreferedWindows><Column0>100</Column0><Column1>100</Column1><Column2>100</Column2><Column3>100</Column3></Watch></Static>
|
||||
<Windows>
|
||||
|
||||
|
||||
|
||||
<Wnd2>
|
||||
<Tabs>
|
||||
<Tab>
|
||||
<Identity>TabID-7696-3812</Identity>
|
||||
<TabName>Debug Log</TabName>
|
||||
<Factory>Debug-Log</Factory>
|
||||
<Session/>
|
||||
</Tab>
|
||||
<Tab>
|
||||
<Identity>TabID-7174-3822</Identity>
|
||||
<TabName>Build</TabName>
|
||||
<Factory>Build</Factory>
|
||||
<Session/>
|
||||
</Tab>
|
||||
</Tabs>
|
||||
|
||||
<SelectedTab>0</SelectedTab></Wnd2><Wnd3>
|
||||
<Tabs>
|
||||
<Tab>
|
||||
<Identity>TabID-18445-3816</Identity>
|
||||
<TabName>Workspace</TabName>
|
||||
<Factory>Workspace</Factory>
|
||||
<Session>
|
||||
|
||||
<NodeDict><ExpandedNode>RTOSDemo</ExpandedNode><ExpandedNode>RTOSDemo/Energy Micro Code</ExpandedNode><ExpandedNode>RTOSDemo/Energy Micro Code/bsp</ExpandedNode><ExpandedNode>RTOSDemo/FreeRTOS source</ExpandedNode></NodeDict></Session>
|
||||
</Tab>
|
||||
</Tabs>
|
||||
|
||||
<SelectedTab>0</SelectedTab></Wnd3></Windows>
|
||||
<Editor>
|
||||
|
||||
|
||||
|
||||
|
||||
<Pane><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\main.c</Filename><XPos>0</XPos><YPos>60</YPos><SelStart>4045</SelStart><SelEnd>4045</SelEnd></Tab><ActiveTab>0</ActiveTab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\..\..\Source\portable\MemMang\heap_2.c</Filename><XPos>0</XPos><YPos>251</YPos><SelStart>10647</SelStart><SelEnd>10666</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\..\..\..\..\..\..\devtools\IAR Systems\Embedded Workbench 5.4\arm\INC\DLib_Product_string.h</Filename><XPos>0</XPos><YPos>36</YPos><SelStart>1408</SelStart><SelEnd>1408</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\..\Common\Minimal\GenQTest.c</Filename><XPos>0</XPos><YPos>321</YPos><SelStart>18528</SelStart><SelEnd>18528</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\ParTest.c</Filename><XPos>0</XPos><YPos>68</YPos><SelStart>4153</SelStart><SelEnd>4153</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\bsp\dvk_boardcontrol.c</Filename><XPos>0</XPos><YPos>163</YPos><SelStart>5883</SelStart><SelEnd>5883</SelEnd></Tab></Pane><ActivePane>0</ActivePane><Sizes><Pane><X>1000000</X><Y>1000000</Y></Pane></Sizes><SplitMode>1</SplitMode></Editor>
|
||||
<Positions>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<Top><Row0><Sizes><Toolbar-00abb208><key>iaridepm.enu1</key></Toolbar-00abb208><Toolbar-02dfc390><key>debuggergui.enu1</key></Toolbar-02dfc390></Sizes></Row0></Top><Left><Row0><Sizes><Wnd3><Rect><Top>-2</Top><Left>-2</Left><Bottom>740</Bottom><Right>305</Right><x>-2</x><y>-2</y><xscreen>200</xscreen><yscreen>200</yscreen><sizeHorzCX>119048</sizeHorzCX><sizeHorzCY>203666</sizeHorzCY><sizeVertCX>182738</sizeVertCX><sizeVertCY>755601</sizeVertCY></Rect></Wnd3></Sizes></Row0></Left><Right><Row0><Sizes/></Row0></Right><Bottom><Row0><Sizes><Wnd2><Rect><Top>-2</Top><Left>-2</Left><Bottom>198</Bottom><Right>1682</Right><x>-2</x><y>-2</y><xscreen>1684</xscreen><yscreen>200</yscreen><sizeHorzCX>1002381</sizeHorzCX><sizeHorzCY>203666</sizeHorzCY><sizeVertCX>119048</sizeVertCX><sizeVertCY>203666</sizeVertCY></Rect></Wnd2></Sizes></Row0></Bottom><Float><Sizes/></Float></Positions>
|
||||
</Desktop>
|
||||
</Project>
|
||||
|
||||
|
|
@ -1,105 +0,0 @@
|
|||
[DebugChecksum]
|
||||
Checksum=-346520476
|
||||
[DisAssemblyWindow]
|
||||
NumStates=_ 1
|
||||
State 1=_ 1
|
||||
[InstructionProfiling]
|
||||
Enabled=_ 0
|
||||
[CodeCoverage]
|
||||
Enabled=_ 0
|
||||
[Profiling]
|
||||
Enabled=0
|
||||
[StackPlugin]
|
||||
Enabled=0
|
||||
OverflowWarningsEnabled=1
|
||||
WarningThreshold=90
|
||||
SpWarningsEnabled=0
|
||||
WarnHow=0
|
||||
UseTrigger=1
|
||||
TriggerName=main
|
||||
LimitSize=0
|
||||
ByteLimit=50
|
||||
[TraceHelper]
|
||||
Enabled=0
|
||||
ShowSource=1
|
||||
[JLinkDriver]
|
||||
SWOInfo_CpuClock=0x044AA200
|
||||
SWOInfo_SWOClockAutoDetect=0
|
||||
SWOInfo_JtagSpeed=0x001E8480
|
||||
SWOInfo_SWOPrescaler=0x00000024
|
||||
SWOInfo_SWOClockWanted=0x001E8480
|
||||
SWOInfo_HWTraceEnabled=1
|
||||
SWOInfo_TimestampsEnabled=1
|
||||
SWOInfo_TimestampsPrescalerIndex=0x00000000
|
||||
SWOInfo_TimestampsPrescalerData=0x00000000
|
||||
SWOInfo_PCSamplingEnabled=0
|
||||
SWOInfo_PCSamplingCYCTAP=0x00000001
|
||||
SWOInfo_PCSamplingPOSTCNT=0x0000000F
|
||||
SWOInfo_DataLogMode=0x00000000
|
||||
SWOInfo_CPIEnabled=0
|
||||
SWOInfo_EXCEnabled=0
|
||||
SWOInfo_SLEEPEnabled=0
|
||||
SWOInfo_LSUEnabled=0
|
||||
SWOInfo_FOLDEnabled=0
|
||||
SWOInfo_EXCTRCEnabled=1
|
||||
SWOInfo_ITMPortsEnabled=0x00000000
|
||||
SWOInfo_ITMPortsTermIO=0x00000000
|
||||
SWOInfo_ITMPortsLogFile=0x00000000
|
||||
SWOInfo_ITMLogFile=$PROJ_DIR$\ITM.log
|
||||
[Log file]
|
||||
LoggingEnabled=_ 0
|
||||
LogFile=_ ""
|
||||
Category=_ 0
|
||||
[TermIOLog]
|
||||
LoggingEnabled=_ 0
|
||||
LogFile=_ ""
|
||||
[DataLog]
|
||||
LogEnabled=0
|
||||
SumEnabled=0
|
||||
ShowTimeLog=1
|
||||
ShowTimeSum=1
|
||||
[TraceHelperExtra]
|
||||
Enabled=0
|
||||
ShowSource=1
|
||||
[DriverProfiling]
|
||||
Enabled=0
|
||||
Source=4
|
||||
Graph=0
|
||||
[Breakpoints]
|
||||
Count=0
|
||||
[Stack]
|
||||
FillEnabled=0
|
||||
OverflowWarningsEnabled=1
|
||||
WarningThreshold=90
|
||||
SpWarningsEnabled=1
|
||||
WarnLogOnly=1
|
||||
UseTrigger=1
|
||||
TriggerName=main
|
||||
LimitSize=0
|
||||
ByteLimit=50
|
||||
[InterruptLog]
|
||||
LogEnabled=1
|
||||
SumEnabled=1
|
||||
GraphEnabled=0
|
||||
ShowTimeLog=1
|
||||
ShowTimeSum=1
|
||||
SumSortOrder=0
|
||||
[Interrupts]
|
||||
Enabled=1
|
||||
[MemoryMap]
|
||||
Enabled=0
|
||||
Base=0
|
||||
UseAuto=0
|
||||
TypeViolation=1
|
||||
UnspecRange=1
|
||||
ActionState=1
|
||||
[Trace1]
|
||||
Enabled=0
|
||||
ShowSource=1
|
||||
[Disassemble mode]
|
||||
mode=1
|
||||
[Breakpoints2]
|
||||
Count=0
|
||||
[Aliases]
|
||||
Count=0
|
||||
SuppressDialog=0
|
|
@ -1,77 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
|
||||
<Workspace>
|
||||
<ConfigDictionary>
|
||||
|
||||
<CurrentConfigs><Project>RTOSDemo/Debug</Project></CurrentConfigs></ConfigDictionary>
|
||||
<Desktop>
|
||||
<Static>
|
||||
<Workspace>
|
||||
<ColumnWidths>
|
||||
|
||||
|
||||
|
||||
|
||||
<Column0>228</Column0><Column1>27</Column1><Column2>27</Column2><Column3>27</Column3></ColumnWidths>
|
||||
</Workspace>
|
||||
<Build>
|
||||
|
||||
|
||||
|
||||
|
||||
<ColumnWidth0>20</ColumnWidth0><ColumnWidth1>1216</ColumnWidth1><ColumnWidth2>324</ColumnWidth2><ColumnWidth3>81</ColumnWidth3></Build>
|
||||
<TerminalIO/>
|
||||
<Debug-Log>
|
||||
|
||||
|
||||
<ColumnWidth0>20</ColumnWidth0><ColumnWidth1>1622</ColumnWidth1></Debug-Log>
|
||||
</Static>
|
||||
<Windows>
|
||||
|
||||
|
||||
<Wnd0>
|
||||
<Tabs>
|
||||
<Tab>
|
||||
<Identity>TabID-28378-3630</Identity>
|
||||
<TabName>Workspace</TabName>
|
||||
<Factory>Workspace</Factory>
|
||||
<Session>
|
||||
|
||||
<NodeDict><ExpandedNode>RTOSDemo</ExpandedNode><ExpandedNode>RTOSDemo/Demo</ExpandedNode><ExpandedNode>RTOSDemo/Output</ExpandedNode></NodeDict></Session>
|
||||
</Tab>
|
||||
</Tabs>
|
||||
|
||||
<SelectedTab>0</SelectedTab></Wnd0><Wnd1>
|
||||
<Tabs>
|
||||
<Tab>
|
||||
<Identity>TabID-11879-3734</Identity>
|
||||
<TabName>Build</TabName>
|
||||
<Factory>Build</Factory>
|
||||
<Session/>
|
||||
</Tab>
|
||||
<Tab>
|
||||
<Identity>TabID-7638-1339</Identity>
|
||||
<TabName>Debug Log</TabName>
|
||||
<Factory>Debug-Log</Factory>
|
||||
<Session/>
|
||||
</Tab>
|
||||
</Tabs>
|
||||
|
||||
<SelectedTab>0</SelectedTab></Wnd1></Windows>
|
||||
<Editor>
|
||||
|
||||
|
||||
|
||||
|
||||
<Pane><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\main.c</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd></Tab><ActiveTab>0</ActiveTab></Pane><ActivePane>0</ActivePane><Sizes><Pane><X>1000000</X><Y>1000000</Y></Pane></Sizes><SplitMode>1</SplitMode></Editor>
|
||||
<Positions>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<Top><Row0><Sizes><Toolbar-01336218><key>iaridepm.enu1</key></Toolbar-01336218></Sizes></Row0></Top><Left><Row0><Sizes><Wnd0><Rect><Top>-2</Top><Left>-2</Left><Bottom>740</Bottom><Right>302</Right><x>-2</x><y>-2</y><xscreen>200</xscreen><yscreen>200</yscreen><sizeHorzCX>119048</sizeHorzCX><sizeHorzCY>203666</sizeHorzCY><sizeVertCX>180952</sizeVertCX><sizeVertCY>755601</sizeVertCY></Rect></Wnd0></Sizes></Row0></Left><Right><Row0><Sizes/></Row0></Right><Bottom><Row0><Sizes><Wnd1><Rect><Top>-2</Top><Left>-2</Left><Bottom>198</Bottom><Right>1682</Right><x>-2</x><y>-2</y><xscreen>1684</xscreen><yscreen>200</yscreen><sizeHorzCX>1002381</sizeHorzCX><sizeHorzCY>203666</sizeHorzCY><sizeVertCX>119048</sizeVertCX><sizeVertCY>203666</sizeVertCY></Rect></Wnd1></Sizes></Row0></Bottom><Float><Sizes/></Float></Positions>
|
||||
</Desktop>
|
||||
</Workspace>
|
||||
|
||||
|
|
@ -1,14 +0,0 @@
|
|||
[FLASH]
|
||||
SkipProgOnCRCMatch = 1
|
||||
VerifyDownload = 1
|
||||
AllowCaching = 1
|
||||
EnableFlashDL = 2
|
||||
Override = 0
|
||||
Device="ADUC7020X62"
|
||||
[BREAKPOINTS]
|
||||
ShowInfoWin = 1
|
||||
EnableFlashBP = 2
|
||||
BPDuringExecution = 0
|
||||
[CPU]
|
||||
OverrideMemMap = 0
|
||||
AllowSimulation = 1
|
|
@ -1,323 +0,0 @@
|
|||
;/*************************************************************************//**
|
||||
; * @file: startup_efm32.s
|
||||
; * @purpose: CMSIS Cortex-M3 Core Device Startup File
|
||||
; * for the Energy Micro 'EFM32G' Device Series
|
||||
; * @version 1.0.2
|
||||
; * @date: 10. September 2009
|
||||
; *----------------------------------------------------------------------------
|
||||
; *
|
||||
; * Copyright (C) 2009 ARM Limited. All rights reserved.
|
||||
; *
|
||||
; * ARM Limited (ARM) is supplying this software for use with Cortex-Mx
|
||||
; * processor based microcontrollers. This file can be freely distributed
|
||||
; * within development tools that are supporting such ARM based processors.
|
||||
; *
|
||||
; * THIS SOFTWARE IS PROVIDED "AS IS". NO WARRANTIES, WHETHER EXPRESS, IMPLIED
|
||||
; * OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF
|
||||
; * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE.
|
||||
; * ARM SHALL NOT, IN ANY CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR
|
||||
; * CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER.
|
||||
; *
|
||||
; ******************************************************************************/
|
||||
|
||||
|
||||
;
|
||||
; The modules in this file are included in the libraries, and may be replaced
|
||||
; by any user-defined modules that define the PUBLIC symbol _program_start or
|
||||
; a user defined start symbol.
|
||||
; To override the cstartup defined in the library, simply add your modified
|
||||
; version to the workbench project.
|
||||
;
|
||||
; The vector table is normally located at address 0.
|
||||
; When debugging in RAM, it can be located in RAM, aligned to at least 2^6.
|
||||
; The name "__vector_table" has special meaning for C-SPY:
|
||||
; it is where the SP start value is found, and the NVIC vector
|
||||
; table register (VTOR) is initialized to this address if != 0.
|
||||
;
|
||||
; Cortex-M version
|
||||
;
|
||||
MODULE ?cstartup
|
||||
|
||||
;; Forward declaration of sections.
|
||||
SECTION CSTACK:DATA:NOROOT(3)
|
||||
|
||||
SECTION .intvec:CODE:NOROOT(2)
|
||||
|
||||
EXTERN __iar_program_start
|
||||
EXTERN SystemInit
|
||||
PUBLIC __vector_table
|
||||
PUBLIC __vector_table_0x1c
|
||||
PUBLIC __Vectors
|
||||
PUBLIC __Vectors_End
|
||||
PUBLIC __Vectors_Size
|
||||
|
||||
DATA
|
||||
|
||||
__vector_table
|
||||
DCD sfe(CSTACK)
|
||||
DCD Reset_Handler
|
||||
|
||||
DCD NMI_Handler
|
||||
DCD HardFault_Handler
|
||||
DCD MemManage_Handler
|
||||
DCD BusFault_Handler
|
||||
DCD UsageFault_Handler
|
||||
__vector_table_0x1c
|
||||
DCD 0
|
||||
DCD 0
|
||||
DCD 0
|
||||
DCD 0
|
||||
DCD vPortSVCHandler
|
||||
DCD DebugMon_Handler
|
||||
DCD 0
|
||||
DCD xPortPendSVHandler
|
||||
DCD xPortSysTickHandler
|
||||
|
||||
; External Interrupts
|
||||
DCD DMA_IRQHandler ; 0: DMA Interrupt
|
||||
DCD GPIO_EVEN_IRQHandler ; 1: GPIO_EVEN Interrupt
|
||||
DCD TIMER0_IRQHandler ; 2: TIMER0 Interrupt
|
||||
DCD USART0_RX_IRQHandler ; 3: USART0_RX Interrupt
|
||||
DCD USART0_TX_IRQHandler ; 4: USART0_TX Interrupt
|
||||
DCD ACMP0_IRQHandler ; 5: ACMP0 Interrupt
|
||||
DCD ADC0_IRQHandler ; 6: ADC0 Interrupt
|
||||
DCD DAC0_IRQHandler ; 7: DAC0 Interrupt
|
||||
DCD I2C0_IRQHandler ; 8: I2C0 Interrupt
|
||||
DCD GPIO_ODD_IRQHandler ; 9: GPIO_ODD Interrupt
|
||||
DCD TIMER1_IRQHandler ; 10: TIMER1 Interrupt
|
||||
DCD TIMER2_IRQHandler ; 11: TIMER2 Interrupt
|
||||
DCD USART1_RX_IRQHandler ; 12: USART1_RX Interrupt
|
||||
DCD USART1_TX_IRQHandler ; 13: USART1_TX Interrupt
|
||||
DCD USART2_RX_IRQHandler ; 14: USART2_RX Interrupt
|
||||
DCD USART2_TX_IRQHandler ; 15: USART2_TX Interrupt
|
||||
DCD UART0_RX_IRQHandler ; 16: UART0_RX Interrupt
|
||||
DCD UART0_TX_IRQHandler ; 17: UART0_TX Interrupt
|
||||
DCD LEUART0_IRQHandler ; 18: LEUART0 Interrupt
|
||||
DCD LEUART1_IRQHandler ; 19: LEUART1 Interrupt
|
||||
DCD LETIMER0_IRQHandler ; 20: LETIMER0 Interrupt
|
||||
DCD PCNT0_IRQHandler ; 21: PCNT0 Interrupt
|
||||
DCD PCNT1_IRQHandler ; 22: PCNT1 Interrupt
|
||||
DCD PCNT2_IRQHandler ; 23: PCNT2 Interrupt
|
||||
DCD SYSTICCK_IRQHandler;DCD RTC_IRQHandler ; 24: RTC Interrupt
|
||||
DCD CMU_IRQHandler ; 25: CMU Interrupt
|
||||
DCD VCMP_IRQHandler ; 26: VCMP Interrupt
|
||||
DCD LCD_IRQHandler ; 27: LCD Interrupt
|
||||
DCD MSC_IRQHandler ; 28: MSC Interrupt
|
||||
DCD AES_IRQHandler ; 29: AES Interrupt
|
||||
|
||||
__Vectors_End
|
||||
__Vectors EQU __vector_table
|
||||
__Vectors_Size EQU __Vectors_End - __Vectors
|
||||
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;;
|
||||
;; Default interrupt handlers.
|
||||
;;
|
||||
THUMB
|
||||
|
||||
PUBWEAK Reset_Handler
|
||||
SECTION .text:CODE:REORDER(2)
|
||||
Reset_Handler
|
||||
LDR R0, =SystemInit
|
||||
BLX R0
|
||||
LDR R0, =__iar_program_start
|
||||
BX R0
|
||||
|
||||
PUBWEAK NMI_Handler
|
||||
SECTION .text:CODE:REORDER(1)
|
||||
NMI_Handler
|
||||
B NMI_Handler
|
||||
|
||||
PUBWEAK HardFault_Handler
|
||||
SECTION .text:CODE:REORDER(1)
|
||||
HardFault_Handler
|
||||
B HardFault_Handler
|
||||
|
||||
PUBWEAK MemManage_Handler
|
||||
SECTION .text:CODE:REORDER(1)
|
||||
MemManage_Handler
|
||||
B MemManage_Handler
|
||||
|
||||
PUBWEAK BusFault_Handler
|
||||
SECTION .text:CODE:REORDER(1)
|
||||
BusFault_Handler
|
||||
B BusFault_Handler
|
||||
|
||||
PUBWEAK UsageFault_Handler
|
||||
SECTION .text:CODE:REORDER(1)
|
||||
UsageFault_Handler
|
||||
B UsageFault_Handler
|
||||
|
||||
PUBWEAK vPortSVCHandler
|
||||
SECTION .text:CODE:REORDER(1)
|
||||
vPortSVCHandler
|
||||
B vPortSVCHandler
|
||||
|
||||
PUBWEAK DebugMon_Handler
|
||||
SECTION .text:CODE:REORDER(1)
|
||||
DebugMon_Handler
|
||||
B DebugMon_Handler
|
||||
|
||||
PUBWEAK xPortPendSVHandler
|
||||
SECTION .text:CODE:REORDER(1)
|
||||
xPortPendSVHandler
|
||||
B xPortPendSVHandler
|
||||
|
||||
PUBWEAK SYSTICCK_IRQHandler
|
||||
SECTION .text:CODE:REORDER(1)
|
||||
SYSTICCK_IRQHandler
|
||||
B SYSTICCK_IRQHandler
|
||||
; EFM32G specific interrupt handlers
|
||||
|
||||
PUBWEAK DMA_IRQHandler
|
||||
SECTION .text:CODE:REORDER(1)
|
||||
DMA_IRQHandler
|
||||
B DMA_IRQHandler
|
||||
|
||||
PUBWEAK GPIO_EVEN_IRQHandler
|
||||
SECTION .text:CODE:REORDER(1)
|
||||
GPIO_EVEN_IRQHandler
|
||||
B GPIO_EVEN_IRQHandler
|
||||
|
||||
PUBWEAK TIMER0_IRQHandler
|
||||
SECTION .text:CODE:REORDER(1)
|
||||
TIMER0_IRQHandler
|
||||
B TIMER0_IRQHandler
|
||||
|
||||
PUBWEAK USART0_RX_IRQHandler
|
||||
SECTION .text:CODE:REORDER(1)
|
||||
USART0_RX_IRQHandler
|
||||
B USART0_RX_IRQHandler
|
||||
|
||||
PUBWEAK USART0_TX_IRQHandler
|
||||
SECTION .text:CODE:REORDER(1)
|
||||
USART0_TX_IRQHandler
|
||||
B USART0_TX_IRQHandler
|
||||
|
||||
PUBWEAK ACMP0_IRQHandler
|
||||
SECTION .text:CODE:REORDER(1)
|
||||
ACMP0_IRQHandler
|
||||
B ACMP0_IRQHandler
|
||||
|
||||
PUBWEAK ADC0_IRQHandler
|
||||
SECTION .text:CODE:REORDER(1)
|
||||
ADC0_IRQHandler
|
||||
B ADC0_IRQHandler
|
||||
|
||||
PUBWEAK DAC0_IRQHandler
|
||||
SECTION .text:CODE:REORDER(1)
|
||||
DAC0_IRQHandler
|
||||
B DAC0_IRQHandler
|
||||
|
||||
PUBWEAK I2C0_IRQHandler
|
||||
SECTION .text:CODE:REORDER(1)
|
||||
I2C0_IRQHandler
|
||||
B I2C0_IRQHandler
|
||||
|
||||
PUBWEAK GPIO_ODD_IRQHandler
|
||||
SECTION .text:CODE:REORDER(1)
|
||||
GPIO_ODD_IRQHandler
|
||||
B GPIO_ODD_IRQHandler
|
||||
|
||||
PUBWEAK TIMER1_IRQHandler
|
||||
SECTION .text:CODE:REORDER(1)
|
||||
TIMER1_IRQHandler
|
||||
B TIMER1_IRQHandler
|
||||
|
||||
PUBWEAK TIMER2_IRQHandler
|
||||
SECTION .text:CODE:REORDER(1)
|
||||
TIMER2_IRQHandler
|
||||
B TIMER2_IRQHandler
|
||||
|
||||
PUBWEAK USART1_RX_IRQHandler
|
||||
SECTION .text:CODE:REORDER(1)
|
||||
USART1_RX_IRQHandler
|
||||
B USART1_RX_IRQHandler
|
||||
|
||||
PUBWEAK USART1_TX_IRQHandler
|
||||
SECTION .text:CODE:REORDER(1)
|
||||
USART1_TX_IRQHandler
|
||||
B USART1_TX_IRQHandler
|
||||
|
||||
PUBWEAK USART2_RX_IRQHandler
|
||||
SECTION .text:CODE:REORDER(1)
|
||||
USART2_RX_IRQHandler
|
||||
B USART2_RX_IRQHandler
|
||||
|
||||
PUBWEAK USART2_TX_IRQHandler
|
||||
SECTION .text:CODE:REORDER(1)
|
||||
USART2_TX_IRQHandler
|
||||
B USART2_TX_IRQHandler
|
||||
|
||||
PUBWEAK UART0_RX_IRQHandler
|
||||
SECTION .text:CODE:REORDER(1)
|
||||
UART0_RX_IRQHandler
|
||||
B UART0_RX_IRQHandler
|
||||
|
||||
PUBWEAK UART0_TX_IRQHandler
|
||||
SECTION .text:CODE:REORDER(1)
|
||||
UART0_TX_IRQHandler
|
||||
B UART0_TX_IRQHandler
|
||||
|
||||
PUBWEAK LEUART0_IRQHandler
|
||||
SECTION .text:CODE:REORDER(1)
|
||||
LEUART0_IRQHandler
|
||||
B LEUART0_IRQHandler
|
||||
|
||||
PUBWEAK LEUART1_IRQHandler
|
||||
SECTION .text:CODE:REORDER(1)
|
||||
LEUART1_IRQHandler
|
||||
B LEUART1_IRQHandler
|
||||
|
||||
PUBWEAK LETIMER0_IRQHandler
|
||||
SECTION .text:CODE:REORDER(1)
|
||||
LETIMER0_IRQHandler
|
||||
B LETIMER0_IRQHandler
|
||||
|
||||
PUBWEAK PCNT0_IRQHandler
|
||||
SECTION .text:CODE:REORDER(1)
|
||||
PCNT0_IRQHandler
|
||||
B PCNT0_IRQHandler
|
||||
|
||||
PUBWEAK PCNT1_IRQHandler
|
||||
SECTION .text:CODE:REORDER(1)
|
||||
PCNT1_IRQHandler
|
||||
B PCNT1_IRQHandler
|
||||
|
||||
PUBWEAK PCNT2_IRQHandler
|
||||
SECTION .text:CODE:REORDER(1)
|
||||
PCNT2_IRQHandler
|
||||
B PCNT2_IRQHandler
|
||||
|
||||
PUBWEAK xPortSysTickHandler
|
||||
SECTION .text:CODE:REORDER(1)
|
||||
xPortSysTickHandler
|
||||
B xPortSysTickHandler
|
||||
|
||||
PUBWEAK CMU_IRQHandler
|
||||
SECTION .text:CODE:REORDER(1)
|
||||
CMU_IRQHandler
|
||||
B CMU_IRQHandler
|
||||
|
||||
PUBWEAK VCMP_IRQHandler
|
||||
SECTION .text:CODE:REORDER(1)
|
||||
VCMP_IRQHandler
|
||||
B VCMP_IRQHandler
|
||||
|
||||
PUBWEAK LCD_IRQHandler
|
||||
SECTION .text:CODE:REORDER(1)
|
||||
LCD_IRQHandler
|
||||
B LCD_IRQHandler
|
||||
|
||||
PUBWEAK MSC_IRQHandler
|
||||
SECTION .text:CODE:REORDER(1)
|
||||
MSC_IRQHandler
|
||||
B MSC_IRQHandler
|
||||
|
||||
PUBWEAK AES_IRQHandler
|
||||
SECTION .text:CODE:REORDER(1)
|
||||
AES_IRQHandler
|
||||
B AES_IRQHandler
|
||||
|
||||
END
|
Loading…
Add table
Add a link
Reference in a new issue