Debug Trap

Discussion to talk about software related topics only.
Post Reply
SeeCwriter
Posts: 630
Joined: Mon May 12, 2008 10:55 am

Debug Trap

Post by SeeCwriter »

When function RTCSetSystemFromRTCTime() returns I get a "Debug interrupt (12)" trap. All the functions return with good status. Why a "debug trap", I don't have any debug enabled?

Code: Select all

int err = -1;
struct tm rtc;

FillTime( rtc );

iprintf("Tm Struct:\r\n");
iprintf("  Year:   %d\r\n", rtc.tm_year );  // 116
iprintf("  Month:  %d\r\n", rtc.tm_mon );   // 7
iprintf("  DMonth: %d\r\n", rtc.tm_mday );  // 22
iprintf("  Hours:  %d\r\n", rtc.tm_hour );  // 14
iprintf("  Min:    %d\r\n", rtc.tm_min );   // 41
iprintf("  Sec:    %d\r\n", rtc.tm_sec );   // 0

if ( RTCSetTime( rtc ) == 0 ) {			// Set off-board clock.
	iprintf("Set local clock\r\n");
	err = RTCSetSystemFromRTCTime();	// Set CPU clock from off-board clock.
}
iprintf("Done err = %d\r\n", err ); // Output: Done err = 0

Using v2.8.1, with a Nano54415.
SeeCwriter
Posts: 630
Joined: Mon May 12, 2008 10:55 am

Re: Debug Trap

Post by SeeCwriter »

Never mind. I had a buffer overrun.
Post Reply