|
Re: ExternalInterrupt Problem: msg#00718hardware.microcontrollers.tini
Johnson, Bill wrote: Is the whole ExternalInterrupt class broken for 1.11 on the 400? You are correct, you will not be able to use the ExternalInterrupt class on the 400 and 1.11 firmware. Edge triggering is the default. Clearing IT1 in TCON for level triggering The CPU is vectoring to the interrupt handler after every instruction and slowing the CPU. I have buttons on all 5 interrupts, so something special is needed Yes, you can do this. But, System_ThreadResume cannot be called from the ISRs. So, how do you The best methodology is: 1. Install the interrupt handler and have it set a shared memory location when an interrupt occurs. Clear the interrupt flag and reti. 2. Register an IO_Poll routine that can wake a thread. If an interrupt occurs and sets the shared memory location, the poll routine will clear the shared memory location and if a thread is sleeping, will wake it. 3. Have a native routine that checks the shared memory location, and if it is not set put the thread to sleep. The above procedure does not have any race condictions, and is how some interrupt handlers work with the TINI firmware. You cannot resume a thread from an interrupt because the state of the Java runtime can not be guaranteed to be consistent. The JVM could be in the middle of a thread swap, native method call, or even be the wrong JVM if you have multiple processes running (Each process is a unique JVM instance). -Bryan -- -- Bryan Armstrong bryan.armstrong-6tN4nzCoH/hBDgjK7y7TUQ@xxxxxxxxxxxxxxxx _______________________________________________ TINI mailing list TINI-6tN4nzCoH/hBDgjK7y7TUQ@xxxxxxxxxxxxxxxx To UNSUBSCRIBE, edit your profile, or see list archives: http://lists.dalsemi.com/mailman/listinfo/tini |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: No Subject: 00718, Robert Muchsel |
|---|---|
| Next by Date: | Tiniconvert issue -trying to create a .tini getting class not found error: 00718, Peter Bauer |
| Previous by Thread: | ExternalInterrupt Problemi: 00718, Johnson, Bill |
| Next by Thread: | Running Tini with out hardware: 00718, Aaron Minor |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |