I am trying to get a component specific interrupt. While I have not added the interrupt manager. I wanted to know if I am in the right direction, but I am not able to get an interrupt on that component. To explain this better below are the screenshots.
I have done the pin configuration.
To get the interrupt on this particular compoent, I modified events
Then install interrupt for that particular pin input.
After I hit the generate code, I am able to see the events with a component specific IRQ
But the interrupt is not added in startup_MK64F12.s file where all the interrupts are located. so when the event is generated it falls to Default ISR.
Should we modify the MK64F12.h for the interrupt and then define it in the startup_MK64F12.h to get the interrupt? Is this the right way of doing or is there some setup through which those two files are modified for the installed interrupt through component settings.
Thanks,
Kewal
Solved! Go to Solution.
Hi David,
I sort of ironed it out,...
Its because of the __ram_vector_table__ symbol which was not defined. so it was the offset and size were 0 so I was getting that error.
I did not show the entire file so that information was missing above.
Thanks anyways,
Kewal
Also when i install the interrupt on that particular component, I am getting an error to check if the vector is present in RAM
on debug, I am landing at,..
So my ICF configuration looks like this where ofcourse, it says vector table to be copied to RAM, Am i missing something else???
Hi Kewai,
It seems that you are making all the correct steps to get a GPIO interrupt.
Maybe you need to clean and rebuild?
Or maybe project is somehow corrupted so a new project might fix things.
Have you done updates?
Attached is my project that I tested using KDS_3.0.0 and KSDK_1.3.0 fo frdm-k64f Freedom board.
I setup the SW2 GPIO (PTC6) as my input gpio interrupt. I had to enable pull-up for the gpio as the switch doesn't have a pull-up populated. So my interrupt is set for negative edge.
The project is using SRAM for the vector table.
In Cpu.c the gpio isr is being added to the SRAM vector table with following call:
OSA_InstallIntHandler(PORTC_IRQn, gpio1_PORTC_IRQHandler);
I can set a breakpoint in the Event.c handler:
void gpio1_PORTC_IRQHandler(void)
{
/* Clear interrupt flag.*/
PORT_HAL_ClearPortIntFlag(PORTC_BASE_PTR);
/* Write your code here ... */
}
When i press SW2 I get the interrupt.
Hope this helps.
Regards,
David
David,
To give more details, I am using safeRTOS and the OSAL has been adapted for that, also to inform I am using IAR EWARM 7.4
I have tried all other stuffs,I am still hoping that something is missing because of which I am not able to solve this vector ram issue. if you have not able to see my previous reply as it requires to be approved by moderator.
ICF file looks like left hand side of the diff file, which is edited accordingly for safeRTOS. the processor expert ICF is the right hand side file in the diff attached.
Hi Kewal,
Guess you cannot post your project then. Correct?
Here is a picture from a KSDK_1.3 IAR project that has define's added to the linker section. Do you have them too?
The __ram_vector_table__=1 is used by the linker to help setup VTOR to be in SRAM.
What is your __VECTOR_RAM defined to in your linker file? It should equate to 0x1fff0000 .
The ProcessorExpert.ld has:
__VECTOR_RAM = ORIGIN(m_interrupts_ram);
Regards,
David
Hi David,
I sort of ironed it out,...
Its because of the __ram_vector_table__ symbol which was not defined. so it was the offset and size were 0 so I was getting that error.
I did not show the entire file so that information was missing above.
Thanks anyways,
Kewal
Since I am using the safeRTOS, we have actually included the safeRTOS ICF file which is as shown on the right side of the diff of both the safeRTOS icf and generated ICF