I want to remap interrupts, so that the interrupts that I need at the highest priority are at the highest priority. I need to change the default VIM mapping.
There are also HalCoGen issues.
The HalCoGen GUI implies that users can change mappings by editing the VIM Channel pages. Hover your mouse over the CHANMAP text box and the tool-tip implies as much, but that text box is read only.
I do see the help documentation function, vimChannelMap().
For instance, here is one example of the project requirement. There is a list remapping a slew of interrupts, but this one is as good as any.
1.8.4. Since the default interrupt priorities of the RM48L952 are not the same as we need, we will have to remap the interrupt requests to the desired priority, by writing the interrupt request number to the Interrupt Control Registers (CHANCTRL[0:23] located at 0xFFFFFE80h through 0xFFFFFEDC). These register remap the interrupt requests to interrupt channels, which then cause the address of the appropriate ISR to be accessed from the Interrupt Vector Table RAM.
1.8.4.1. Interrupt channels 0 and 1 are for Fast Interrupts (non-maskable), and are not used. So we start with channel 2. This needs to be mapped to the GPIOA interrupts (BUSOK going low and ACOK going low). BUSOK going low is the highest priority interrupt, since you will have less time before power is lost, and it will be mapped to GPIO interrupt A, which is Interrupt Request 9. So write 0x09 to 0xFFFFFE81 which corresponds to interrupt channel 2.
If my understanding is correct, one way would be to use the vimChannelMap(). Is there a way to use the GUI?
I presume that if I change rtiCompare0Interrupt at 0x0000000C:02 to rtiInterruptBusok on the VIM RAM tab, the entries in this tab are priority based. What goes to that box, 2 or 0x0000000C in this example, gets determined by the channel mapping, so after a remap the rtiCompare0Interrupt would then be somewhere else.
HalCoGen Bugs:
As long as I talking about this page, here are bugs:
1. There is no ISR tag. The tab is VIM RAM, so stating a tab is dumb, just say the boxes above
2. Either contact Oxford and Webster to add the word remane to the dictionary or change the word to rename. People would have to learn a new word. Maybe okay. People are bored anyways.
3. Uses have to connect the interrupt, not just rename and save. Users have to generate the code too.
In summary,
I see Interrupt 23 as GIO Low. I do not see GIO A (or be for that matter). Would I be mapping 23 to 2?
The code version I presume would be:
vimChannelMap(2, 23, &rtiInterruptBusok);
(or are 2 and 23 transposed in the above, not sure the order)