Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
pistons7
Level 4
Level 4
50 questions asked 10 likes given 100 sign-ins

void __interrupt(__INTNO(1)) timer0( void )
{
if ( count == CLKPERSEC )
{
SFRBANK0
SCRINTEXCHG = data; /* Transfer LED data */
SFRBANK1
NMICON = 0x80; /* SRC_SCR interrupt. SCRINTTC=1 */

if ( data == 0x40 )
{
data = 2;
}
else
{
data <<= 1;
}

count = 0;
}
else
{
count++;
}
}

Delete the control part of the above function,
void __interrupt(__INTNO(1)) timer0( void )
{
}

Then the main function will not be called during debugging.

The main function is as follows.

I also checked the registers on the debugger, but the timer was not set.

void main( void )
{
TMOD = 0x01; /* Set 16-bit timer mode */
IEN0_ET0 = 1; /* Enable timer 0 interrupts */
TCON_TR0 = 1; /* Start timer 0 running */
IEN0_EA = 1; /* Global interrupt enable */
PCON = 1; /* IDLE mode, timers continue */
}

The build tool is Tasking and the debug tool is Lauterbach.
Since Trace32 allocates elf mapping in memory, it may be a problem with the Build tool
I'm thinking, is this a bug in the Build tool?
Or do I need to configure something?

Even if you ask Tasking, they don't know.

0 Likes
3 Replies
Yuva
Moderator
Moderator
Moderator
250 replies posted 250 sign-ins 100 solutions authored

Hello,

Generally for starting the SCR, tricore copies the SCR code to XRAM and starts SCR using PMS_PMSWCR4 register. Is this being done?

Thanks.

0 Likes
pistons7
Level 4
Level 4
50 questions asked 10 likes given 100 sign-ins

Of course, the setting in PMSWCR4 is done.

0 Likes
Yuva
Moderator
Moderator
Moderator
250 replies posted 250 sign-ins 100 solutions authored

Hello,

With this the SCR should be started, is the behavior the same without debugger as well?

Thanks.

0 Likes