Page 1 of 1

EINT2 interrupt hangs

Posted: Sat Nov 02, 2013 11:32 pm
by wendell
I just bought a new ARMmite from Coridium. The new ARMmite runs a "Hello World" test just fine.

It hangs when EINT2 (IO15) is brought low the first time. The code simply ceases to execute. Here is the test code.

--------------------------------------------------------------------------
'Interrupt Test Code

SUB HandleInterrupt

PRINT "Processed interrupt."

ENDSUB

MAIN:

ON EINT2 FALL HandleInterrupt

' The main run loop is endless
WHILE 1

PRINT "In loop."

LOOP ' End of run loop

END
------------------------------------------------------------

If IO15 is high when I hit RUN, the code executes the main loop, printing out "In loop." over and over until IO15 goes low for the first time. At that moment, execution ceases until I hit STOP and then RUN again.

If IO15 is low when I hit RUN, the code exits immediately without printing anything.

The red IO15 light on the processor board glows red when IO15 is low and goes off as expected as IO15 goes high.

IO15 has an intermediate level when the interrupt driving circuit is powered off and the IO15 light glows dimly.

When I removed the new ARMmite board and replaced it with the old board, the code shows the loop message and occasionally the interrupt message as expected. For example,

In loop.
In loop.
In loop.
In loop.
In loop.
IProcessed interrupt.
n loop.
In loop.
In loop.
In loop.
In loop.

The only change to the ARMmite boards I have made since unpacking them is to solder a 34-pin header into the IO pin holes.

The signal applied to IO15 is about 4.0 v when it is high and about 0,3 v when it's low.

Any ideas? Seems to me the new ARMmite is just not handling interrupts correctly.

Re: EINT2 interrupt hangs

Posted: Sun Nov 03, 2013 12:43 am
by basicchip
When we made the switch to floating point support on the ARMmite, we had to make room by giving up the built in interrupt routines.

So if you need to run interrupts, and don't need floating point, you can change the firmware back to the integer version.

The firmware is attached below.
mite0743.hex
(32.6 KiB) Downloaded 1364 times
You update firmware from a DOS command line with the loadLPC.exe program, which should be installed in the Program Files directory. If not there it is in this message of the forum

http://www.coridiumcorp.com/forum/viewt ... dlpc#p2227

Re: EINT2 interrupt hangs

Posted: Sun Nov 03, 2013 12:32 pm
by wendell
Are you saying that the FP version has no way to handle interrupts or that they simply have to be handled some new way?

The inclusion of documentation about interrupts in http://www.coridium.us/ARMhelp/index.ht ... ePins.html suggests that the ARM7 devices still do interrupts.

Re: EINT2 interrupt hangs

Posted: Sun Nov 03, 2013 2:55 pm
by basicchip
The ARM7 with floating point still do interrupts. Look at the example program TIMER1.bas or EINT0.bas which run on the ARMmite.

The builtin firmware interrupts ON TIMER/EINTx are no longer supported, being replaced by direct programming of the VIC and use the INTERRUPT SUB construct.

Re: EINT2 interrupt hangs

Posted: Sun Nov 03, 2013 8:28 pm
by wendell
Loading the 0743 firmware did indeed fix my problem.

Are you no longer using the "ARMmite" name? The product list calls it simply "ARM7 microcontroller."

If for some reason I wanted to restore the microprocessor to its original firmware, where would I find that file?

BTW, would using C instead of BASIC avoid this problem?

Many thanks for your help.

Re: EINT2 interrupt hangs

Posted: Mon Nov 04, 2013 12:08 pm
by wendell
One more question. I find that the newer version of BASICtools I downloaded recently gives errors now that I've loaded the old 0743 firmware. I have lost my setupBASIC.exe installer for my older BASICtools version. Where can I find basicSETUP.exe for a version of BASICtools that is consistent with the 0743 firmware?

Thanks again.

Re: EINT2 interrupt hangs

Posted: Mon Nov 04, 2013 1:11 pm
by basicchip
What errors are you getting? The intention is to support the old firmware with the new compiler. The new compiler does flag code now that was probably misinterpreted.

There are differences with respect to UART access and bit banged serial. The new firmware supports more than 2 UARTs, so we made TXD(x), RXD(x) and BAUD(x) reserved words in the compiler and changed the bit banged versions to bbRXD(x), bbBAUD(x) and bbTXD(x,ch)

Re: EINT2 interrupt hangs

Posted: Mon Nov 04, 2013 3:09 pm
by wendell
The older version of BASICtools I have is identified as "ARMbasic[7.43g] on the PC" and "BASICtools[5.2]". It runs my SimpleTest.bas correctly.

I am using my newest ARMmite board with the 7.43 firmware installed.

My newer version of BASICtools identifies itself as "ARMbasic[8.27d] on the PC" and "BASICtools[5.19]". With this version, I click on LOAD, and the message
"Analyzing C:/WW/Java/Java3D/Chaotron/Docs/ChaotronKit/SimpleTest.bas"
appears.
Then a popup window labeled "Libraries" appears with the message "Library directory does not exist."
I have seen other errors, but they may have been due to my mistakes, and I can't reproduce them now since I can't go beyond the library error.

Re: EINT2 interrupt hangs

Posted: Mon Nov 04, 2013 3:35 pm
by basicchip
You can now set the library directory from BASICtools

Under the Help menu -> Libraries -> the very top entry (which is where it is looking now, but can't find it)

In older versions of BASICtools it was in Program Files (x86)/Coridium/BASIClib

It has been moved out of that directory so that it can be edited. A copy of that is now placed in My Documents/Coridium/BASIClib when you install the new tools

Re: EINT2 interrupt hangs

Posted: Tue Nov 05, 2013 8:24 pm
by wendell
Okay, SimpleTest.bas now works using my recent version of BASICtools.

I would never have thought to look at the "Help" menu for setting a library. That sort of configuration option seems to me to belong in "Options" or "Tools."

I hope this issue is closed for now. When I get some time, I plan to switch to the interrupt handling methods shown in the EINT0.bas example so I don't have to use an old library.