Search found 24 matches

by nmz787
Wed Mar 22, 2017 8:49 am
Forum: Other Boards
Topic: How can I increase the callback priority/importance on my Timer? (STM32F401)
Replies: 12
Views: 523

Re: How can I increase the callback priority/importance on my Timer? (STM32F401)

another odd issue with that code, is that the board locks up if I try to set the default period to something small, like 100 This is odd especially because if I start the board with higher period and width settings, then adjust things later, with the adjust_tim1 function, it works to decrease thing...
by nmz787
Wed Mar 22, 2017 8:35 am
Forum: Other Boards
Topic: How can I increase the callback priority/importance on my Timer? (STM32F401)
Replies: 12
Views: 523

Re: How can I increase the callback priority/importance on my Timer? (STM32F401)

I modified nvic.py to add the nvic_set_prio function. The dump_nvic routine doesn't print 0 entries, so any entry that doesn't show up can be assumed to be zero. You can see that the SysTick_IRQn (-1) now has a priority of 1, and TIM1_UP_TIM10_IRQn (25) doesn't show up any more which means it has a...
by nmz787
Wed Mar 22, 2017 8:31 am
Forum: Other Boards
Topic: How can I increase the callback priority/importance on my Timer? (STM32F401)
Replies: 12
Views: 523

Re: How can I increase the callback priority/importance on my Timer? (STM32F401)

NVIC and SysTick are common to all Cortex-M processors. STM has document PM0214: http://www.st.com/resource/en/programming_manual/dm00046982.pdf which covers off the STM32F3 and STM32F4 series. This document includes the NVIC, SysTick, the instruction set and registers. Ah, ok, thanks! More to read...
by nmz787
Wed Mar 22, 2017 5:02 am
Forum: Other Boards
Topic: How can I increase the callback priority/importance on my Timer? (STM32F401)
Replies: 12
Views: 523

Re: How can I increase the callback priority/importance on my Timer? (STM32F401)

I couldn't see the SysTick interrupt at level 0 in my output: NVIC_PRIO = 00000000 @ e000e400 VTOR = 08000000 @ e000ed08 System IRQs -2:15 Regular IRQs 4:2 25:14 27:14 50:6 67:6 and my board didn't like when I tried setting the callback function's priority to 0. It did however seem to be OK with bei...
by nmz787
Mon Mar 20, 2017 6:31 am
Forum: Other Boards
Topic: How can I increase the callback priority/importance on my Timer? (STM32F401)
Replies: 12
Views: 523

Re: How can I increase the callback priority/importance on my Timer? (STM32F401)

another odd issue with that code, is that the board locks up if I try to set the default period to something small, like 100 This is odd especially because if I start the board with higher period and width settings, then adjust things later, with the adjust_tim1 function, it works to decrease things...
by nmz787
Mon Mar 20, 2017 6:27 am
Forum: Other Boards
Topic: How can I increase the callback priority/importance on my Timer? (STM32F401)
Replies: 12
Views: 523

How can I increase the callback priority/importance on my Timer? (STM32F401)

I have an STM32F401RET6 (on a G30Th dev board) that I've programmed TIM1 with one pulse mode (OPM), and have enabled n-pulse mode by setting a number of pulses to the repetition count register (RCR). I also attach a callback (interrupt function) to the Timer object at creation time, and by using OPM...
by nmz787
Thu Mar 02, 2017 9:49 am
Forum: General Discussion and Questions
Topic: Enabling a timer PWM channels in-sync
Replies: 5
Views: 329

Re: Enabling a timer PWM channels in-sync

Ok, I think I got it working... I need to really clean things up, but here's what I've got as of now, and it seems glitch-free for startup and shutdown, as well as for adjusting the pulse width and period. https://gist.github.com/nmz787/edd964e9f06ade61de75fbc38bee9b8e Basically, TIM1 starts TIM2, T...
by nmz787
Wed Mar 01, 2017 9:37 pm
Forum: General Discussion and Questions
Topic: Enabling a timer PWM channels in-sync
Replies: 5
Views: 329

Re: Enabling a timer PWM channels in-sync

P.S. The problem with using PWM_INVERTED is that I actually care about the positive portions, while using INVERTED means the logic sees the pulse is actually "period - pulse_width"... but the portion I use is the wing/edge of this... so when I stop the timers, the last 'useful to me pulse'...
by nmz787
Wed Mar 01, 2017 9:29 pm
Forum: General Discussion and Questions
Topic: Enabling a timer PWM channels in-sync
Replies: 5
Views: 329

Re: Enabling a timer PWM channels in-sync

Does anyone around here take bounties? :? I spent another night trying things with no phenomenal progress. Hopefully it doesn't take too many more of these kind of nights. By out of phase, imagine a PWM pulse train (of constant period and pulse-width), then add the requirement that every-other pulse...

Go to advanced search