Merged in raiden00/nuttx (pull request #520)

Master

* stm32: add ADC DMA support to STM32F33 configuration

* stm32f33xxx_adc.c: fix compilation if no DMA

* nucleo-f334r8: eliminate warning

* nucleo-f334r8: add highpri example configuration

Approved-by: Gregory Nutt <gnutt@nuttx.org>
This commit is contained in:
Mateusz Szafoni 2017-10-28 14:29:07 +00:00 committed by Gregory Nutt
parent 382979b7cb
commit e3bb78a881
4 changed files with 111 additions and 1 deletions

View File

@ -1494,6 +1494,8 @@ config STM32_STM32F33XX
select STM32_HAVE_TIM16
select STM32_HAVE_TIM17
select STM32_HAVE_ADC2
select STM32_HAVE_ADC1_DMA
select STM32_HAVE_ADC2_DMA
select STM32_HAVE_CAN1
select STM32_HAVE_DAC1
select STM32_HAVE_DAC2

View File

@ -2107,7 +2107,7 @@ static uint32_t adc_regget(FAR struct stm32_adc_dev_s *dev)
/****************************************************************************
* Name: adc_regbufregister
****************************************************************************/
#ifdef ADC_HAVE_DMA
static int adc_regbufregister(FAR struct stm32_adc_dev_s *dev, uint16_t *buffer, uint8_t len)
{
FAR struct stm32_dev_s *priv = (FAR struct stm32_dev_s *)dev;
@ -2124,6 +2124,7 @@ static int adc_regbufregister(FAR struct stm32_adc_dev_s *dev, uint16_t *buffer,
return OK;
}
#endif
/****************************************************************************
* Name: adc_inj_get

View File

@ -0,0 +1,105 @@
CONFIG_ADC=y
CONFIG_ANALOG=y
CONFIG_ARCH="arm"
CONFIG_ARCH_BOARD="nucleo-f334r8"
CONFIG_ARCH_BOARD_NUCLEO_F334R8=y
CONFIG_ARCH_BUTTONS=y
CONFIG_ARCH_CHIP_STM32F334R8=y
CONFIG_ARCH_CHIP_STM32=y
CONFIG_ARCH_HIPRI_INTERRUPT=y
CONFIG_ARCH_RAMVECTORS=y
CONFIG_ARCH_STACKDUMP=y
CONFIG_BOARD_LOOPSPERMSEC=16717
CONFIG_BUILTIN_PROXY_STACKSIZE=512
CONFIG_BUILTIN=y
# CONFIG_DEV_NULL is not set
CONFIG_DISABLE_ENVIRON=y
CONFIG_DISABLE_MQUEUE=y
CONFIG_DISABLE_POLL=y
CONFIG_DISABLE_POSIX_TIMERS=y
CONFIG_EXAMPLES_NSH=y
CONFIG_FDCLONE_STDIO=y
CONFIG_INTELHEX_BINARY=y
CONFIG_LIBC_FLOATINGPOINT=y
# CONFIG_LIBC_LONG_LONG is not set
CONFIG_LIBM=y
CONFIG_MAX_TASKS=4
CONFIG_MAX_WDOGPARMS=1
CONFIG_NAME_MAX=16
CONFIG_NFILE_DESCRIPTORS=8
CONFIG_NFILE_STREAMS=8
CONFIG_NSH_ARCHINIT=y
CONFIG_NSH_BUILTIN_APPS=y
CONFIG_NSH_DISABLE_BASENAME=y
CONFIG_NSH_DISABLE_CAT=y
CONFIG_NSH_DISABLE_CD=y
CONFIG_NSH_DISABLE_CMP=y
CONFIG_NSH_DISABLE_CP=y
CONFIG_NSH_DISABLE_DD=y
CONFIG_NSH_DISABLE_DF=y
CONFIG_NSH_DISABLE_DIRNAME=y
CONFIG_NSH_DISABLE_EXEC=y
CONFIG_NSH_DISABLE_EXIT=y
CONFIG_NSH_DISABLE_GET=y
CONFIG_NSH_DISABLE_HEXDUMP=y
CONFIG_NSH_DISABLE_KILL=y
CONFIG_NSH_DISABLE_LOSETUP=y
CONFIG_NSH_DISABLE_LS=y
CONFIG_NSH_DISABLE_MB=y
CONFIG_NSH_DISABLE_MH=y
CONFIG_NSH_DISABLE_MKDIR=y
CONFIG_NSH_DISABLE_MKRD=y
CONFIG_NSH_DISABLE_MOUNT=y
CONFIG_NSH_DISABLE_MV=y
CONFIG_NSH_DISABLE_MW=y
# CONFIG_NSH_DISABLE_PRINTF is not set
CONFIG_NSH_DISABLE_PUT=y
CONFIG_NSH_DISABLE_PWD=y
CONFIG_NSH_DISABLE_RMDIR=y
CONFIG_NSH_DISABLE_RM=y
CONFIG_NSH_DISABLE_SET=y
CONFIG_NSH_DISABLE_SH=y
CONFIG_NSH_DISABLE_SLEEP=y
CONFIG_NSH_DISABLE_TEST=y
CONFIG_NSH_DISABLE_TIME=y
CONFIG_NSH_DISABLE_UMOUNT=y
CONFIG_NSH_DISABLE_UNAME=y
CONFIG_NSH_DISABLE_UNSET=y
CONFIG_NSH_DISABLE_USLEEP=y
CONFIG_NSH_DISABLE_WGET=y
CONFIG_NSH_DISABLE_XD=y
CONFIG_NSH_FILEIOSIZE=256
CONFIG_NSH_LINELEN=64
CONFIG_NSH_READLINE=y
CONFIG_NUCLEOF334R8_HIGHPRI=y
CONFIG_POSIX_SPAWN_PROXY_STACKSIZE=512
CONFIG_PREALLOC_TIMERS=2
CONFIG_PREALLOC_WDOGS=1
CONFIG_PTHREAD_STACK_DEFAULT=1024
CONFIG_PTHREAD_STACK_MIN=1024
CONFIG_RAM_SIZE=12288
CONFIG_RAM_START=0x20000000
CONFIG_RAW_BINARY=y
CONFIG_RR_INTERVAL=200
CONFIG_SCHED_WAITPID=y
CONFIG_SDCLONE_DISABLE=y
CONFIG_START_DAY=6
CONFIG_START_MONTH=12
CONFIG_START_YEAR=2011
CONFIG_STM32_ADC1_DMA=y
CONFIG_STM32_ADC1=y
CONFIG_STM32_ADC_NOIRQ=y
CONFIG_STM32_DMA1=y
CONFIG_STM32_HRTIM1=y
CONFIG_STM32_HRTIM_CLK_FROM_PLL=y
CONFIG_STM32_HRTIM_DISABLE_CHARDRV=y
CONFIG_STM32_HRTIM_TIMA=y
CONFIG_STM32_JTAG_SW_ENABLE=y
CONFIG_STM32_PWR=y
CONFIG_STM32_USART2=y
CONFIG_TASK_NAME_SIZE=0
CONFIG_TASK_SPAWN_DEFAULT_STACKSIZE=512
CONFIG_USART2_SERIAL_CONSOLE=y
CONFIG_USER_ENTRYPOINT="highpri_main"
CONFIG_USERMAIN_STACKSIZE=1024
CONFIG_WDOG_INTRESERVE=0

View File

@ -250,7 +250,9 @@ void dma1ch1_handler(void)
int highpri_main(int argc, char *argv[])
{
#ifdef CONFIG_STM32_ADC1_DMA
FAR struct hrtim_dev_s *hrtim;
#endif
FAR struct adc_dev_s *adc;
FAR struct highpri_s *highpri;
int ret;