Interrupts and Split Memory

"Jonathan Sharret" <j.sharret-vt2K7lilQm9Wk0Htik3J/[email protected]>
Newsgroups gmane.comp.hardware.microcontrollers.tini
Message-ID <[email protected]>
Hi,

Continuing my progress from previous posts.

I have managed to split the memory into code memory and data memory and
in so doing can program my DSP.

The DSP sends me interrupts and I need to then clear the interrupt and
read certain memory locations in the DSP.  I have a couple of questions
about this:

1)  My split memory routine disables interrupts and after
reading/writing enables them.  Do I also need to protect this code
section using "TINIOS_ENTER_CRITICAL_SECTION" and
"TINIOS_EXIT_CRITICAL_SECTION" when done?

2)  Is it safe to use these routines from within my java Interrupt Event
Listener:
"public void externalInterruptEvent(ExternalInterruptEvent e) { //
native method call here }".  I'm a little confused by what you can and
can't do from within this method.  Are interrupts already disabled in
this method?  Is it safe to disable interrupts and split the memory from
within this method?

3)  I've also been considering handling interrupts entirely in native
code.  From what I've read, it goes something like this:
	a)  Register the ISR code using "System_InstallInterrupt" and
register a process destroy so clean up.  Is 0x13 used as the interrupt
offset?
	b)  The ISR code would read certain DSP memory and put them into
shared memory space (probably an indirect)
	c)  A poll routine would check the indirect and if something was
in it wake up a thread
	d)  The woken up thread would call a native method to read and
return the value in the indirect then clear it
	e)  The native method puts the thread back to sleep
	f)  Go to b

A few questions on this:
	1)  Can I split memory in the ISR?  If so, what protections do I
use?  Disable interrupts?  Enter critical section?
	2)  If I'm working in a multithreaded environment how do I
control from the native code which thread is put to sleep and woken up?
	3)  Does the native code need to put the thread back to sleep?
Or can the thread be in a loop that makes it sleep right after waking up
and reading the value?


Thanks,
Jonathan Sharret

TELEGRID Technologies, Inc.
Email: j.sharret-vt2K7lilQm9Wk0Htik3J/[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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.