Problem with S32k144 48 PINS - SDK

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

Problem with S32k144 48 PINS - SDK

Jump to solution
1,237 Views
senthilnathan_v
Contributor I

I have migrated from 64 pin to 48 pins. First problem is it was always going to trap because the clock initialization for the peripherals from SDK had no effect. Then i need to do it manually in the main function.

//***** Added Manually ***

// LPTMR0
if(PCC->PCCn[PCC_LPTMR0_INDEX] & 0x40000000){PCC->PCCn[PCC_LPTMR0_INDEX] = 0x80000000;}
PCC->PCCn[PCC_LPTMR0_INDEX] = 0xC2000000; // enable clock, use SIRCDIV2 clock, no clock division


/* Initialize LPTMR */
LPTMR_DRV_Init(INST_LPTMR1, &lpTmr1_config0, false);
INT_SYS_InstallHandler(LPTMR0_IRQn, lptmrISR, (isr_t *)NULL);
INT_SYS_EnableIRQ(LPTMR0_IRQn);

 

The timer interrupt and pin toggling was working later. 

Now i have problem with the LIN and LPUART. The LPUART interrupt is not hitting even after the clock initialization for LPUART1.

/* Configure Clock for LPUART1 */
PCC->PCCn[PCC_LPUART1_INDEX] &= ~PCC_PCCn_CGC_MASK; /* CGC=0: Clock disabled to modify PCS */
PCC->PCCn[PCC_LPUART1_INDEX] &= ~PCC_PCCn_PCS_MASK; /* Clear PCS field temporarily */
PCC->PCCn[PCC_LPUART1_INDEX] = 0xC3000000;

 

I have tried both LIN slave and LIN slave baremetal from SDK.

Is the SDK for 48 pin package is complete? 

or Still any update can be expected?

0 Kudos
1 Solution
1,214 Views
senthilnathan_v
Contributor I

Thank you for the reply. I think i made some mistake in clock configuration. Now the LIN is working fine as expected.

I got support from field application engineer, NXP. He guided me to resolve the problem

View solution in original post

0 Kudos
2 Replies
1,223 Views
Robin_Shen
NXP TechSupport
NXP TechSupport

Hi senthilnathan_v,

Would you please let me know the version of your S32K SDK?
Processor Expert already supports 48 pin package in SDK RTM 3.0.0. (It should have been fixed in a later version too.)

Here you can see I change the CPU to 48 pins for lptmr_periodic_interrupt_s32k144 example.
It was able to work without clock issue.

lptmr_periodic_interrupt_s32k144 48 pins.pngdebug LPTMR.png

Best Regards,
Robin
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos
1,215 Views
senthilnathan_v
Contributor I

Thank you for the reply. I think i made some mistake in clock configuration. Now the LIN is working fine as expected.

I got support from field application engineer, NXP. He guided me to resolve the problem

0 Kudos