MPC5748G osif_Tick()

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

MPC5748G osif_Tick()

1,039 Views
Bobkat
Contributor II

Hi,

Please excuse me if I'm missing something obvious... transitioning from Microchip products.

I'm using S32DS together with a DEVKIT-MPC5748G development board and have a problem with regard to the osif_Tick() routine. in that it doesn't get executed and as such any code that uses the tick count for timing just gets stuck, e.g. OSIF_TimeDelay(), OSIF_SemiWait() etc.. For example, in OSIF_SemiWait, the osif_GetCurrentTickCount() always returns 0 and thus never breaks out of the while loop (see below).

 

uint32_t start = osif_GetCurrentTickCount();
uint32_t end = (uint32_t)(start + timeoutTicks);
uint32_t max = end - start;
while (*pSem == 0u)
{
uint32_t crt_ticks = osif_GetCurrentTickCount();
uint32_t delta = crt_ticks - start;
if ((timeoutTicks != OSIF_WAIT_FOREVER) && (delta > max))
{
/* Timeout occured, stop waiting and return fail code */
osif_ret_code = STATUS_TIMEOUT;
break;
}
}

The project uses a pit component on channel0 for basic timing and from what I can gather, the OSIF Pit Handler should be on Channel15 and initialised automatically.

Is there an explicit initialisation for the OSIF Pit that I need to call to get it to work or would this be related to something else?

Cheers

Rob

0 Kudos
5 Replies

1,027 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi Rob,

I just mentioned it here a few minutes ago, it's known problem of S32DS debugger:

https://community.nxp.com/t5/MPC5xxx/stuck-in-OSIF-TimeDelay/m-p/1354830

Regards,

Lukas

 

0 Kudos

1,002 Views
Bobkat
Contributor II

Hi Lukas,

Thanks for the information.

Sorry for the late reply.

Cheers

 

Rob

0 Kudos

993 Views
Bobkat
Contributor II

Hi Lukas,

Further to this issue, I've tried release code with OSIF_TimeDelay(250) and the same thing happens, i.e. app freezes.Only have a few components in the project, i.e. pin_mux, clockMan, intMan, pit and canCom1.

Using S32_SDK_S32PA_RTM_3.0.3.

Only use a PEMicro Multilink Universal to flash the release .elf.

Any ideas?

Cheers

 

Rob

0 Kudos

974 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi Rob,

do you mean that it doesn't work in standalone mode without the debugger? If the problem is really related to the Pemicro debugger and freeze mode of PIT, it should work. If it doesn't work without the debugger, it's probably another issue. I would need to see the project...

Regards,

Lukas

0 Kudos

962 Views
Bobkat
Contributor II

HI Lukas,

 

I was being a dumb-wit - needed to reset the board after programming with the release .elf.

Sorry for the trouble.

Cheers

Rob

 

 

0 Kudos