Still trying to figure it out. I'm writing an application that uses the USB controller (device mode) on DM365 (without any OS). Trying to get interrupts going. Could someone please help with the following questions (unfortunately in case of DM365 the documentation doesn't live up to TI standards that I was used to).
1. On the USB controller level: what is the supposed use of the INTVECTR register? The only thing mentioned in the document (sprufh9a, p.94) is "Recycles the Interrupt Vector input to be read by the CPU". Could someone please explain what's that supposed to mean? An example might help a lot.
2. On the ARM interrupt controller (AINTC) level: what exactly needs to be done so that device interrupts (in my case the USB controller's ) cause ARM interrupts to occur? I can see the correct bit reset to 0 in the IRQ0 status register of the AINTC, but the code is not interrupted. Some (but not necessarily all) issues requiring clarification:
2a) What setting of CPSR register is required to get interrupts going AND still be able to use the emulator? This register is manipulated in the .gel file, but the description (sprufg5a, p.19) is inadequate to figure out which setting to use in which circumstances. I've seen some vague references to this register on the web, but not in the DM365 documents that I looked at.
2b) How to set up and handle ARM's exception vectors (sprufg5a, p.20). Is it necessary to be able to use interrupts?
2c) How to set up and handle AINTC's vector table? Is it necessary? What are the alternatives? One of the DaVinci Linux driver files has a following comment: "we don't use the hardware vector table, just its entry addresses". Could someone please elaborate on that?
It would probably take less than half a page of code to give a complete example of doing what needs to be done to get interrupt working. Unfortunately searching the LSP for a solution is not very productive since a large part of the LSP code doesn't even apply to the DM365, or DaVinci, or any TI product for that matter.
Any help will be greately appreciated!