Hello,
I am running the example Port_Example_S32K344 on S32K3X4EVB-T172 Evaluation Board RevB (700-53148 Rev X5). But it fails at Mcu_InitClock() in main().
Then I realize that the function is commented out. But the condition is MCU_INIT_CLOCK is not STD_ON. Actually it is set as STD_ON in Mcu_Cfg.h.
Why is it like this? Is there anything missed here?
Thanks!
Crane
Hi @cranes
I replicated the steps you described in my EVB (S32K3X4EVB-T172 SCH-53148 Rev A, 700-53148 Rev X3), and the board does not present that behavior with the Port_Example_S32K344.
I do not have that board revision at this moment (I am looking to get one of them).
Could you help me test the Port_Example example of the S32K3_M27X Real-Time Drivers Version 3.0.0 P07? This is to validate if it is not a software problem.
B.R.
VaneB
Hi @cranes
Can you advise where he can find the example you mentioned?
The update package for S32DS can be downloaded from S32K3 Standard Software -> Automotive SW - S32K3/S32M27x - Real-Time Drivers for Cortex-M -> S32K3_M27X Real-Time Drivers Version 3.0.0 P07 -> SW32K3_RTD_R21-11_3.0.0_P07_D2306_DS_updatesite.zip or SW32K3_RTD_R21-11_3.0.0_P07_D2306.exe.
Once you download the updatesite.zip, open in S32DS the S32DS Extensions and Updates -> Add Update Site and select the package downloaded before. If it was correctly added in S32DS Extensions and Updates you are going to see an available update for the S32K3 RTD Autosar R21-11 Version 3.0.0. Once de update is done you should be able to create a project from an example of the S32K3_M27X Real-Time Drivers Version 3.0.0 P07.
Tried and got the same result as before.
Regards,
Crane
Hi @cranes
Do you mean that S32DS continues not to provide more options when opening a new example? Or does the code still fail on the clock initialization?
Hi Vanessa,
Sorry for the confusion.
Yes, I tried the new example in the updated version and still failed at Mcu_InitClock().
But it still looks like a software issue as the function Mcu_InitClock() definition should not be greyed out.
Regards,
Crane
Hi @cranes
There is a possibility that the error is caused by package compatibility. To verify, please check if the package versions are the same as shown in the image. If it is not the same, please delete S32DS and reinstall it with the latest versions of the packages (S32K3_M27X Real-Time Drivers Version 3.0.0 P07, S32 Design Studio 3.5.6 Development Package with support for S32K3xx devices and others).
This is from my computer. The version numbers look the same as yours. Does it mean they are compatible?
Hi @cranes
I already tested the example code with an S32K3X4EVB-T172 Evaluation Board RevB, and it works without problems.
Please delete S32DS and reinstall it just with the latest versions of the following packages: S32K3_M27X Real-Time Drivers Version 3.0.0 P07 and S32 Design Studio 3.5.6 Development Package with support for S32K3xx devices.
Hi Vanessa,
Uninstalled everything and reinstall S32DS and RTD only P07. The result is the same as before.
Here are what's in my computer. Can you help check if there is any difference with yours?
Or anything else to compare to find the cause of the different result?
Thanks!
Crane
Hi @cranes
If you test another example as Dio or any other, do you have the same behavior?
Also, are you using an external debugger or OpenSDA to program the MCU?
Hi Vanessa,
Tried Dio, Uart and PWM and only PWM works fine.
It looks as long as it is using Mcu_InitClock(), it gets stuck there. The function Mcu_InitClock() is greyed out.
I am using the debugger on the board, should be OpenSDA.
Regards,
Crane
Hi @cranes
Do you have another board where you can validate if it has the same behavior?
Also, could you provide the exact number of silicon of the S32K344 of your board?
Hi Vanessa,
No, this is the only board I have.
What is the number of silicon?
The exact number of the top is
P32K344EHVPBS
OP55A
CTZW2213A.
I have a question. Why is the definition of the function Mcu_InitClock() grayed out? It can't be found but it is called in Main().
Thanks,
Crane
Hi @cranes
I apologize for the long time this is taking and for any inconvenience this may cause.
I am still unable to replicate the behavior you are having with the EVB. I consulted with the internal team, and they are not able to replicate this situation.
The example does not require any modification to work, so the definition of the function Mcu_InitClock() grayed out should not represent any problem.
Could you help me validate that the jumper configuration is the same as the Getting Started with the S32K3X4EVB-T172 Evaluation Board for Automotive General Purpose?
Also, could you share an image of the HardFault given by S32DS?
Hi Vanessa,
Thank you for spending time on it.
Yes, the jumpers are the same as in the webpage you shared.
Other than changing the package from BGA257 to MQFP172, I didn't change anything else.
Here is how it goes when the program runs "step over" at the function Mcu_InitClock() .
Then if I click "View Disassembly", I see this:
This is how it goes if I just click run.
Then if I click "View Disassembly", I see this:
If I click "Edit Source Lookup Path", I see this:
Yesterday I tried FreeRTOS LED example and it works fine as well. It doesn't call Mcu_InitClock() either. It looks not a must to call this function, is it correct? I haven't found the answer yet.
Today, I don't see the definition of Mcu_InitClock() is grayed out (I have no idea why). But when running "step into" at this function, the result is the same as running "step over". It doesn't goes into this function.
Thanks!
Crane
Hi @cranes
To verify that this behavior is not caused by a hardware problem, please test the Mcu_Example_S32K344 or the Clock_Ip_Example_S32K344.
If you have a hard fault, try changing the example to use the internal clock.
Hi Vanessa,
There is no problem running Clock_ip_example.
Tried to change the clock in Port_Example to FIRC and disable PLL. It seems not working with these error and warning:
Thanks!
Crane