Page 1 of 1

Debug Trap

Posted: Mon Aug 22, 2016 3:21 pm
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.

Re: Debug Trap

Posted: Tue Aug 23, 2016 2:54 pm
by SeeCwriter
Never mind. I had a buffer overrun.