How to implement the PFE clock configure in RTOS

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

How to implement the PFE clock configure in RTOS

1,430 Views
waitewang
Contributor III
 

Dear Expert,

We are working on implementing the PFE (Packet Forwarding Engine) Ethernet driver for the S32G274A within a real-time operating system (RTOS). Since our RTOS does not have Linux’s clock framework or device tree infrastructure, we need to configure the required clocks by directly programming the hardware registers.

Could you please advise on how we can obtain the complete clock configuration logic or reference code for the PFE module? Any documentation, register-level examples, or best practices would be greatly appreciated.

Thank you very much!

Tags (1)
0 Kudos
Reply
4 Replies

1,404 Views
Joey_z
NXP Employee
NXP Employee

Hi,waitewang

Thank you for contacting us.

Sorry for that we do not provide the PFE+RTOS application to customer for reference.

Generally, the clock will be configured in the bootloader stage for Multi-core scenario, if you want to set the clock register on M core, you can try to refer to the S32G2RM.pdf of Chapter 24 Clock Generation Module.

Also, need to configure the partition for PFE.

Joey_z_0-1770778455608.png

BR

Joey

 

0 Kudos
Reply

1,397 Views
waitewang
Contributor III

Hello experts

I have another question about the clock of PFE module, as follow:

We referred to the GMAC driver’s clock configuration in the existing RTOS BSP. When initializing the PFE module, it is necessary to configure the MC_CGM_2 register block—specifically, to set up the TX clock for PFE_MAC_0, we need to configure the Clock Mux 1 Select Control Register (MUX_1_CSC) within this register group, as shown in the figure below.

waitewang_0-1770790885058.png

 


In the SELCTL field of this register, a clock source must be selected. However, we are unsure how the clk_src_x identifiers described in the reference manual correspond to the actual hardware clock sources.

waitewang_1-1770790938206.png

 


We found some related descriptions in the device tree files, but we don’t know how to map them correctly. Could you please clarify how clk_src_x in the manual relates to the real clock sources used in the system?

0 Kudos
Reply

1,393 Views
Joey_z
NXP Employee
NXP Employee

Hi,waitewang

Thank you for your reply and informaiton.

Could you tell me you are using a single-core or multi-core scenario? initialization of clock can be post in the bootloader, why do you want to choose to configure the PFE clock on the RTOS?

BR

Joey

0 Kudos
Reply

1,390 Views
waitewang
Contributor III

Hello

I'm working in a multicore scenario. According to your reply, if the system is booted by U-Boot, does that mean the operating system doesn't need to configure the clocks?

0 Kudos
Reply