Mpc5744p- ISR and exception issue

显示  仅  | 搜索替代 

Mpc5744p- ISR and exception issue

1,204 次查看
Contributor II

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


{.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


.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

0 项奖励
3 回复数

702 次查看
Contributor II

Alignment was the issue in the start up script

not it is ok

0 项奖励

702 次查看
Contributor II

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

0 项奖励

702 次查看
Contributor II

SPI , PIT only Trigger IVOR4 interrupt