More changes from Uros

git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3431 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
patacongo 2011-03-28 15:01:43 +00:00
parent f844110d82
commit 18f50c72e3
4 changed files with 81 additions and 20 deletions

View File

@ -76,6 +76,7 @@
#define STM32_RCC_CFGR_HPRE RCC_CFGR_HPRE_SYSCLK
#define STM32_HCLK_FREQUENCY STM32_PLL_FREQUENCY
#define STM32_BOARD_HCLK STM32_HCLK_FREQUENCY /* same as above, to satisfy compiler */
/* APB2 clock (PCLK2) is HCLK (72MHz) */
@ -91,6 +92,13 @@
#define STM32_CFGR_USBPRE 0
/* Timer Frequencies, if APBx is set to 1, frequency is same to APBx
* otherwise frequency is 2xAPBx.
* Note: TIM1,8 are on APB2, others on APB1 */
#define STM32_TIM18_FREQUENCY STM32_HCLK_FREQUENCY
#define STM32_TIM27_FREQUENCY STM32_HCLK_FREQUENCY
/* SDIO dividers. Note that slower clocking is required when DMA is disabled
* in order to avoid RX overrun/TX underrun errors due to delayed responses
* to service FIFOs in interrupt driven mode. These values have not been

View File

@ -503,6 +503,13 @@ CONFIG_PREALLOC_TIMERS=4
CONFIG_FS_FAT=y
CONFIG_FS_ROMFS=y
#
# I2C Settings
#
CONFIG_I2C_WRITEREAD=y
CONFIG_I2C_TRANSFER=y
CONFIG_I2C_SLAVE=n
#
# SPI-based MMC/SD driver
#
@ -858,3 +865,6 @@ CONFIG_HEAP_SIZE=
# Application configuration
CONFIG_APPS_DIR="../apps"
# Provide /dev/ramX and then: mount -t binfs /dev/ram0 /bin
CONFIG_APPS_BINDIR=y

View File

@ -80,3 +80,27 @@ int rtac_waitg(int group, int time)
{
// blocking variant of rtac_exec with timeout if specified
}
/** Power optimization of base systick timer
*
* 1. Simple method to skip wake-ups:
* - ask timers about the min. period, which is Ns * systick
* - set the preload register with floor(Ns) * DEFAULT_PRELOAD
* - on wake-up call routines Ns times.
*
* 2. If intermediate ISR occuried then:
* - check how many periods have passed by reading the counter: Np
* - set the new counter value as (counter % DEFAULT_PRELOAD)
* - call timer routines Np times; the next call is as usual, starting
* at 1. point above
*
* This is okay if ISR's do not read timers, if they read timers then:
* - on ISR wake-up the code described under 2. must be called first
* (on wake-up from IDLE)
*
* BUT: the problem is that SYSTICK does not run in Stop mode but RTC
* only, so it might be better to replace SYSTICK with RTAC (this
* module) and do the job above, permitting ultra low power modes of
* 25 uA or further down to 5 uA.
*/

View File

@ -272,6 +272,25 @@ int sif_gpios_unlock(vsn_sif_state_t peripheral)
}
/****************************************************************************
* ST LIS331DL
****************************************************************************/
void st_lis331dl_open(void)
{
}
void st_lis331dl_config(void)
{
}
void st_lis331dl_getreadings(void)
{
}
/****************************************************************************
* Analog Outputs
****************************************************************************/