Hello, i've got a problem: I'm programming the TI C6713 DSP together with DSP/BIOS. What I want to do is to get a programmable timer: I send the timer value via USB to the DSP and then I want to set the timer to this specific value. It seems to me, that in the DSP-BIOS you can only set a fixed value for the CLK manager (value in microseconds or directly configure the PRD register). So I tried to write the PRD register directly inside my source code (with a pointer to the address of the PRD0 register). That seems to work (I can watch the core registers and it is written successfully), but afterwards, the value of the register is reset to the fixed value inside the DSP-BIOS configuration. What can I do?? Please help me! Thank you, Simone Winkler
Programmable Timer with DSP/BIOS
Started by ●January 15, 2005
Reply by ●January 15, 20052005-01-15
Simone, Use Timer 1 if you need some kind of variable length timer. You don't want to mess with Timer 0 if you're using DSP/BIOS. Timer 0 as you mentioned is used by BIOS as the system tick. For example, if use make a task sleep for a specified period of time (for example 5 ms) DSP/BIOS will base that calculation on the number of Timer 0 interrupts you get. If you're changing the period of the interrupt behind the scenes you're going to get really strange program behavior. Brad "Simone Winkler" <simone.winkler@gmx.at> wrote in message news:41e8eccd$1@e-post.inode.at...> Hello, > > i've got a problem: > I'm programming the TI C6713 DSP together with DSP/BIOS. What I want to do > is to get a programmable timer: I send the timer value via USB to the DSP > and then I want to set the timer to this specific value. > It seems to me, that in the DSP-BIOS you can only set a fixed value for > the CLK manager (value in microseconds or directly configure the PRD > register). > So I tried to write the PRD register directly inside my source code (with > a pointer to the address of the PRD0 register). > That seems to work (I can watch the core registers and it is written > successfully), but afterwards, the value of the register is reset to the > fixed value inside the DSP-BIOS configuration. > What can I do?? > > Please help me! > > Thank you, > Simone Winkler >
Reply by ●January 15, 20052005-01-15
Hello Simone, How about adding some software timers to the timer IRQ routine. Basically create some counters that get decremented once for each timer interrupt. However if the counter is already zero - don't decremented it. And on the one to zero transition for a counter let this set a corresponding flag that other routines may look at. Clay "Simone Winkler" <simone.winkler@gmx.at> wrote in message news:41e8eccd$1@e-post.inode.at...> Hello, > > i've got a problem: > I'm programming the TI C6713 DSP together with DSP/BIOS. What I want to do > is to get a programmable timer: I send the timer value via USB to the DSP > and then I want to set the timer to this specific value. > It seems to me, that in the DSP-BIOS you can only set a fixed value for > the CLK manager (value in microseconds or directly configure the PRD > register). > So I tried to write the PRD register directly inside my source code (with > a pointer to the address of the PRD0 register). > That seems to work (I can watch the core registers and it is written > successfully), but afterwards, the value of the register is reset to the > fixed value inside the DSP-BIOS configuration. > What can I do?? > > Please help me! > > Thank you, > Simone Winkler >
Reply by ●January 16, 20052005-01-16
Hi, thank you very much for your answer.> Use Timer 1 if you need some kind of variable length timer. >I tried to - I simply opened my cdb-file and in the properties of CLK_Manager I set Timer0 to Timer1. But that doesn't help! Again, I tried to set the PRD1 register manually. It worked, but when it accessed the function that the timer was assigned to, the value of the PRD1 register was reset to the value that I initially wrote into the cdb-file. What can I do? I tried to completely delete the CLK object, but then I need a pointer to the Interrupt service routine (the function that should be accessed, when a timer interrupt occurs) which doesn't seem to be so easy. (I read about Timer handles, but I doubt if it is easier to accomplish?) Thank you! Simone
Reply by ●January 16, 20052005-01-16
Simone, I think you misunderstood what I was saying. What I was suggesting you do was to just leave Timer 0 alone so that DSP/BIOS can function properly. You should allow DSP/BIOS to use Timer 0 and then you can use Timer 1 for whatever variable-time interrupts you're trying to generate. There is a CSL section called TIMER that you could use to do this. Brad "Simone Winkler" <simone.winkler@gmx.at> wrote in message news:41ea9a12$1@e-post.inode.at...> Hi, > thank you very much for your answer. > >> Use Timer 1 if you need some kind of variable length timer. >> > > I tried to - I simply opened my cdb-file and in the properties of > CLK_Manager I set Timer0 to Timer1. But that doesn't help! Again, I tried > to set the PRD1 register manually. It worked, but when it accessed the > function that the timer was assigned to, the value of the PRD1 register > was reset to the value that I initially wrote into the cdb-file. > > What can I do? > > I tried to completely delete the CLK object, but then I need a pointer to > the Interrupt service routine (the function that should be accessed, when > a timer interrupt occurs) which doesn't seem to be so easy. (I read about > Timer handles, but I doubt if it is easier to accomplish?) > > Thank you! > > Simone > >
Reply by ●January 17, 20052005-01-17
"Simone Winkler" <simone.winkler@gmx.at> wrote in message news:41e8eccd$1@e-post.inode.at...> Hello, > > i've got a problem: > I'm programming the TI C6713 DSP together with DSP/BIOS. What I want to do > is to get a programmable timer: I send the timer value via USB to the DSP > and then I want to set the timer to this specific value. > It seems to me, that in the DSP-BIOS you can only set a fixed value forthe> CLK manager (value in microseconds or directly configure the PRDregister).> So I tried to write the PRD register directly inside my source code (witha> pointer to the address of the PRD0 register). > That seems to work (I can watch the core registers and it is written > successfully), but afterwards, the value of the register is reset to the > fixed value inside the DSP-BIOS configuration. > What can I do?? > > Please help me! > > Thank you, > Simone Winkler > >Simone, I would guess one of two things are happening. Either (a) there is a reload register that you must also change or (b) the code generated by the bios tool (perhaps in the interrupt service) is reloading the register (perhaps with a hard coded value) based on the settings from the configuration tool. With a little documentation search or code search you should be able to figure out which is happening. If its (b) you'll need to modify the ISR, create a variable to write to the register and then you can write to that variable via the USB. -Shawn
Reply by ●January 17, 20052005-01-17
Reply by ●January 17, 20052005-01-17
Shawn Steenhagen wrote: ...> Simone, > > I would guess one of two things are happening. Either (a) there is a reload > register that you must also change or (b) the code generated by the bios > tool (perhaps in the interrupt service) is reloading the register (perhaps > with a hard coded value) based on the settings from the configuration tool. > > With a little documentation search or code search you should be able to > figure out which is happening. If its (b) you'll need to modify the ISR, > create a variable to write to the register and then you can write to that > variable via the USB. > > -ShawnOUCH! Leave the system timer alone! It's so important that it has a built-in self-repair mechanism. If you're clever, you can probably defeat that and crash the system. I don't like RTOSs because it usually takes me more sweat to psych them out than to write the functions I need in ways that I understand. I'm sure they're a great boon to those not so thick-headed as I tend to be. Interlocks have their place. I remember one snowy morning right after I got my first automatic-transmission car, an old clunker. I was nearly alone in the parking lot when I went to the pharmacy for medicines for half the kids on the block. When I got back to the car, it wouldn't start: not even a click. The lights showed I had plenty of battery, so I concluded ice in the starter relay. I used a pair of pliers to jump around the relay and the car started right up ... and took off. I had left it in gear, and by going under the hood, defeated the interlock. Fortunately, on idle gas in deep snow, it didn't get away from me, and I jumped in and hit the brake. Then I put the hood down so I could see and drove home. That was about 40 years ago, and this is my first admission. Jerry -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������
Reply by ●January 17, 20052005-01-17
"Jerry Avins" <jya@ieee.org> wrote in message news:352qkrF4gh5nvU1@individual.net...> Shawn Steenhagen wrote: > > Interlocks have their place. I remember one snowy morning right after I > got my first automatic-transmission car, an old clunker. I was nearly > alone in the parking lot when I went to the pharmacy for medicines for > half the kids on the block. When I got back to the car, it wouldn't > start: not even a click. The lights showed I had plenty of battery, so I > concluded ice in the starter relay. I used a pair of pliers to jump > around the relay and the car started right up ... and took off. I had > left it in gear, and by going under the hood, defeated the interlock. > > Fortunately, on idle gas in deep snow, it didn't get away from me, and I > jumped in and hit the brake. Then I put the hood down so I could see and > drove home. That was about 40 years ago, and this is my first admission.Feels good to finally come clean, doesn't it? :-) This same interlock causes me problems in my automatic transmission car. It works intermittently such that sometimes the car won't start even when it is in Park. Usually, jiggling the shift lever fixes the problem. But lately it seems to be happening more frequently, moving from a mere occasional annoyance to something I will probably want to get fixed. I've also tried starting an automatic not in park and spent some time scratching my head trying to figure out why nothing was happening. But fortunately I'm not handy enough to try "fixing" the problem like Jerry did, so I eventually figured it out. :-)
Reply by ●January 18, 20052005-01-18
Jerry Avins wrote: The lights showed I had plenty of battery, so I> concluded ice in the starter relay. I used a pair of pliers to jump > around the relay and the car started right up ... and took off. I had > left it in gear, and by going under the hood, defeated the interlock. >And that would be why the car wouldn't start..No? -jim> Fortunately, on idle gas in deep snow, it didn't get away from me, and I > jumped in and hit the brake. Then I put the hood down so I could see and > drove home. That was about 40 years ago, and this is my first admission. > > Jerry > -- > Engineering is the art of making what you want from things you can get. > �����������������������������������������������������������������������----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==---- http://www.newsfeeds.com The #1 Newsgroup Service in the World! >100,000 Newsgroups ---= East/West-Coast Server Farms - Total Privacy via Encryption =---