Previously, Brad Stocking wrote in qdn.public.qnx4.photon:
- don’t call any ISR non-safety routines from interrupt handler…
I don’t use printf() or any other non-safe routines that I know of…
I simple put data into the mapped memory with a pointer
( *(win_address+(Address/2)) = data; )
- win_address is the base address and address is the offset
- pass correct ds value in qnx_hint_attach() and your handler is a far
I pass a ds value of a variable I don’t even use in the handler… that
could be the problem. I’m not sure what ds to use.
Can you try passing the DS of win_address? You need to pass the DS of
the variables that you are going to access from within the interrupt
handler. You might want to put win_address and Address into a
structure, allocate an instance of the structure, and pass the DS of
the allocated structure instance.
I think, in reality, that you only have two DS values in a typical
program - one for initialized static data, and one for heap, though
there could be a third for uninitialized static data. Somebody from
the compiler group will probably correct me on this.