how to enable interrupt for flexray in 5748g

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

how to enable interrupt for flexray in 5748g

2,534件の閲覧回数
boyoungmun
Contributor I

Hi,

 

 

 

I would like to enable interrupts for flexray using MPC5748g and XPC56XX EVB.

So I set the interrupt priority and core as below, but it is not working well.

Would you please check those values are correct or not?

 

INTC.PSR[462].B.PRC_SELN = 0x8;

INTC.PSR[462].B.PRIN =1;

INTC.PSR[461].B.PRC_SELN = 0x8;

INTC.PSR[461].B.PRIN =1;

INTC.PSR[402].B.PRC_SELN = 0x8;

INTC.PSR[460].B.PRIN =1;

INTC.PSR[459].B.PRC_SELN = 0x8;

INTC.PSR[459].B.PRIN =1;

INTC.PSR[458].B.PRC_SELN = 0x8;

INTC.PSR[458].B.PRIN =1;

INTC.PSR[457].B.PRC_SELN = 0x8;

INTC.PSR[457].B.PRIN =1;

INTC.PSR[456].B.PRC_SELN = 0x8;

INTC.PSR[456].B.PRIN =1;

INTC.PSR[455].B.PRC_SELN = 0x8;

INTC.PSR[455].B.PRIN =1;

 

Thanks,

Boyoung.

ラベル(1)
0 件の賞賛
返信
8 返答(返信)

1,815件の閲覧回数
ulfschlieben
Contributor II

Hi,

does any body has an solution for that problem.

Is see the FAFAIF Bit in GIFER , but the service routine will not be called. 

 

 

0 件の賞賛
返信

2,279件の閲覧回数
martin_kovar
NXP Employee
NXP Employee

Hi Boyoung,

your code is correct. Interrupt requests are sent to z4a core.  Check, if you have set EE bit in MSR register.

Did you place the interrupt handlers at correct addresses? Do you see that interrupt flags are set correct?

Regards,

Martin

0 件の賞賛
返信

1,802件の閲覧回数
ulfschlieben
Contributor II

Hi Martin,

I was to dump to interpret the register correct.

So MSR = 0x9000 --> ee is enabled

When I start the sw first time I got one Interrupt from the FIFO --> good

Then I clear the FR_GIFER[FAFAIF] bit

But from know I didn't get any new FIFO Int

Any Idea what I'm missing

 

 

0 件の賞賛
返信

1,807件の閲覧回数
ulfschlieben
Contributor II

Hi,

INterrupt Handler Adress is correct an  I also see the flags cumming up correct in the felex ray registers.

But the MSR[EE] is not set....

 

タグ(1)
0 件の賞賛
返信

2,279件の閲覧回数
boyoungmun
Contributor I

Hi Martin,

I added the interrupts handlers in IntcIsrVectorTable[], please see the below codes. 

(uint32_t) &FLEXRAY_ISR, /* Vector # 455 FlexRay_0_2 FNEAIF */

(uint32_t) &FLEXRAY_ISR, /* Vector # 456 FlexRay_0_3 FNEBIF */

(uint32_t) &FLEXRAY_ISR, /* Vector # 457 FlexRay_0_4 WUPIF */

(uint32_t) &FLEXRAY_ISR, /* Vector # 458 FlexRay_0_5 PRIF */

(uint32_t) &FLEXRAY_ISR, /* Vector # 459 FlexRay_0_6 CHIF */

(uint32_t) &FLEXRAY_ISR, /* Vector # 460 FlexRay_0_7 TBIF */

(uint32_t) &FLEXRAY_ISR, /* Vector # 461 FlexRay_0_8 RBIF */

(uint32_t) &FLEXRAY_ISR, /* Vector # 462 FlexRay_0_9 MIF */

 

And set the interrupts flags in Fr_GIFER register and Fr_PIER0 register.

But I couldn’t find the MSR register in S32DS so didn’t check the EE value was set to 1 or not.

Would you please let me know how to check and set EE bit in MSR register using S32DS?

Thanks,

Boyoung.

0 件の賞賛
返信

2,279件の閲覧回数
martin_kovar
NXP Employee
NXP Employee

Hi Boyoung,

implementation of register view is not so good in S32 Design Studio. Please look at the figure below.

pastedImage_1.png

There is not description of single bits in msr register. You have to open code reference manual for e200z4 and compare the value with MSR register description.

pastedImage_2.png

Have you enabled appropriate interrupts in FR_GIFER register?

Do you see that appropriate interrupt flags in FR_CIFR are set?

Regards,

Martin

0 件の賞賛
返信

2,279件の閲覧回数
boyoungmun
Contributor I

Whenever I try to set PRIE, FAFAIE, RBIE and TBIE to 1 in Fr_GIFER, error (No source available for "main() at main_Z4_0.c:286 0x100af42") is returned.

Do I need to set the additional register or setting?

0 件の賞賛
返信

2,279件の閲覧回数
martin_kovar
NXP Employee
NXP Employee

Hi,

have you correctly placed interrupt handler routines in intc_SW_mode_isr_vectors_MPC5748G.c file?

Regards,

Martin

0 件の賞賛
返信