2014-02-17 07:34 PM
Hello Everyone,
I need help to implement 2 different interrupts in order to :Any help will be very appreciated.
Thanks #em4095 #rfid #interrupts #stm32-f42014-02-18 08:58 AM
Hello Theo !
On the face of it, it seems that what you want to do is pretty simple. Have a look at STM32F4xx_DSP_StdPeriph_Lib_V1.3.0\Project\STM32F4xx_StdPeriph_Examples\EXTI\EXTI_Example You simply enable the correct clocks, then you configure the gpio, then the EXTI and NVIC from there any interrupts will trigger the ISR (interrupt service routine) in stm32f4xx_it.c I could try to explain it all here but they do a much better job in stm32f4xx_exti.c [..] In order to use an I/O pin as an external interrupt source, follow steps below: (#) Configure the I/O in input mode using GPIO_Init() (#) Select the input source pin for the EXTI line using SYSCFG_EXTILineConfig() (#) Select the mode(interrupt, event) and configure the trigger selection (Rising, falling or both) using EXTI_Init() (#) Configure NVIC IRQ channel mapped to the EXTI line using NVIC_Init() If you dont know what the stdperiph lib is try this http://www.emcu.it/STM32F4xx/STM32F4-Library/STM32F4-Library.html It contains examples to do most of what people want to do. The exti example I mentioned does basically exactly what you want, you might have to change some parameters but only a few.2014-02-19 02:54 AM
Michael,
Thank you soooo much ! I'll make a try as soon as I have read everything ! And post again when I finish Thank you for your help !2014-02-19 08:06 AM
Perhaps you could use the 120 KHz to externally clock a timer, and then have your data signal input capture on one of the channels of the timers, then interrupt on the much slower data rate clock?
If phase alignment is important, input capture both signals with a faster free running timer.2014-02-20 02:46 AM
Clive, Thank you for this very useful advices.
Your right, alignment is important for this application (RFID) So If I've well understood, I configure for example : Timer 1 and Timer 2 with a ''input-capture'' mode My question is : How can I know if my code is working or not ? With the help of the Keil µvision debug session. Thank you.