Martin,Thank you for your answer. The example I sent you does work and is the same with the one you sent back. what does not work is if you set the PIT_0.MCR.B.FRZ=1 ;void timer_isr_init(void){ //PIT_0.MCR.R=0x0001; /freeze on debug/ PIT_0.MCR.B.FRZ=1; PIT_0.MCR.B.MDIS = 0; /* Enable PIT / //PIT_0.TIMER[0].LDVAL.R = 0x07270E00; / 2s at 60MHz Per clock / // PIT_0.TIMER[0].LDVAL.R = 0x002DC6C0; / 50ms at 60MHz Per clock / PIT_0.TIMER[0].LDVAL.R = 0x11E1A300; / 5s at 60MHz Per clock / PIT_0.TIMER[0].TCTRL.R = 0x00000003; / enable timer CH0 and int */ INTC.PSR[226].R=(unsigned short int)(0x8000 | 0x0F);}
or if you set the register to 1 MCR.R=1 (the line above)
Can you please check that too
Sysclk_init and InitPeriClkGen are called from hw_init() function.
From: b55689 <admin@community.nxp.com>
To: adrian onea <adrian_onea@yahoo.com>
Sent: Monday, 5 June 2017, 20:54
Subject: Re: - Re: timer interrupt does not work when FRZ bit is set
#yiv0250212330 * #yiv0250212330 a #yiv0250212330 body {font-family:Helvetica, Arial, sans-serif;}#yiv0250212330 #yiv0250212330 h1, #yiv0250212330 h2, #yiv0250212330 h3, #yiv0250212330 h4, #yiv0250212330 h5, #yiv0250212330 h6, #yiv0250212330 p, #yiv0250212330 hr {}#yiv0250212330 .yiv0250212330button td {}
|
|
Re: timer interrupt does not work when FRZ bit is set
reply from Martin Kovar in MPC5xxx - View the full discussionHello, which version of S32DS you use? In the code you shared, I see some issues. You do not call Sysclk_Init and InitPeriClkGen and also I do not know, how you configure interrupts. I S32DS, there is function xcptn_xmpl which configures global interrupt settings. I recommend you to download S32DS version 1.1 and create project directly for S32R. I am attaching you simple project which works correct, but PIT interrupt occurs after 10-15 seconds (I used your settings). Regards,Martin PS: Please ignore example name.
Reply to this message by replying to this email, or go to the message on NXP Community |
Start a new discussion in MPC5xxx by email or at NXP Community |
Following Re: timer interrupt does not work when FRZ bit is set in these streams: Inbox |
This email was sent by NXP Community because you are a registered user.
You may unsubscribe instantly from NXP Community, or adjust email frequency in your email preferences |
|