Controller Used : MPC5744 - 144pin
Purpose To handle exception and interrupt in my source code(C)
Issue : The ISR function is not getting called
Configurations done As follows
Linker File (.lcf)
INTTABLE : org = 0x01001000, len = 0x00002000
GROUP :
{.text_vle (TEXT){*(.text.ivors)*(.text.default_irq_handlers)}} > INTTABLE
Start-up scripts
e_li r0, 0 ; Clear r0
e_lis r0, 0x0100 ; holds base address of the L2SRAM 64-bit word aligned
e_ori r0, r0, 0x1000 ; r += 0x1000 -> 0x01001000
mtspr 63, r0 ; Move to IVPR Special-Purpose register.
.section .text.ivors, "x"
.globl IVORS
IVORS:
.align 12 #/* Exception IVOR table 12-bit aligned */
IVOR0: e_b Os_IRQ_dispatch #/* Offset 0x00 Critical input */
.align 4
IVOR1: e_b Os_IRQ_dispatch #/* Offset 0x10 Machine check */
.align 4
IVOR2: e_b Os_IRQ_dispatch #/* Offset 0x20 Data storage */
.align 4
IVOR3: e_b Os_IRQ_dispatch #/* Offset 0x30 Instruction storage */
.align 4
IVOR4: e_b Os_IRQ_dispatch #/* Offset 0x40 External input (INTC) */
Till IVOR15 Just for testing (One function called )
.section .text.default_irq_handlers, "x"
.weak _IVOR0, _IVOR1, _IVOR2, _IVOR3, _IVOR4, _IVOR5
.weak _IVOR6, _IVOR7, _IVOR8, _IVOR9, _IVOR10, _IVOR11
.weak _IVOR12, _IVOR13, _IVOR14, _IVOR15
.weak _unhandled_exception
The function Os_IRQ_dispatch is not getting called at all
I have enabled SPI , PTI intirupts still it is not getting called
Alignment was the issue in the start up script
not it is ok
Thank you for replying
Yes SPI and PIT trigger IVOR4 but for me it is not triggering
so could you suggest me how I can solve this issue
Just for your reference
- I have create the vector table and enable both SPI and PIT interrupt
- I am using autosar MCAL so registers were already configured