Dear NXP Support Team,
I am encountering an issue while running the lpuart_echo_s32K144 example on a custom board. I would appreciate your assistance in resolving this problem.
Here's a detailed description of my setup and the steps I've taken:
Hardware: I have an S32K144evb-q100 evaluation board and a custom board (S32K144, 64-pin).
Software: I'm using S32DS 3.5 to create the lpuart_echo_s32K144 example with SDK version 4.0.2.
Steps Taken:
1. Step 1: I compiled and flashed the example onto the S32K144evb without any modifications. The example ran successfully on the EVB.
2. Step 2: I modified the project as follows:
3. Step 3: After compilation, I attempted to debug the application on the custom board using J-Link.
Issue:
During debugging, the program enters an infinite loop at the following line of code:
`uint32_t regValue = config->base->PCR[config->pinPortIdx];`
This leads to the execution of the `DefaultISR` function:
Could you please advise on the potential cause of this issue and suggest possible solutions? I suspect the clock configuration or pin mapping might be the source of the problem.
Thank you for your time and assistance.
Sincerely,
Whale
Please tell me your chip's maskset and part number. If it's an S32K144H, it only supports a maximum of 80MHz. If it's an S32K144U, it supports a maximum of HSRUN mode (112 MHz).
Please reconfigure the HSRUN clock by refer to the discussion in Creating New project : s32DS : Error clock not initializing
Hi @Robin_Shen ,
Following your instructions, I modified the clock initialization function, and I also disabled SOSC in the clock configuration interface. However, when generating the code, the following error occurred:
I'm not sure if this is the cause, but even after your modifications, the crash still occurs in the same place within PINS_Init.
How should I fix this?
Hi
I modified the lpuart_echo_s32k144 according to your instructions in S32DS v3.4 + S32K1 SDK 4.0.3, but I didn't encounter this error on my S32K144EVB-Q100.
This error seems to indicate that the clock gate of the PORT is not enabled.
For your board that doesn't have onboard crystal, I suggest modifying the Clock tool configuration to disable SCG.SOSC.
Additionally, for S32K1 SDK 4.0.x, it is recommended to use CLOCK_DRV_Init. For details, please see: SDK problem in S32 Design Studio for ARM 2.2
/* Initialize and configure clocks
* - see clock manager component for details
*/
// CLOCK_SYS_Init(g_clockManConfigsArr, CLOCK_MANAGER_CONFIG_CNT,
// g_clockManCallbacksArr, CLOCK_MANAGER_CALLBACK_CNT);
// CLOCK_SYS_UpdateConfiguration(0U, CLOCK_MANAGER_POLICY_AGREEMENT);
CLOCK_DRV_Init(&clockMan1_InitConfig0);
/* Initialize pins
* - See PinSettings component for more info
*/
PINS_DRV_Init(NUM_OF_CONFIGURED_PINS0, g_pin_mux_InitConfigArr0);
But we recommend to use the latest S32K1 RTD. The old SDK will not be updated to fix bugs.
Best Regards,
Robin
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "ACCEPT AS SOLUTION" 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.
-------------------------------------------------------------------------------