Posted on May 17, 2011 at 12:39I was wondering if anyone could explain how to find the priority number, PRI_n of an interrupt given pre-emption priority, subpriority, and PRIGROUP (3-7 for STM32). I understand the PRI_n is the priority for the inter...
Posted on May 17, 2011 at 12:39>with TIM2_PSC at 7400 P reads as 1000 This was a mistake in my post, TIM2_PSC is correctly set to 71. The only line of code being changed in the entire program is this: Code: <BR>// Use to set prescaler to 1, (1000Hz ...
Posted on May 17, 2011 at 12:39>ok, got it. but you're saying that before and after the change of TIM2_PSC the value in P is the same. if that's true (confirm) Sorry I mean the prescaler of the individual timer channel, not the prescaler TIM2_PSC of...
Posted on May 17, 2011 at 12:39I made the same mistake again! Sorry, thank you for catching it. Prescaler set to 8 (divide the applied 1000 Hz input clock by 8) 1000/8 Hz = 125 Hz 1/(125 Hz) = .008s .008s * 1 MHz = 8000 frequency (the variable) equa...
Posted on May 17, 2011 at 12:39I made the changes to the TIM2 isr. Code:// Use to set prescaler to 1, (1000Hz / 1 = 1000Hz) // connect TI4 to IC4 (Figure 95) //TIM2_CCMR2_INPUT_CAPTURE_MODE = (0 << TIM2_CCMR2_INPUT_CAPTURE_MODE_IC4PSC) // | (1 << TI...