Hello NXP Technical Support Team,
I have a question regarding the FIRC clock configuration on the S32K328.
I configured the FIRC clock source for the STM2 module to 3MHz (DIV 16) in a single-core setup. In the single-core configuration, I confirmed that the FIRC clock source is correctly output at 3MHz.
However, once I enable multicore, the FIRC clock source is output at 48MHz instead of 3MHz, even though the divider is still set to 16.
In my current architecture, MCU Init and Set Mode can only be executed on Core 0. My question is whether the MCU clock can also be accessed (or reconfigured) from Core 1, and whether this could be the cause of the issue.
Additional context on my setup:
- I am working in an AUTOSAR environment and have added the RM (Resource Manager) module for multicore support.
- Domain0 master: Core 0, Domain1 master: Core 1. All memory and peripheral access permissions have been granted for each domain.
Tool environment:
- MCAL RTD 3.0.0
- EB Tresos 27.1.0
Findings from my own analysis:
When reading the FIRC_DIV_SEL field in the CONFIG_REG_GPR register at runtime, the value is 3, which corresponds to 48MHz according to the driver code (DividerValue mapping: 48MHz→3, 24MHz→1, 3MHz→2). I also noticed that the divider write path in the clock driver includes an APP_CORE_ACC permission check and a wait for the Secure BAF (CORE2) to enter WFI (by polling PRTN0_CORE2_STAT). I suspect the divider write may be skipped in the multicore configuration.
Could you please advise on the following:
- Why the FIRC divider setting (DIV 16) is not applied when multicore is enabled, resulting in 48MHz output instead of 3MHz?
- Whether accessing or reconfiguring the MCU clock from Core 1 is supported or required in this scenario.
- Whether the divider write could be skipped due to the APP_CORE_ACC permission check or the Secure BAF WFI timeout in the multicore configuration, and how to ensure the divider is correctly applied.
Thank you for your support. I look forward to your response.
Best regards,
AWS-LIBRARIES-S32K3