MPC5748G stuck in IVOR1_Handler

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

MPC5748G stuck in IVOR1_Handler

跳至解决方案
1,496 次查看
w0wy
Contributor II

Hello,

I've just started out using MPC5748G and I've run into a problem.

I don't have enough knowledge in this field in order to know how to solve it.

I've found this thread : https://community.nxp.com/t5/S32-Design-Studio/FreeRTOS-Code-stuck-into-IVOR-1-handler/m-p/849266 but it's not the case here. I am initializing the clock in main.

 

I'm having these lines of code in which I try to check the MVR:

 

 

 

#define MPC5748G_MVR_VALUE 0xA568U
#define MPC5748G_FR_CC_ADDRESS 0xffe50000U

#define READ_FR_REGISTER16(offset) (*((volatile uint16_t *)MPC5748G_FR_CC_ADDRESS + (uint16_t)offset))

if (READ_FR_REGISTER16(FR_MVR_OFFSET) != MPC5748G_MVR_VALUE)
{
    DBG_PRINT("Invalid MVR, wrong hardware?");
    return FAILED;
}

 

 

 

 

Now, when the if statement is reached, the session just hangs. I've used the debugger and stepped into and it gets first to interrupt_vectors.S and then to core0_intc_sw_handlers.S and gets stuck at "IVOR1_Handler" then "prolog_GPRs", at line with "se_blrl".

 

 

 

;# Store/Restore common GPRs (GPR3-GPR12 stack offset 0x24-0x48)
;#     prolog_GPRs: Store GPRs
;#     epilog_GPRs: Restore GPRs
prolog_GPRs:
    se_stw   r3,  0x24(r1)            # Store GPR3
    se_stw   r4,  0x28(r1)            # Store GPR4
    se_stw   r5,  0x2C(r1)            # Store GPR5
    se_stw   r6,  0x30(r1)            # Store GPR6
    se_stw   r7,  0x34(r1)            # Store GPR7
    e_stw    r8,  0x38(r1)            # Store GPR8
    e_stw    r9,  0x3C(r1)            # Store GPR9
    e_stw    r10, 0x40(r1)            # Store GPR10
    e_stw    r11, 0x44(r1)            # Store GPR11
    e_stw    r12, 0x48(r1)            # Store GPR12
    se_blrl

 

 

 

I'm using FreeRTOS and the check for the MVR is done in a separate task - that task remains hanged.

 

Can anybody please help me with this ? I want to mention that I am not very experienced in asm or embedded dev.

Can this be from incorrect pin configuration ? Or is it other problem ?

 

Thanks

 

 

标记 (1)
0 项奖励
回复
1 解答
1,445 次查看
w0wy
Contributor II

Hello,

Thank you for the response and help.

It seems I have managed somehow to get past that problem.

What I'm actually trying to do, is port an old project implemented in older version of S32DS (2017.R1) to newer version of S32DS (V2.1).

I think that in my case, there was a configuration problem:

First of all, the FreeRTOSConfig.h (there were differences - one of them was the configUSE_TIMERS, which should be 0 in my case but it was set to 1).

And second (probably the actual issue) was that somehow, I forgot to enable the clocks (from the clock component).

Used proper FreeRTOSConfig.h and enabled clocks from clock component in Processor Expert and it passes that part of code.

在原帖中查看解决方案

0 项奖励
回复
2 回复数
1,452 次查看
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi,

based on your description, I can see two possible root causes.

If FlexRay MVR register can't be read then the module is either not enabled in Mode Entry module or the access is forbidden by SMPU module. In both cases, it leads to IVOR1 exception. To confirm this - which command/instruction caused it exactly? Or if you check the content of MVR directly in your debugger, can you read the value?

Regards,

Lukas

0 项奖励
回复
1,446 次查看
w0wy
Contributor II

Hello,

Thank you for the response and help.

It seems I have managed somehow to get past that problem.

What I'm actually trying to do, is port an old project implemented in older version of S32DS (2017.R1) to newer version of S32DS (V2.1).

I think that in my case, there was a configuration problem:

First of all, the FreeRTOSConfig.h (there were differences - one of them was the configUSE_TIMERS, which should be 0 in my case but it was set to 1).

And second (probably the actual issue) was that somehow, I forgot to enable the clocks (from the clock component).

Used proper FreeRTOSConfig.h and enabled clocks from clock component in Processor Expert and it passes that part of code.

0 项奖励
回复