it can't run FreeRTOS example on S32K312 platform by S32DS

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

it can't run FreeRTOS example on S32K312 platform by S32DS

Jump to solution
3,715 Views
f-nelson
Contributor IV

Hi NXP:
I tried to run FreeRTOS example on S32K312 platform, but it always be failed at exceptions.c file (HardFault_Handler function) finally,
and it looks like error about configuring the clock dividers that are under MCU control. Could you please tell me how debug this issue? thanks.

Test condition-
S32K312 IC part number:
S32K312NHT0VPAST

installed environment:
1.S32DS IDE:(S32DS.3.4_b201217_win32.x86_64.exe)
2.S32K3 Service Pack:SW32K3_S32DS_3.4.3_D2112.zip
3.S32K3 RTD 2.0.0 package (SW32K3_RTD_4.4_2.0.0_D2203.exe)
4.S32K3 FreeRTOS (SW32K3_FreeRTOS_10_4_6_UOS_2_0_0_DS_updatesite_D2204.zip)

create project method:
1.open IDE
2.File\New\S32DS Project from Example
3.Examples:SW32K3_FreeRTOS 10.4.6 UOS 2.0.0 D2204 Example projects\FreeRTOS_Toggle_Led_Example_S32K312

0 Kudos
Reply
1 Solution
3,526 Views
f-nelson
Contributor IV
Hi Robin:
thanks for your helping.
updated status~~we found issue about HSE fw,because I took project board which including HSE fw inside MCU, so example code can't run. I changed new board and no HSE fw in MCU, it can works without issue.

View solution in original post

0 Kudos
Reply
10 Replies
3,709 Views
f-nelson
Contributor IV

attached screenshot

0 Kudos
Reply
3,678 Views
Robin_Shen
NXP TechSupport
NXP TechSupport

Hi

Have you modified FreeRTOS_Toggle_Led_Example_S32K312? I tested it on S32K312EVB-Q172 without HSE installed and there was no problem.
It is not recommended to use such an old version. The new version of RTD fixes many bugs. I noticed that the clock configuration in Clocks Tool does not match the "Table 152. Option B - Reduced Speed ​​mode (CORE_CLK @ 120 MHz)" of S32K3XXRM. This example incorrectly sets PLL_PHI0_CLK to 160MHz.

If there is no specific reason, we recommend using a newer version of the software.

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.
-------------------------------------------------------------------------------

 

0 Kudos
Reply
3,633 Views
f-nelson
Contributor IV
Hi Robin:
thanks for your replying.
In actually,I had modified MCU package from 172pin to 100pin for current project.
I also compared hardware of oscillator component between S32K312EVB-Q172 and current project are the same 16Mhz,
but I am not clear why MCU code always be failed at clock part.Does it have any ideas for checking?

Just now, I tried to modify PLL_PHI0_CLK speed from 160Mhz to 120Mhz,unfortunately the result is the same.

Could you please provide me about recommanding RTD driver version full name and download location? I can try again.
0 Kudos
Reply
3,622 Views
Robin_Shen
NXP TechSupport
NXP TechSupport

Please find a new version FreeRTOS by click S32K3 Reference Software -> Automotive SW - S32K3 - FreeRTOS

SW32K3 FreeRTOS 11.1.0 version 5.0.0 Code Drop is based on S32K3 RTD 5.0.0 (recommended) 

SW32K3 FreeRTOS 10.6.0 version 4.0.0 is based on S32K3 RTD 4.0.0

If the external circuit is the same, just switching from 172pin to 100pin should not cause this error.
In addition to the 16MHz crystal, is the 32.768kHz slow crystal also connected?

0 Kudos
Reply
3,614 Views
f-nelson
Contributor IV
Hi Robin:


1.SW32K3 FreeRTOS 11.1.0 version 5.0.0 Code Drop is based on S32K3 RTD 5.0.0 (recommended)
=>I checked list of S32K3 Reference Software, but it didn't list "S32K RTD 5.0.0" item for downloading.
download website:https://nxp.flexnetoperations.com/control/frse/product?entitlementId=150312151&lineNum=1&authContact...

2.SW32K3 FreeRTOS 10.6.0 version 4.0.0 is based on S32K3 RTD 4.0.0 <=(AUTO-SW-PACKAGE-MANAGER)
=>I used AUTO-SW-PACKAGE-MANAGER as screenshot for downloading FreeRTOS 4.0.0 and Real-Time Drivers 4.0.0, but
it is pending until now.

3.hardware crystal comparison
S32K312EVB-Q172 schematic:only one 16Mhz crystal
EXTAL=pin23
XTAL=pin25

current project
S32K312-100pin:only one 16Mhz crystal
EXTAL=pin15
XTAL=pin17
we don't have other crystal of 32.768kHz on board now.
0 Kudos
Reply
3,548 Views
Robin_Shen
NXP TechSupport
NXP TechSupport

Which software did you apply for in the Automotive Software Package Manager? It will recommend the complete dependent software packages.
Have you filled in the detailed information as prompted? In addition, please click Export Control for more information.
If you want to install SW32K3 FreeRTOS 10.6.0 version 4.0.0 based on S32K3 RTD 4.0.0, please try to install S32K3 RTD 4.0.0 by refer to: HOWTO: offline install S32K3 RTD 4.0.0 in S32DS v3.5
Then install SW32K3 FreeRTOS 10.6.0 version 4.0.0 offline.

I haven't written about how to offline install S32K3 RTD 5.0.0, but the method is the same. Just refer to the Release Note of RTD:
1. Install S32Design Studio 3.5: S32DS.3.5_b220726_win32.x86_64.exe
2. Install Update 13 for S32DS: SW32_S32DS_3.5.13_D2407.zip
3. Install development package for S32K3XX: SW32K3_S32DS_3.5.13_D2407
4. Install development package for S32K396: SW32K39x_S32DS_3.5.13_D2407.zip
5. Install development package for S32M276: SW32M2_S32DS_3.5.13_D2407
6. Install updatesite for this release: SW32K3_S32M27x_RTD_R21-11_5.0.0_D2410_DesignStudio_updatesite.
zip

A3: Change the crystal pins in Pins Tool. Disable the 32.768kHz SXOSC:

Disable SXOSC_CLK.SXOSC_CLK.jpg

0 Kudos
Reply
3,570 Views
f-nelson
Contributor IV
Hi Robin:
I found S32K3 RTD 5.0.0(SW32K3_S32M27x_RTD_R21-11_5.0.0_D2410.exe), is it correct? thanks
0 Kudos
Reply
3,527 Views
f-nelson
Contributor IV
Hi Robin:
thanks for your helping.
updated status~~we found issue about HSE fw,because I took project board which including HSE fw inside MCU, so example code can't run. I changed new board and no HSE fw in MCU, it can works without issue.
0 Kudos
Reply
3,517 Views
Robin_Shen
NXP TechSupport
NXP TechSupport

If HSE FW is installed and S32K3 RTD 2.0.x is used, it is recommended to disable FIRC. Refer to this discussion: S32K3_HSE_BUG_RTD2.0.x

0 Kudos
Reply
3,513 Views
f-nelson
Contributor IV
thanks again~~it's useful.
0 Kudos
Reply