Since this is my first post I want to start with a little introduction. My name is Felix Martin and I am working as a research student for Timing Architects in Germany. My tasks are C++ development and maintaining our trace hardware (iC5000/iC6000). In order to test the trace hardware I am using Erika Enterprise running on a Infineon Aurix (TriCore) controller. Thank you very much for providing Erika Operating System and for the good documentation, which makes it nice to work with it.
I have two minor questions. (I am using the RT-Druid Release from May 30th running on windows 7 64-bit)
1. WinIDEA has problems to import the *.orti file created by RT-Druid. This is because of a trailing comma in the TASK section. See the following code listing.
Code: Select all
TASK {
ENUM "int" [
"Not Running (0)" = 0,
"0x1" = 0x1,
"0x2" = 0x2,
"0x4" = 0x4
] PRIORITY , "Actual Prio";
ENUM "unsigned char" [
"RUNNING"=0,
"WAITING"=1,
"READY"=2,
"SUSPENDED"=3
] STATE, "Task State";
ENUM "unsigned int" [
"Stack0" : Stack0 = 0,
"Stack1" : Stack1 = 1,
"Stack2" : Stack2 = 2,
"Stack3" : Stack3 = 3, // Trailing comma should not be here according to orti spec?
] STACK, "Task Stack";
CTYPE "int" CURRENTACTIVATIONS, "Current activations";
}, "Tasks";
2. My second problem is that I don't know how to access the Counter Control Register of the TriCore. What I want to do is to write into CCTRL Counter Control Register in order to start the CPU Clock Counter as well as the Instruction Counter and then read the counts from the corresponding registers. The following snippet shows what I want to do.
Code: Select all
CCTRL = 0x02; // set Count Enable bit
myTestFunction(); // execute function about which I want to know how many instruction it taks
EE_UINT32 instructionCount = ICNT; // read current value from instruction count register
Notes:
* I am using Hightec Compiler 4.6.4.0
* Documentation about the registers can be found on page 179/225 of tc16_archictecture_vol1.pdf
3. Why can cycletime not be set to zero? [question add by edit]
I do not understand why cycletime is not allowed to have a value of zero. Let's assume I want to start a task a certain period after start up, wouldn't it be reasonable to set alarmtime to the desired period and cycletime to zero in order to get the demanded result?
So those are my questions for now. Thanks for your attention.
Greets Felix