PRINT in interrrupt

Questions about the BASICtools and MakeItC
Post Reply
YahooArchive
Posts: 1462
Joined: Fri Oct 19, 2012 5:11 am

PRINT in interrrupt

Post by YahooArchive »

I have downloaded the latest version of BasicTools but when using interrupts if
gives me the following error : "Prefetch Abort 23440004". After digging around,
I found out that the error occurs after the print statement.

Below is the interrupt I am using which works fine via the web interface but
causes the above error on BasicTools.
I am also using the latest firmware for Armweb (7.36)

**** code snippet begin ****
every20msec:
print "inside interrupt active"
return

main:
k=0

ON TIMER 20 every20msec
sleep = (5000)
for i = 1 to 1000
j=j+1
print j
next

print "K = ", k

**** code snippet end ****

*** output begin ****

Executing...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15inside interrupt active
Prefetch Abort 23440004

*** output end ***

Is there any place where those errors are documented? Could not find anything in
the documentation under the "troubleshooting" section



YahooArchive
Posts: 1462
Joined: Fri Oct 19, 2012 5:11 am

Re: PRINT in interrrupt

Post by YahooArchive »

> every20msec:
> print "inside interrupt active"
> return

Other than maybe a quick check to see that interrupts are happening, PRINT
statements should not be used inside an interrupt, especially if they are being
used in the main program.

PRINT builds strings which are not saved as part of the interrupt service call.

As for Prefetch Aborts, they generally indicate the code is running wild,
sometimes the address is meaningful, sometimes not.

Post Reply