From 9811576dddf0a9a7300e35174d291c9ece70bd12 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Mon, 28 Apr 2014 07:07:47 -0600 Subject: STM32: More places where up_prioritize_irq is called when CONFIG_ARCH_IRQPRIO is not defined. Sourceforge ticket #26 --- nuttx/ChangeLog | 6 +++--- nuttx/arch/arm/src/stm32/stm32_sdio.c | 4 +++- nuttx/arch/arm/src/stm32/stm32_tim.c | 7 ++++++- nuttx/arch/arm/src/stm32/stm32_usbdev.c | 4 +++- nuttx/arch/arm/src/stm32/stm32f10xxx_dma.c | 4 +++- nuttx/arch/arm/src/stm32/stm32f20xxx_dma.c | 4 +++- nuttx/arch/arm/src/stm32/stm32f40xxx_dma.c | 4 +++- nuttx/configs/16z/README.txt | 3 +++ nuttx/sched/task_setup.c | 2 +- 9 files changed, 28 insertions(+), 10 deletions(-) diff --git a/nuttx/ChangeLog b/nuttx/ChangeLog index a3d3c8dd7..2ab92b961 100644 --- a/nuttx/ChangeLog +++ b/nuttx/ChangeLog @@ -7251,7 +7251,7 @@ * arch/z16/src/z16f_timerisr.c: Fix calculation of timer reload and prescaler. The timer frequency was way too fast (2014-4-25). - * arch/arm/src/stm32/stm32_otgfsdev.c: Sourceforge Ticket #26. - up_prioritize_irq should not be called if CONFIG_ARCH_IRQPRIO - is not defined (2014-4-25). + * arch/arm/src/stm32/stm32_otgfsdev.c and others: Sourceforge + Ticket #26. up_prioritize_irq should not be called if + CONFIG_ARCH_IRQPRIO is not defined (2014-4-25). diff --git a/nuttx/arch/arm/src/stm32/stm32_sdio.c b/nuttx/arch/arm/src/stm32/stm32_sdio.c index 2d1e9e21e..f731ad75c 100644 --- a/nuttx/arch/arm/src/stm32/stm32_sdio.c +++ b/nuttx/arch/arm/src/stm32/stm32_sdio.c @@ -1672,9 +1672,11 @@ static int stm32_attach(FAR struct sdio_dev_s *dev) up_enable_irq(STM32_IRQ_SDIO); - /* Set the interrrupt priority */ +#ifdef CONFIG_ARCH_IRQPRIO + /* Set the interrupt priority */ up_prioritize_irq(STM32_IRQ_SDIO, CONFIG_SDIO_PRI); +#endif } return ret; diff --git a/nuttx/arch/arm/src/stm32/stm32_tim.c b/nuttx/arch/arm/src/stm32/stm32_tim.c index 45cffe773..e154abdef 100644 --- a/nuttx/arch/arm/src/stm32/stm32_tim.c +++ b/nuttx/arch/arm/src/stm32/stm32_tim.c @@ -392,7 +392,12 @@ static int stm32_tim_setisr(FAR struct stm32_tim_dev_s *dev, irq_attach(vectorno, handler); up_enable_irq(vectorno); -//up_prioritize_irq(vectorno, NVIC_SYSH_PRIORITY_DEFAULT); + +#ifdef CONFIG_ARCH_IRQPRIO + /* Set the interrupt priority */ + + up_prioritize_irq(vectorno, NVIC_SYSH_PRIORITY_DEFAULT); +#endif return OK; } diff --git a/nuttx/arch/arm/src/stm32/stm32_usbdev.c b/nuttx/arch/arm/src/stm32/stm32_usbdev.c index 816e97409..1231e5912 100644 --- a/nuttx/arch/arm/src/stm32/stm32_usbdev.c +++ b/nuttx/arch/arm/src/stm32/stm32_usbdev.c @@ -3867,10 +3867,12 @@ int usbdev_register(struct usbdevclass_driver_s *driver) up_enable_irq(STM32_IRQ_USBHP); up_enable_irq(STM32_IRQ_USBLP); - /* Set the interrrupt priority */ +#ifdef CONFIG_ARCH_IRQPRIO + /* Set the interrupt priority */ up_prioritize_irq(STM32_IRQ_USBHP, CONFIG_USB_PRI); up_prioritize_irq(STM32_IRQ_USBLP, CONFIG_USB_PRI); +#endif /* Enable pull-up to connect the device. The host should enumerate us * some time after this diff --git a/nuttx/arch/arm/src/stm32/stm32f10xxx_dma.c b/nuttx/arch/arm/src/stm32/stm32f10xxx_dma.c index c92db5dce..1154b23ae 100644 --- a/nuttx/arch/arm/src/stm32/stm32f10xxx_dma.c +++ b/nuttx/arch/arm/src/stm32/stm32f10xxx_dma.c @@ -359,9 +359,11 @@ void weak_function up_dmainitialize(void) up_enable_irq(dmach->irq); - /* Set the interrrupt priority */ +#ifdef CONFIG_ARCH_IRQPRIO + /* Set the interrupt priority */ up_prioritize_irq(dmach->irq, CONFIG_DMA_PRI); +#endif } } diff --git a/nuttx/arch/arm/src/stm32/stm32f20xxx_dma.c b/nuttx/arch/arm/src/stm32/stm32f20xxx_dma.c index e6873e242..ea1a1f0ed 100644 --- a/nuttx/arch/arm/src/stm32/stm32f20xxx_dma.c +++ b/nuttx/arch/arm/src/stm32/stm32f20xxx_dma.c @@ -493,9 +493,11 @@ void weak_function up_dmainitialize(void) up_enable_irq(dmast->irq); - /* Set the interrrupt priority */ +#ifdef CONFIG_ARCH_IRQPRIO + /* Set the interrupt priority */ up_prioritize_irq(dmast->irq, CONFIG_DMA_PRI); +#endif } } diff --git a/nuttx/arch/arm/src/stm32/stm32f40xxx_dma.c b/nuttx/arch/arm/src/stm32/stm32f40xxx_dma.c index 0a45ab965..12c59de46 100644 --- a/nuttx/arch/arm/src/stm32/stm32f40xxx_dma.c +++ b/nuttx/arch/arm/src/stm32/stm32f40xxx_dma.c @@ -492,9 +492,11 @@ void weak_function up_dmainitialize(void) up_enable_irq(dmast->irq); - /* Set the interrrupt priority */ +#ifdef CONFIG_ARCH_IRQPRIO + /* Set the interrupt priority */ up_prioritize_irq(dmast->irq, CONFIG_DMA_PRI); +#endif } } diff --git a/nuttx/configs/16z/README.txt b/nuttx/configs/16z/README.txt index 8b8a0ae6f..03338ada6 100644 --- a/nuttx/configs/16z/README.txt +++ b/nuttx/configs/16z/README.txt @@ -122,6 +122,9 @@ Version 5.0.1 All testing has been performed with ZSD II verion 5.0.1 for the ZNEO. + There are some problems with this compiler version. See the section + entitled "Patches" below. + Other Versions If you use any version of ZDS-II other than 5.0.1 or if you install ZDS-II diff --git a/nuttx/sched/task_setup.c b/nuttx/sched/task_setup.c index ed1578da9..3e798f407 100644 --- a/nuttx/sched/task_setup.c +++ b/nuttx/sched/task_setup.c @@ -495,7 +495,7 @@ static int task_tcbargsetup(FAR struct task_tcb_s *tcb, * Description: * This functions is called only from task_argsetup() for the case of the * kernel build where the argv[] array and all strings are copied to the - * task's stack. This is done because the TCB (and kernal allocated + * task's stack. This is done because the TCB (and kernel allocated * strings) are only accessible in kernel-mode. Data on the stack, on the * other hand, is guaranteed to be accessible no matter what mode the * task runs in. -- cgit v1.2.3