*** EFM32 branch ***

1. Upgrade EFM32 driver libraries (CMSIS and efm32lib): version 2.3.0 -> 2.3.2
2. Upgrade EFM32GG_DK3750 development kit driver library: version 1.2.1 -> 1.2.2
3. Upgrade EFM32_Gxxx_DK development kit driver library: version 1.7.2 -> 1.7.3
4. Add LCD driver (SSD2119) and DEMO
5. Change SPI write format
6. Modify SD card driver due to SPI write format changed
7. Modify building scripts

git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1883 bbd45198-f89e-11dd-88c7-29a3b14d5316
This commit is contained in:
onelife.real
2011-12-27 07:44:29 +00:00
parent 85ceda00da
commit 10ec208306
288 changed files with 7069 additions and 2749 deletions
+11
View File
@@ -0,0 +1,11 @@
import rtconfig
from building import *
if rtconfig.EFM32_BOARD == 'EFM32GG_DK3750':
src = Glob('*.c')
CPPPATH = [GetCurrentDir()]
group = DefineGroup('EFM32GG_DK3750', src, depend = [''], CPPPATH = CPPPATH)
Return('group')
else:
Return('')
+1 -1
View File
@@ -2,7 +2,7 @@
* @file
* @brief EFM32GG_DK3750 board support package
* @author Energy Micro AS
* @version 1.2.1
* @version 1.2.2
******************************************************************************
* @section License
* <b>(C) Copyright 2011 Energy Micro AS, http://www.energymicro.com</b>
+1 -1
View File
@@ -2,7 +2,7 @@
* @file
* @brief EFM32GG_DK3750 board support package API
* @author Energy Micro AS
* @version 1.2.1
* @version 1.2.2
******************************************************************************
* @section License
* <b>(C) Copyright 2011 Energy Micro AS, http://www.energymicro.com</b>
+1 -1
View File
@@ -2,7 +2,7 @@
* @file
* @brief Board Control register definitions
* @author Energy Micro AS
* @version 1.2.1
* @version 1.2.2
******************************************************************************
* @section License
* <b>(C) Copyright 2011 Energy Micro AS, http://www.energymicro.com</b>
+1 -1
View File
@@ -2,7 +2,7 @@
* @file
* @brief EFM32GG_DK3750 board support package BRD3600A API implementation
* @author Energy Micro AS
* @version 1.2.1
* @version 1.2.2
******************************************************************************
* @section License
* <b>(C) Copyright 2011 Energy Micro AS, http://www.energymicro.com</b>
+1 -1
View File
@@ -2,7 +2,7 @@
* @file
* @brief EFM32GG_DK3750 board support package EBI API implementation
* @author Energy Micro AS
* @version 1.2.1
* @version 1.2.2
******************************************************************************
* @section License
* <b>(C) Copyright 2011 Energy Micro AS, http://www.energymicro.com</b>
+9 -10
View File
@@ -2,7 +2,7 @@
* @file
* @brief EFM32GG_DK3750 board support package SPI API implementation
* @author Energy Micro AS
* @version 1.2.1
* @version 1.2.2
******************************************************************************
* @section License
* <b>(C) Copyright 2011 Energy Micro AS, http://www.energymicro.com</b>
@@ -74,12 +74,11 @@ static void SPI_BC_Init(void)
GPIO_PinModeSet(PORT_SPI_CS, PIN_SPI_CS, gpioModePushPull, 1);
/* Configure to use SPI master with manual CS */
/* For now, configure SPI for worst case 32MHz clock in order to work for all */
/* For now, configure SPI for worst case 48MHz clock in order to work for all */
/* configurations. */
bcinit.refFreq = 48000000;
bcinit.baudrate = 7000000;
USART_Reset(USART_USED);
/* Initialize USART */
USART_InitSync(USART_USED, &bcinit);
@@ -93,6 +92,7 @@ static void SPI_BC_Init(void)
*****************************************************************************/
static void SPI_BC_Disable(void)
{
/* Restore and disable USART */
USART_Reset(USART_USED);
GPIO_PinModeSet(PORT_SPI_TX, PIN_SPI_TX, gpioModeDisabled, 0);
@@ -155,12 +155,11 @@ static void SPI_BC_Write(uint8_t addr, uint16_t data)
/**************************************************************************//**
* @brief Performs SPI read from FPGA register
* @param addr Address of register
* @param data Dummy data
* @return 16-bit value of board controller register
*****************************************************************************/
static uint16_t SPI_BC_Read(uint8_t addr, uint16_t data)
static uint16_t SPI_BC_Read(uint8_t addr)
{
return SPI_BC_Access(addr, 1, data);
return SPI_BC_Access(addr, 1, 0);
}
@@ -182,7 +181,6 @@ bool DVK_SPI_init(void)
SPI_BC_Init();
/* Read "board control Magic" register to verify SPI is up and running */
/* if not FPGA is configured to be in EBI mode */
bcMagic = DVK_SPI_readRegister(&BC_REGISTER->MAGIC);
if (bcMagic != BC_MAGIC_VALUE)
{
@@ -219,9 +217,10 @@ uint16_t DVK_SPI_readRegister(volatile uint16_t *addr)
SPI_BC_Write(0x01, 0xFF & ((uint32_t) addr >> 16)); /*MSBs of address*/
SPI_BC_Write(0x02, (0x0C000000 & (uint32_t) addr) >> 26); /*Chip select*/
}
/* Read twice */
data = SPI_BC_Read(0x03, 0);
data = SPI_BC_Read(0x03, 0);
/* Read twice; when register address has changed we need two SPI transfer
* to clock out valid data through board controller FIFOs */
data = SPI_BC_Read(0x03);
data = SPI_BC_Read(0x03);
lastAddr = addr;
return data;
}
+1 -1
View File
@@ -2,7 +2,7 @@
* @file
* @brief API for enabling SWO or ETM trace on DK3750 board
* @author Energy Micro AS
* @version 1.2.1
* @version 1.2.2
******************************************************************************
* @section License
* <b>(C) Copyright 2011 Energy Micro AS, http://www.energymicro.com</b>
+1 -1
View File
@@ -2,7 +2,7 @@
* @file
* @brief API for enabling SWO or ETM trace on DK3750 board
* @author Energy Micro AS
* @version 1.2.1
* @version 1.2.2
******************************************************************************
* @section License
* <b>(C) Copyright 2011 Energy Micro AS, http://www.energymicro.com</b>
+11
View File
@@ -0,0 +1,11 @@
import rtconfig
from building import *
if rtconfig.EFM32_BOARD == 'EFM32_GXXX_DK':
src = Glob('*.c')
CPPPATH = [GetCurrentDir()]
group = DefineGroup('EFM32_GXXX_DK', src, depend = [''], CPPPATH = CPPPATH)
Return('group')
else:
Return('')
+8 -1
View File
@@ -2,7 +2,7 @@
* @file
* @brief DVK board support package, initialization
* @author Energy Micro AS
* @version 1.7.2
* @version 1.7.3
******************************************************************************
* @section License
* <b>(C) Copyright 2010 Energy Micro AS, http://www.energymicro.com</b>
@@ -29,6 +29,11 @@
#include "efm32.h"
#include "dvk.h"
/***************************************************************************//**
* @addtogroup BSP
* @{
******************************************************************************/
/**************************************************************************//**
* @brief Initializes DVK, configures board control access
*****************************************************************************/
@@ -67,3 +72,5 @@ void DVK_disable(void)
DVK_SPI_disable();
#endif
}
/** @} (end group BSP) */
+7 -1
View File
@@ -2,7 +2,7 @@
* @file
* @brief DVK Board Support, master header file
* @author Energy Micro AS
* @version 1.7.2
* @version 1.7.3
******************************************************************************
* @section License
* <b>(C) Copyright 2010 Energy Micro AS, http://www.energymicro.com</b>
@@ -29,6 +29,11 @@
#ifndef __DVK_H
#define __DVK_H
/***************************************************************************//**
* @addtogroup BSP
* @{
******************************************************************************/
#include <stdint.h>
#include <stdbool.h>
#include "dvk_boardcontrol.h"
@@ -131,5 +136,6 @@ void DVK_disable(void);
}
#endif
/** @} (end group BSP) */
#endif
+8 -1
View File
@@ -2,7 +2,7 @@
* @file
* @brief Board Control register definitions
* @author Energy Micro AS
* @version 1.7.2
* @version 1.7.3
******************************************************************************
* @section License
* <b>(C) Copyright 2010 Energy Micro AS, http://www.energymicro.com</b>
@@ -29,6 +29,11 @@
#ifndef __DVK_BCREGISTERS_H
#define __DVK_BCREGISTERS_H
/***************************************************************************//**
* @addtogroup BSP
* @{
******************************************************************************/
#include <stdint.h>
/**************************************************************************//**
@@ -172,3 +177,5 @@
#define BC_INTFLAG_AEM (1 << 3) /**< AEM interrupt triggered */
#endif
/** @} (end group BSP) */
+8 -1
View File
@@ -2,7 +2,7 @@
* @file
* @brief DVK Peripheral Board Control API implementation
* @author Energy Micro AS
* @version 1.7.2
* @version 1.7.3
******************************************************************************
* @section License
* <b>(C) Copyright 2010 Energy Micro AS, http://www.energymicro.com</b>
@@ -26,6 +26,11 @@
*
*****************************************************************************/
/***************************************************************************//**
* @addtogroup BSP
* @{
******************************************************************************/
#include "efm32.h"
#include "dvk.h"
#include "dvk_boardcontrol.h"
@@ -246,3 +251,5 @@ uint16_t DVK_getInterruptFlags(void)
{
return DVK_readRegister(BC_INTFLAG);
}
/** @} (end group BSP) */
+9 -1
View File
@@ -2,7 +2,7 @@
* @file
* @brief DVK Peripheral Board Control, prototypes and definitions
* @author Energy Micro AS
* @version 1.7.2
* @version 1.7.3
******************************************************************************
* @section License
* <b>(C) Copyright 2010 Energy Micro AS, http://www.energymicro.com</b>
@@ -29,6 +29,11 @@
#ifndef __DVK_BOARDCONTROL_H
#define __DVK_BOARDCONTROL_H
/***************************************************************************//**
* @addtogroup BSP
* @{
******************************************************************************/
#include <stdint.h>
#include "dvk_bcregisters.h"
@@ -78,4 +83,7 @@ void DVK_disableInterrupt(uint16_t flags);
uint16_t DVK_getInterruptFlags(void);
void DVK_clearInterruptFlags(uint16_t flags);
/** @} (end group BSP) */
#endif
+8 -1
View File
@@ -4,7 +4,7 @@
* 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.7.2
* @version 1.7.3
******************************************************************************
* @section License
* <b>(C) Copyright 2010 Energy Micro AS, http://www.energymicro.com</b>
@@ -34,6 +34,11 @@
#include "dvk.h"
#include "dvk_bcregisters.h"
/***************************************************************************//**
* @addtogroup BSP
* @{
******************************************************************************/
#if defined(EBI_PRESENT)
/**************************************************************************//**
* @brief Configure EBI (external bus interface) for Board Control register
@@ -242,3 +247,5 @@ uint16_t DVK_EBI_readRegister(volatile uint16_t *addr)
return *addr;
}
#endif
/** @} (end group BSP) */
+9 -1
View File
@@ -4,7 +4,7 @@
* This implementation use the USART2 SPI interface to control board
* control registers. It works
* @author Energy Micro AS
* @version 1.7.2
* @version 1.7.3
******************************************************************************
* @section License
* <b>(C) Copyright 2010 Energy Micro AS, http://www.energymicro.com</b>
@@ -27,6 +27,12 @@
* arising from your use of this Software.
*
*****************************************************************************/
/***************************************************************************//**
* @addtogroup BSP
* @{
******************************************************************************/
#include <stdio.h>
#include "efm32.h"
#include "efm32_usart.h"
@@ -252,3 +258,5 @@ void DVK_SPI_writeRegister(volatile uint16_t *addr, uint16_t data)
spiWrite(0x03, data); /*Data*/
lastAddr = addr;
}
/** @} (end group BSP) */
@@ -9,7 +9,7 @@
* Add "#include "efm32.h" to your source files
* @endverbatim
* @author Energy Micro AS
* @version 2.3.0
* @version 2.3.2
******************************************************************************
* @section License
* <b>(C) Copyright 2011 Energy Micro AS, http://www.energymicro.com</b>
@@ -3,7 +3,7 @@
* @brief CMSIS Cortex-M3 Peripheral Access Layer Header File
* for EFM EFM32G200F16
* @author Energy Micro AS
* @version 2.3.0
* @version 2.3.2
******************************************************************************
* @section License
* <b>(C) Copyright 2011 Energy Micro AS, http://www.energymicro.com</b>
@@ -3,7 +3,7 @@
* @brief CMSIS Cortex-M3 Peripheral Access Layer Header File
* for EFM EFM32G200F32
* @author Energy Micro AS
* @version 2.3.0
* @version 2.3.2
******************************************************************************
* @section License
* <b>(C) Copyright 2011 Energy Micro AS, http://www.energymicro.com</b>
@@ -3,7 +3,7 @@
* @brief CMSIS Cortex-M3 Peripheral Access Layer Header File
* for EFM EFM32G200F64
* @author Energy Micro AS
* @version 2.3.0
* @version 2.3.2
******************************************************************************
* @section License
* <b>(C) Copyright 2011 Energy Micro AS, http://www.energymicro.com</b>
@@ -3,7 +3,7 @@
* @brief CMSIS Cortex-M3 Peripheral Access Layer Header File
* for EFM EFM32G210F128
* @author Energy Micro AS
* @version 2.3.0
* @version 2.3.2
******************************************************************************
* @section License
* <b>(C) Copyright 2011 Energy Micro AS, http://www.energymicro.com</b>
@@ -3,7 +3,7 @@
* @brief CMSIS Cortex-M3 Peripheral Access Layer Header File
* for EFM EFM32G222F128
* @author Energy Micro AS
* @version 2.3.0
* @version 2.3.2
******************************************************************************
* @section License
* <b>(C) Copyright 2011 Energy Micro AS, http://www.energymicro.com</b>
@@ -3,7 +3,7 @@
* @brief CMSIS Cortex-M3 Peripheral Access Layer Header File
* for EFM EFM32G222F32
* @author Energy Micro AS
* @version 2.3.0
* @version 2.3.2
******************************************************************************
* @section License
* <b>(C) Copyright 2011 Energy Micro AS, http://www.energymicro.com</b>
@@ -3,7 +3,7 @@
* @brief CMSIS Cortex-M3 Peripheral Access Layer Header File
* for EFM EFM32G222F64
* @author Energy Micro AS
* @version 2.3.0
* @version 2.3.2
******************************************************************************
* @section License
* <b>(C) Copyright 2011 Energy Micro AS, http://www.energymicro.com</b>
@@ -3,7 +3,7 @@
* @brief CMSIS Cortex-M3 Peripheral Access Layer Header File
* for EFM EFM32G230F128
* @author Energy Micro AS
* @version 2.3.0
* @version 2.3.2
******************************************************************************
* @section License
* <b>(C) Copyright 2011 Energy Micro AS, http://www.energymicro.com</b>
@@ -3,7 +3,7 @@
* @brief CMSIS Cortex-M3 Peripheral Access Layer Header File
* for EFM EFM32G230F32
* @author Energy Micro AS
* @version 2.3.0
* @version 2.3.2
******************************************************************************
* @section License
* <b>(C) Copyright 2011 Energy Micro AS, http://www.energymicro.com</b>
@@ -3,7 +3,7 @@
* @brief CMSIS Cortex-M3 Peripheral Access Layer Header File
* for EFM EFM32G230F64
* @author Energy Micro AS
* @version 2.3.0
* @version 2.3.2
******************************************************************************
* @section License
* <b>(C) Copyright 2011 Energy Micro AS, http://www.energymicro.com</b>
@@ -3,7 +3,7 @@
* @brief CMSIS Cortex-M3 Peripheral Access Layer Header File
* for EFM EFM32G232F128
* @author Energy Micro AS
* @version 2.3.0
* @version 2.3.2
******************************************************************************
* @section License
* <b>(C) Copyright 2011 Energy Micro AS, http://www.energymicro.com</b>
@@ -3,7 +3,7 @@
* @brief CMSIS Cortex-M3 Peripheral Access Layer Header File
* for EFM EFM32G232F32
* @author Energy Micro AS
* @version 2.3.0
* @version 2.3.2
******************************************************************************
* @section License
* <b>(C) Copyright 2011 Energy Micro AS, http://www.energymicro.com</b>
@@ -3,7 +3,7 @@
* @brief CMSIS Cortex-M3 Peripheral Access Layer Header File
* for EFM EFM32G232F64
* @author Energy Micro AS
* @version 2.3.0
* @version 2.3.2
******************************************************************************
* @section License
* <b>(C) Copyright 2011 Energy Micro AS, http://www.energymicro.com</b>
@@ -3,7 +3,7 @@
* @brief CMSIS Cortex-M3 Peripheral Access Layer Header File
* for EFM EFM32G280F128
* @author Energy Micro AS
* @version 2.3.0
* @version 2.3.2
******************************************************************************
* @section License
* <b>(C) Copyright 2011 Energy Micro AS, http://www.energymicro.com</b>
@@ -3,7 +3,7 @@
* @brief CMSIS Cortex-M3 Peripheral Access Layer Header File
* for EFM EFM32G280F32
* @author Energy Micro AS
* @version 2.3.0
* @version 2.3.2
******************************************************************************
* @section License
* <b>(C) Copyright 2011 Energy Micro AS, http://www.energymicro.com</b>
@@ -3,7 +3,7 @@
* @brief CMSIS Cortex-M3 Peripheral Access Layer Header File
* for EFM EFM32G280F64
* @author Energy Micro AS
* @version 2.3.0
* @version 2.3.2
******************************************************************************
* @section License
* <b>(C) Copyright 2011 Energy Micro AS, http://www.energymicro.com</b>
@@ -3,7 +3,7 @@
* @brief CMSIS Cortex-M3 Peripheral Access Layer Header File
* for EFM EFM32G290F128
* @author Energy Micro AS
* @version 2.3.0
* @version 2.3.2
******************************************************************************
* @section License
* <b>(C) Copyright 2011 Energy Micro AS, http://www.energymicro.com</b>
@@ -3,7 +3,7 @@
* @brief CMSIS Cortex-M3 Peripheral Access Layer Header File
* for EFM EFM32G290F32
* @author Energy Micro AS
* @version 2.3.0
* @version 2.3.2
******************************************************************************
* @section License
* <b>(C) Copyright 2011 Energy Micro AS, http://www.energymicro.com</b>
@@ -3,7 +3,7 @@
* @brief CMSIS Cortex-M3 Peripheral Access Layer Header File
* for EFM EFM32G290F64
* @author Energy Micro AS
* @version 2.3.0
* @version 2.3.2
******************************************************************************
* @section License
* <b>(C) Copyright 2011 Energy Micro AS, http://www.energymicro.com</b>
@@ -3,7 +3,7 @@
* @brief CMSIS Cortex-M3 Peripheral Access Layer Header File
* for EFM EFM32G840F128
* @author Energy Micro AS
* @version 2.3.0
* @version 2.3.2
******************************************************************************
* @section License
* <b>(C) Copyright 2011 Energy Micro AS, http://www.energymicro.com</b>
@@ -3,7 +3,7 @@
* @brief CMSIS Cortex-M3 Peripheral Access Layer Header File
* for EFM EFM32G840F32
* @author Energy Micro AS
* @version 2.3.0
* @version 2.3.2
******************************************************************************
* @section License
* <b>(C) Copyright 2011 Energy Micro AS, http://www.energymicro.com</b>
@@ -3,7 +3,7 @@
* @brief CMSIS Cortex-M3 Peripheral Access Layer Header File
* for EFM EFM32G840F64
* @author Energy Micro AS
* @version 2.3.0
* @version 2.3.2
******************************************************************************
* @section License
* <b>(C) Copyright 2011 Energy Micro AS, http://www.energymicro.com</b>
@@ -3,7 +3,7 @@
* @brief CMSIS Cortex-M3 Peripheral Access Layer Header File
* for EFM EFM32G842F128
* @author Energy Micro AS
* @version 2.3.0
* @version 2.3.2
******************************************************************************
* @section License
* <b>(C) Copyright 2011 Energy Micro AS, http://www.energymicro.com</b>
@@ -3,7 +3,7 @@
* @brief CMSIS Cortex-M3 Peripheral Access Layer Header File
* for EFM EFM32G842F32
* @author Energy Micro AS
* @version 2.3.0
* @version 2.3.2
******************************************************************************
* @section License
* <b>(C) Copyright 2011 Energy Micro AS, http://www.energymicro.com</b>
@@ -3,7 +3,7 @@
* @brief CMSIS Cortex-M3 Peripheral Access Layer Header File
* for EFM EFM32G842F64
* @author Energy Micro AS
* @version 2.3.0
* @version 2.3.2
******************************************************************************
* @section License
* <b>(C) Copyright 2011 Energy Micro AS, http://www.energymicro.com</b>
@@ -3,7 +3,7 @@
* @brief CMSIS Cortex-M3 Peripheral Access Layer Header File
* for EFM EFM32G880F128
* @author Energy Micro AS
* @version 2.3.0
* @version 2.3.2
******************************************************************************
* @section License
* <b>(C) Copyright 2011 Energy Micro AS, http://www.energymicro.com</b>
@@ -3,7 +3,7 @@
* @brief CMSIS Cortex-M3 Peripheral Access Layer Header File
* for EFM EFM32G880F32
* @author Energy Micro AS
* @version 2.3.0
* @version 2.3.2
******************************************************************************
* @section License
* <b>(C) Copyright 2011 Energy Micro AS, http://www.energymicro.com</b>
@@ -3,7 +3,7 @@
* @brief CMSIS Cortex-M3 Peripheral Access Layer Header File
* for EFM EFM32G880F64
* @author Energy Micro AS
* @version 2.3.0
* @version 2.3.2
******************************************************************************
* @section License
* <b>(C) Copyright 2011 Energy Micro AS, http://www.energymicro.com</b>
@@ -3,7 +3,7 @@
* @brief CMSIS Cortex-M3 Peripheral Access Layer Header File
* for EFM EFM32G890F128
* @author Energy Micro AS
* @version 2.3.0
* @version 2.3.2
******************************************************************************
* @section License
* <b>(C) Copyright 2011 Energy Micro AS, http://www.energymicro.com</b>
@@ -3,7 +3,7 @@
* @brief CMSIS Cortex-M3 Peripheral Access Layer Header File
* for EFM EFM32G890F32
* @author Energy Micro AS
* @version 2.3.0
* @version 2.3.2
******************************************************************************
* @section License
* <b>(C) Copyright 2011 Energy Micro AS, http://www.energymicro.com</b>
@@ -3,7 +3,7 @@
* @brief CMSIS Cortex-M3 Peripheral Access Layer Header File
* for EFM EFM32G890F64
* @author Energy Micro AS
* @version 2.3.0
* @version 2.3.2
******************************************************************************
* @section License
* <b>(C) Copyright 2011 Energy Micro AS, http://www.energymicro.com</b>
@@ -3,7 +3,7 @@
* @brief CMSIS Cortex-M3 Peripheral Access Layer Header File
* for EFM EFM32GG230F1024
* @author Energy Micro AS
* @version 2.3.0
* @version 2.3.2
******************************************************************************
* @section License
* <b>(C) Copyright 2011 Energy Micro AS, http://www.energymicro.com</b>

Some files were not shown because too many files have changed in this diff Show More