2010-10-26 10:54 PM
Need clarifications on NVIC IRQ
2011-05-17 05:13 AM
The NVIC (nested vectored interrupt controller) is part of the ARM Cortex-M3 core.
An interrupt must be enabled in the the NVIC otherwise it will be ignored. Best regards Crossware2011-05-17 05:13 AM
2011-05-17 05:13 AM
Hello Crossware,
Thanks for replying. Can you please explain, how to enable an interrupt on NVIC? The things given in the reference manual is not clear to me. I believe that there is a set of registers in STM32L, which need to be configured. Any support provided is highly appreciated. Thank you.2011-05-17 05:13 AM
Hello Lowpoermcu,
''You should configure EXTI0 line then connect PA0 to EXTI0 and finally configure NVIC correspnding to EXTI0 line.'' Can you please explain which registers of STM32 needs to be configured to achieve above configurations. Thank you.2011-05-17 05:13 AM
Hi ANN,
1- GPIO configuration using GPIO registers 2- configure EXTI using EXTI registers 3- connect PA0 to EXTI0 using ''SYSCFG_EXTICR1'' In fact EXTI0 can be connected to PA0 or PB0 or PC0 or ..... and you have to select the pin through these registers. 4- configure NVIC NVIC_InitStructure.NVIC_IRQChannel = EXTI0_IRQn; NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 0x0F; NVIC_InitStructure.NVIC_IRQChannelSubPriority = 0x0F; NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE; NVIC_Init(&NVIC_InitStructure); refer to ''Interrupt and exception vectors '' section in the reference manual. That is my comprehension from documentation and I hope that I can get an STM32152-EVAL. Herzlich, MCU Lüfter2011-05-17 05:13 AM
Hello Ann
We use Wizards for these configuration things. In the image below you can see the NVIC code for EXTI0. To start with you only need the first line. You can set the priorty later when you know what you want it to be. This is for the STM32F103. Best regards Crossware2011-05-17 05:13 AM
If you have difficulty coping with direct register access, why don't you just use the ST Library??
2011-05-17 05:13 AM
Hi,
because ST library doesn't support STM32L devices, STM32L152-EVAL isn't available and we are ''thirsty'' to use STM32L. we start documentation from reference manual ans waiting for ST. MCU Lüter2011-05-17 05:13 AM
Hello all,
This is the solution I found. In order to make the interrupt works on STM32L152 within IAR workbench I needed to included the following files, other than the header file stm32l1xx.h.