Re: external device strecth
Bryan Armstrong <bryan.armstrong-6tN4nzCoH/[email protected]>
| Newsgroups | gmane.comp.hardware.microcontrollers.tini |
|---|---|
| Message-ID | <[email protected]> |
Eduardo Freire wrote: > We designed a TINI board, and added an external UART to it. To be able to use it, we had > to change CKCON to enlarge the memory access cycles (under ~CE3), but doing this the > overall system performance was degraded. > An ISR was chained to be able to treat other connected devices interrupts into TINI (a > communications co-processor). > > Is it possible to change the external UART stretch cycles only, not the global CKCON ? > If not possible, in my understanding it could be done inserting an ISR to be run before > the external UART ISR, responsible for identifying the external UART interrupt request, > changing CKCON, executing external UART ISR, and restoring the normal CKCON ! Can it be > done ? Has anybody tried this before ? How ? You could read the vector associated with the external interrupt and store it to be used in your ISR. Then, when an external interrupt occurs, you can change the stretch cycles, "push" the original vector on the stack and "ret" to it. When the original ISR completes, it will perform a "reti" back to your new ISR which can restore the state of the stretch cycles and then "ret" back to the main code path. -- -- Bryan Armstrong bryan.armstrong-6tN4nzCoH/[email protected] _______________________________________________ TINI mailing list TINI-6tN4nzCoH/[email protected] To UNSUBSCRIBE, edit your profile, or see list archives: http://lists.dalsemi.com/mailman/listinfo/tini