| View previous topic :: View next topic |
| Author |
Message |
kasikeeper
Joined: 29 Nov 2007 Posts: 36
|
Posted: Mon Feb 25, 2008 12:29 am Post subject: Timer and Interrupts |
|
|
Hi,
I wat to setup a simple timer interrupt which displays a text message e.g. everyday at 9am. I am really at the beginning of my code but I am not sure what route to choose now. I guess what is needed is some kind of an interrupt to not loop until time=9am. Is there any tutorial out there which explains how to set up timer interrupts?
Also, would a separate prx filebe required here? Can prx programs be considered as separate threads at all or should that be done inside my main internally?
I would really like to understand prx and threads on PSP better but the SDK doxygen doc is too hard for me to understand. Does anyone know of good tutorials?
Best regards,
Kai |
|
| Back to top |
|
 |
kasikeeper
Joined: 29 Nov 2007 Posts: 36
|
Posted: Thu Feb 28, 2008 5:31 am Post subject: |
|
|
Hello,
noone here to give some advice on timer interrupts on the PSP??
Kai |
|
| Back to top |
|
 |
J.F.
Joined: 22 Feb 2004 Posts: 2906
|
Posted: Thu Feb 28, 2008 6:20 am Post subject: |
|
|
| Did you at least look at the sample in the sdk? I know that one of the tutorial sites a user here maintains has a section on timers as well. Do a little research yourself and maybe others will be more inclined to help. You ARE supposed to be a developer, after all. |
|
| Back to top |
|
 |
adrahil
Joined: 16 Mar 2006 Posts: 277
|
Posted: Sun Mar 09, 2008 7:03 pm Post subject: |
|
|
| You might be better off using the RTC alarm handlers here to wake up the PSP at a given time. |
|
| Back to top |
|
 |
kasikeeper
Joined: 29 Nov 2007 Posts: 36
|
Posted: Thu Mar 13, 2008 6:11 am Post subject: |
|
|
Adrahil, this is exactly what I am looking for. I am using the VTimers successfully but when the PSP goes to sleep, the timers go to sleep as well and there is no chance to wake the PSP up from a VTimer callback.
I checked the psprtc.h header file but could not find any rtc timer handler functionality. Ca you give me a clue where in the sdk these functions sit? |
|
| Back to top |
|
 |
adrahil
Joined: 16 Mar 2006 Posts: 277
|
|
| Back to top |
|
 |
kasikeeper
Joined: 29 Nov 2007 Posts: 36
|
Posted: Wed Mar 19, 2008 6:45 am Post subject: |
|
|
Ok. I had a look the the timebaby source code and I copied the modified psprtc.h header into my sdk directory (by the way,when is this new header file going to be part of the standard sdk distribution?)
When compiling my code I get
[Linker error] undefined reference to `sceRtcRegisterCallback'
[Linker error] undefined reference to `sceRtcSetAlarmTick'
which are two of the functions that are new in the psprtc.h so I assumed they sit in the precompiled .s files provided with the sources. I included them in my makefile and now I get the follwoing compile errors:
unrecognized opcode `dummy'
junk at end of line, first unrecognized character is `/'
[sceRtc_driver.o] Error 1
How can these functions`sceRtcRegisterCallback' and `sceRtcSetAlarmTick' be made accessable more easily? Or how doI get rid of the assembler errors in a precompiled .s file? |
|
| Back to top |
|
 |
|