2014-07-12 02:21 AM
Dear all
I configured PC.0 in STM32f103 as input in interrupt mode as rising edge. There's a pulse connected to PC.0. We need to STM32f103 reply to any rising edge by push the bus low. When I want to detect rising edge, I should configure STM32f103 as interrupt input. But when I want to reply to this pulse I should configure the PC.0 as output. I want to know is it possible to change the pin mode during interrupt routine? how we can configure that? I test some codes but the problem was when program enter interrupt routine, never come back to main loop. I'm waiting for your response. Regards,2014-07-12 04:46 AM
If it doesn't come back you'd want to make sure you cleared the interrupt.
It should be possible to reconfigure the pin, but may be consider setting it in OD mode, set high, and then set it LOW (and driving) in response to the EXTI on the rising edge.2014-07-22 06:25 AM
Thanks,
Is it possible to use systick delay library together with external interrupt? I did it but didn't work!2014-07-22 07:54 AM
Is it possible to use systick delay library together with external interrupt? I did it but didn't work!
Sure, but I suspect you sat dwelling in one interrupt handler waiting for a routine that's waiting for another interrupt. You should leave the first interrupt, and handle the delayed response in the timing interrupt.