2411657_en-US

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

2411657_en-US

2411657_en-US

S32K314 HSE Installation Issues

Help! I wrote an HSE firmware installer based on the official demo project, but after performing two resets, there is no data at HSE installation address 0x007E0000. Does this mean the HSE installation failed? The S32 version is 3.6.8, and the chip is...S32K314, RTD version 7.0.1

1131_0-1788767775138.png1131_0-1788767775138.png1131_0-1788767775138.png1131_0-1788767775138.png

This is an ld file.

1131_1-1788767805874.png1131_1-1788767805874.png1131_1-1788767805874.png1131_1-1788767805874.png


This is the rewritten IVT vector.

1131_2-1788767830677.png1131_2-1788767830677.png1131_2-1788767830677.png1131_2-1788767830677.png 1131_3-1788767849116.png1131_3-1788767849116.png1131_3-1788767849116.png1131_3-1788767849116.png 1131_4-1788767872384.png1131_4-1788767872384.png1131_4-1788767872384.png1131_4-1788767872384.png

Finally, I've attached my HSE installation demo project.

回复: S32K314 HSE 安装问题

@VaneB Hello

I modified the linker file according to your suggestion and commented out all the entries in the ivt.c file. After restarting the program twice, I observed the status of status = Hse_Ip_GetHseStatus(0u) in debug mode. The status value was 1001 0110 0000, but the 9th bit was 0, indicating that HSE was not installed successfully? Moreover, no version information was obtained. The return value of srvResponse = Hse_Ip_ServiceRequest(0u, u8MuChannel, &request, &pHseSrvDesc) is 0xaa55a11e.

as follows

1131_1-1788838145743.png1131_1-1788838145743.png1131_1-1788838145743.png1131_1-1788838145743.png

1131_2-1788838165453.png1131_2-1788838165453.png1131_2-1788838165453.png1131_2-1788838165453.png

1131_3-1788838180700.png1131_3-1788838180700.png1131_3-1788838180700.png1131_3-1788838180700.png 1131_4-1788838213520.png1131_4-1788838213520.png1131_4-1788838213520.png1131_4-1788838213520.png


Re: S32K314 HSE 安装问题

Hi @杨工1131 

I have a few observations:

  • According to the comment in your linker file, the HSE firmware should be placed in Block 0. However, the address currently assigned to HSE_BINARY belongs to Block 1. It should be configured as
HSE_BINARY (R) : ORIGIN = 0x00400000
  • The PFlash region should start from Block 1:
int_pflash : ORIGIN = 0x00500000, LENGTH = 0x00300000 - __HSE_CODE_SIZE /* 4096KB - __HSE_CODE_SIZE (sBAF + HSE) */
  • As a suggestion, instead of using a hardcoded address, HSE_FW_ADDR could be defined as: 
#define HSE_FW_ADDR (__HSE_BIN_START)
  • There is no need to create a separate ivt.c file. The Image Vector Table structure is already defined in Project_Settings → Startup_Code → startup_cm7.s
  • Regarding the IVT, if you refer to Section 32.5.3 of the S32K3xx Reference Manual, Rev. 12, the entries following the CM7_2 Start Address are:
.long 0xffffffff      /* Offset 0x20: Reserved */
.long LC_CONFIG_ADDR  /* Offset 0x24: Lifecycle configuration pointer */
.long CM7_3_VTOR_ADDR /* Offset 0x28: CM7_3 Start address */
.long HSE_FW_ADDR     /* Offset 0x2C: Reserved */

Regarding the code, I can see that you are using the same structure as the example, so I would not expect any issues from that part.


BR, VaneB

回复: S32K314 HSE 安装问题

Hi @杨工1131 

Did you also add the start address of the HSE Firmware Pink Header image to the IVT in startup_cm7.s, after the CM7_3 start address?

Since D-Cache is enabled, to avoid cache-related issues, force all HSE-related data, such as service descriptors, key handles, and input/output buffers, into a non-cacheable memory region by placing them in the appropriate memory section. For example:

hseAttrFwVersion_t __attribute__((section(".mcal_data_no_cacheable"))) gHseFwVersion = {0U};

Also, do not call Hse_Ip_Init(). The application should first wait until the HSE firmware has completed its initialization by checking the status bits in the FSR and confirming that HSE_STATUS_INIT_OK is set. No requests should be sent to the HSE before this condition is met.

Finally, did you perform an MCU reset after enabling HSE firmware usage? 

タグ(1)
評価なし
バージョン履歴
最終更新日:
1週間前
更新者: