Problem with ADC Interrupt: it happens only one time
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2008-01-17 10:25 PM
Posted on January 18, 2008 at 07:25
Problem with ADC Interrupt: it happens only one time
Labels:
- Labels:
-
Legacy products
This discussion is locked. Please start a new topic to ask your question.
4 REPLIES 4
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2011-05-17 12:49 AM
Posted on May 17, 2011 at 09:49
I have a problem with ADC Interrupt. The interrupt happens only one time.
This is my code for interrupt:Code:
void ADC_IRQHandler(void){
/* Clear the end of conversion flag */ ADC_ClearFlag(ADC_FLAG_ECV); GPIO_WriteBit(GPIO6, GPIO_Pin_7, (BitAction) (1-GPIO_ReadBit(GPIO6, GPIO_Pin_7))); delay(0xFFF); GPIO_WriteBit(GPIO6, GPIO_Pin_0, (BitAction) (1-GPIO_ReadBit(GPIO6, GPIO_Pin_0))); } Leds number 7 and 0 turn on, but they don't blink. What's the problem? My code is the same of the ST Example. I put entirely my code in attach. Thanks.Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2011-05-17 12:49 AM
Posted on May 17, 2011 at 09:49
Hello,
I tested your code on our board and it works fine. Could you please tell me which STR91x revision you are using? What is the cystal frequency you are using? Regards, Najoua.Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2011-05-17 12:49 AM
Posted on May 17, 2011 at 09:49
Thanks for your answer!
I'm using STR912FW44. I don't know the crystal frequency. On this board I have wrote other programs that use interrupts like CAN, UART, TIM and they work fine. I don't know where is the problem with ADC's interrupt, but without interrupt the program works well. Thanks for your interest. Best Regards.Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2011-05-17 12:49 AM
Posted on May 17, 2011 at 09:49
which tool chain you are using?
