S32 Design Studio - How to set FreeRTOS cpu clock

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

S32 Design Studio - How to set FreeRTOS cpu clock

Jump to solution
2,670 Views
Boniface
Contributor II

Hello and Happy new year!

I am developing sw for the S32G399A MCU (M7 core) using the S32 Design Studio tool.

My role is to develop the TCP/IP part so I created the example project (lwip_FreeRTOS_S32G399A_M7) and checked it.

After checking, I created a new project and following the contents of the example project.

But the cpu clock[Hz] in the FreeRTOS configuration didn't change even though I followed the exact same settings. (Pins / Clocks / Etc...)

And In the example, the config mode is Default Clock (not the User Clock)

I wannted to upload the screenshot buf unfortunately, due to my company policy, file/screenshot uploads are not allowed.

Could you please how to change the cpu clock?

Thank you.

Tags (1)
0 Kudos
Reply
1 Solution
2,419 Views
Joey_z
NXP Employee
NXP Employee

hi,Boniface

Thank you for your reply.

I have the same problem when I use your .mex file, but I did not encounter the problem when I created a new project to add FreeRTOS.I use the 4.0.2 HF3 version of RTD.

Refer to the Release Note, you can try the 4.0.2 version of RTD in S32DS.

Joey_z_0-1737111736999.png

 

BR

Joey

View solution in original post

0 Kudos
Reply
11 Replies
2,627 Views
Joey_z
NXP Employee
NXP Employee

Hi,Boniface

Thank you for contacting us.

Which version of RTD and S32DS you are use?

In addition , Are you using a custom board? Is lwip_FreeRTOS_S32G399A_M7 normal for you? How do I get the same version of this routine as yours?

BR

Joey

0 Kudos
Reply
2,612 Views
Boniface
Contributor II

Hi, Joey

Thanks for your reply.

I'm using these SW.

 - S32 Design Studio for S32 Platform V3.5 (Update 14)

 - S32G3 RTD AUTOSAR 4.4 Version 4.0.0

 - FreeRTOS for S32CC 4.0.2

 - TCPIP_STACK for S32G version 1.0.4

 

I got the example by

 : File - New - S32DS Project from Example - S32G TCPIP STACK 1.0.4 D2310 Example Projects - S32G399A - lwip_FreeRTOS_S32G399A_M7

 

And the Target board is S32G-VNP-RDB3.

(Actually, I ordered that board and haven't received it yet.)

 

Best regards,

Tags (1)
0 Kudos
Reply
2,596 Views
Joey_z
NXP Employee
NXP Employee

Hi,Boniface

Thank you for your detailed reply.

You need to fix XBAR_CLK as the following picture.

Joey_z_0-1736755555974.pngJoey_z_1-1736755565791.png

Hope it can help you.

BR

Joey

0 Kudos
Reply
2,574 Views
Boniface
Contributor II

Hi, Joey

 

Unfortunately, I already set XBAR_CLK to 400MHz but it didn't work.

So I attached the MEX file of the project that I create.

I hope this helps you analyze it.

 

Best regards,

Boniface

Tags (1)
0 Kudos
Reply
2,550 Views
Joey_z
NXP Employee
NXP Employee

hi,Boniface

In the FreeRTOS configuration, the CPU clock and XBAR_CLK should maintain the same value. To change the XBAR_CLK, you need to adjust CORE_PLL_DFS1 as shown in the following picture.

Joey_z_0-1736820378619.png

BR

Joey

0 Kudos
Reply
2,546 Views
Boniface
Contributor II

Hi, Joey

Thanks for your fast reply.

I changed the setting but the clock didn't change.

Even though I clicked the Update Code button, deleted and re-added the freertos component in the Peripherals it didn't change.

What else should I check?

Boniface_0-1736821579215.png

Best regards,

Boniface

 

 

Tags (1)
0 Kudos
Reply
2,535 Views
Joey_z
NXP Employee
NXP Employee

hi,Boniface

Thank you for your reply.

I encountered the same problem when testing the provided .mex file.

However, I did not experience the issue when I set up a new project and added FreeRTOS as shown in the following picture. You can try setting up a new project only to add FreeRTOS; then, if the problem still occurs, you could try using version S32DS 3.5.3, which I normally use.

Joey_z_0-1736834694032.png

Joey_z_1-1736834704210.png

Hope it can help you.

BR

Joey

 

0 Kudos
Reply
2,446 Views
Boniface
Contributor II

Hi, Joey

Thank you for your reply.

 

My coworker installed S32DS 3.5.3 and created a new project.

He just added the freertos component after creating the project and the Default clock is still '0'.

(He didn't change the default setting, including clocks.)

Could you please check the mex file I attached?

 

Best regards,

Boniface

 

Tags (1)
0 Kudos
Reply
2,420 Views
Joey_z
NXP Employee
NXP Employee

hi,Boniface

Thank you for your reply.

I have the same problem when I use your .mex file, but I did not encounter the problem when I created a new project to add FreeRTOS.I use the 4.0.2 HF3 version of RTD.

Refer to the Release Note, you can try the 4.0.2 version of RTD in S32DS.

Joey_z_0-1737111736999.png

 

BR

Joey

0 Kudos
Reply
2,365 Views
Boniface
Contributor II

Hi, Joey

 

Finally, I made it.

I installed S32DS 3.5.3 / FreeRTOS 4.0.3 CD3 / SW32G_RTD_4.4_4.0.2_HF02

and It worked.

Thank you for your help.

Boniface_0-1737336828909.png

 

Best Regards,

Boniface

Tags (1)
0 Kudos
Reply
2,357 Views
Joey_z
NXP Employee
NXP Employee

hi,Boniface

I would be glad to help you.

BR

Joey

0 Kudos
Reply