FreeRTOS Support Archive
The FreeRTOS support forum is used to obtain active support directly from Real
Time Engineers Ltd. In return for using our top quality software and services for
free, we request you play fair and do your bit to help others too! Sign up
to receive notifications of new support topics then help where you can.
This is a read only archive of threads posted to the FreeRTOS support forum.
The archive is updated every week, so will not always contain the very latest posts.
Use these archive pages to search previous posts. Use the Live FreeRTOS Forum
link to reply to a post, or start a new support thread.
[FreeRTOS Home] [Live FreeRTOS Forum] [FAQ] [Archive Top] [July 2010 Threads] STM32 exti interrupt problemPosted by Gabriele Moroni on July 2, 2010 Hi, when i use exti interrupt only 1/3 works fine. configure exti:
GPIO_EXTILineConfig(GPIO_PortSourceGPIOA, GPIO_PinSource0); GPIO_EXTILineConfig(GPIO_PortSourceGPIOA, GPIO_PinSource1); GPIO_EXTILineConfig(GPIO_PortSourceGPIOB, GPIO_PinSource15);
EXTI_ClearITPendingBit(EXTI_Line0); EXTI_InitStructure.EXTI_Line = EXTI_Line0 | EXTI_Line1 | EXTI_Line15; EXTI_InitStructure.EXTI_Mode = EXTI_Mode_Interrupt; EXTI_InitStructure.EXTI_Trigger = EXTI_Trigger_Falling; EXTI_InitStructure.EXTI_LineCmd = ENABLE; EXTI_Init(&EXTI_InitStructure);
and NVIC: /* Set the Vector Table base location at 0x08000000 */ NVIC_SetVectorTable(NVIC_VectTab_FLASH, 0x0);
/* Configure one bit for preemption priority */ NVIC_PriorityGroupConfig(NVIC_PriorityGroup_2);
// Enable the EXTI Line0 Interrupt NVIC_InitStructure.NVIC_IRQChannel = EXTI0_IRQn; NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 0; NVIC_InitStructure.NVIC_IRQChannelSubPriority=1; NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE; NVIC_Init(&NVIC_InitStructure);
// Enable the EXTI Line1 Interrupt NVIC_InitStructure.NVIC_IRQChannel = EXTI1_IRQn; NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 0; NVIC_InitStructure.NVIC_IRQChannelSubPriority=0; NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE; NVIC_Init(&NVIC_InitStructure);
// Enable the EXTI Line15_10 Interrupt NVIC_InitStructure.NVIC_IRQChannel = EXTI15_10_IRQn; NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 0; NVIC_InitStructure.NVIC_IRQChannelSubPriority=2; NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE; NVIC_Init(&NVIC_InitStructure);
but only exti 0 works. i've tryed to comment other interrupts except line 1 but no results found. can anyone help me?
RE: STM32 exti interrupt problemPosted by Dave on July 2, 2010 Are you sure this is a FreeRTOS issue?
RE: STM32 exti interrupt problemPosted by Gabriele Moroni on July 2, 2010 Yes, i've a previous code without freertos and it works perfectly on the same hardware.
RE: STM32 exti interrupt problemPosted by Dave on July 2, 2010 In which case, can you post the interrupt handler code too please. Use the Codify Text tags to stop it loosing its formatting.
RE: STM32 exti interrupt problemPosted by Gabriele Moroni on July 2, 2010 So, i've found where is the error. A variable goes out of memory before the interrupt was reached. i'm sorry for the mistake. Thank you for all.
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.
|