2008-01-17 10:25 PM
Problem with ADC Interrupt: it happens only one time
2011-05-17 12:49 AM
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.2011-05-17 12:49 AM
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.2011-05-17 12:49 AM
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.2011-05-17 12:49 AM
which tool chain you are using?