MOD54415 HiResTimer

Discussion to talk about software related topics only.
User avatar
dciliske
Posts: 624
Joined: Mon Feb 06, 2012 9:37 am
Location: San Diego, CA
Contact:

Re: MOD54415 HiResTimer

Post by dciliske »

Yes it does. You said that your new task runs with priority MAIN_PRIO+1. MAIN_PRIO+1 is higher/larger than MAIN_PRIO. That means it will only run when UserMain is not running. That means the only time period in which it gets to run is when an OSTimeDly or *Pend function is called during UserMain.

You also said you have interrupts for reading a PWM (I really hope I'm reading your post wrong!!!). If the PWM signal you're reading is remotely high frequency (>1KHz), you should be using a DMA Timer to sample it. Though thinking about it, you said this was reading an IMU, hence autopilot, so I'll assume the PWM is a Servo drive PWM and is 50 Hz, which should be fine. On that note... PAGING PAUL (He's done/is doing exactly what you're doing).

You're not by chance working on a project for Sparkfun's Autonomous Vehicle Competition, are you?

-Dan
Dan Ciliske
Project Engineer
Netburner, Inc
rnixon
Posts: 833
Joined: Thu Apr 24, 2008 3:59 pm

Re: MOD54415 HiResTimer

Post by rnixon »

LEDs are good indicators. For faster times and exact measurements of processing time I use GPIO signals and toggle them. A printf will take a long time and will add to the problem. At a minimum, make sure you know exactly how long your ISR takes so you can do the math on how much margin you have to accomplish your processing.
nicobari
Posts: 110
Joined: Mon Jan 30, 2012 12:15 pm

Re: MOD54415 HiResTimer

Post by nicobari »

Hi dciliske, thanks for the nice explanation. You are correct that I am trying to make an autopilot and the PWM I am reading in is 50 Hz also this is for my research and not for Sparkfun's Autonomous Vehicle Competition (I wish I was ;)). Also I am using HiResTimer sample my PWM time, which I assume from documentation to be a DMA timer.and yeah yesterday I spent some time with oscilloscope and blinking LED to figure out some interval lengths in my code.

P.S the autopilot is for quadrotor and after removing all the bugs, it is working like a charm.

Thanks again, Regards,
TM
Post Reply