2359957_en-US

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

2359957_en-US

2359957_en-US

S32N55 HSE2 - SetAttribute(HSE_OTP_FOEM_ADKP_ATTR_ID) No Response in Synchronous Mode

Hello,

I am working on a customer project with the S32N55 platform and I am facing an issue when calling SetAttribute with HSE_OTP_FOEM_ADKP_ATTR_ID for the first time.

---

[Environment]
- Platform: S32N55 EVB (Silicon B0)
- GrayVIP: 1.0.24
- FSS FW SDK: 1.13.0+
- Current Lifecycle: OEM_OPEN (confirmed via GetAttribute)
- ADKP: never provisioned (first attempt)
- HSE Timeout: CRYPTO_43_HSE_TIMEOUT_DURATION_U32 = 1,000,000,000

---

[Issue]
When calling SetAttribute with HSE_OTP_FOEM_ADKP_ATTR_ID, HSE never returns a response in synchronous mode. Mu_Ip_IsResponseReady() never returns TRUE, resulting in a timeout regardless of the timeout value.

Other SetAttribute calls (e.g. HSE_OTP_GO_SECURE_ATTR_ID) work correctly with the same synchronous mechanism.

---

[Code]

hseSrvDescriptor_t xLocalDesc = {0};
hseSetAttrSrv_t* pSetAttrReq;

xLocalDesc.srvId = HSE_SRV_ID_SET_ATTR;
pSetAttrReq = &(xLocalDesc.hseSrv.setAttrReq);
pSetAttrReq->attrId = HSE_OTP_FOEM_ADKP_ATTR_ID;
pSetAttrReq->attrLen = sizeof(hseAttrOtpFoemAdkp_t); /* 32 bytes */
pSetAttrReq->pAttr = Hse_Ip_ToAHBAddress((HOST_ADDR)pAdkpBuf);

xHseIpReq.eReqType = HSE_IP_REQTYPE_SYNC;
xHseIpReq.u32Timeout = CRYPTO_43_HSE_TIMEOUT_DURATION_U32;

hseResp = Hse_Ip_ServiceRequest(u8MuInst, u8MuCh, &xHseIpReq,
(hseSrvDescriptor_t *)Hse_Ip_ToAHBAddress(
(HOST_ADDR)&g_hseShared.axHseSrvDesc[u8MuInst][u8MuCh]));
/* HSE never responds - Mu_Ip_IsResponseReady() always returns FALSE */

---

[Pre-conditions verified before calling SetAttribute]
1. LC is OEM_OPEN (confirmed via GetAttribute)
2. ADKP has never been provisioned on this device
3. ADKP buffer is located in non-cacheable shared memory
4. Address is translated via Hse_Ip_ToAHBAddress()

---

[Observation 1 - Async mode]
Looking at the GrayVIP reference implementation (Fss_Firmware_ProgSecureFuseADK),
SetAttribute for ADKP is called using an asynchronous mechanism with WaitEvent:

RetVal = Fss_Sem_SetHseAttribute(&setAttr);
if (E_OK == hseResponse)
{
WaitEvent(FSS_SEM_HSESETATTR_EVENT_NAME);
RetVal = Fss_Sem_GetHseAsynResponse();
}

This suggests that OTP write operations may require async mode on S32N55 HSE2.

---

[Observation 2 - VGPIO Fuse Power Enable]
In GrayVIP, Fss_Firmware_FuseProgramming() enables fuse programming power
via VGPIO before writing Boot Config fuses:

VGPIO_Type *pVgpio = (VGPIO_Type *)FUSE_VDD_EN_PORT_ADDRESS;
pVgpio->OV[FUSE_VDD_EN_BANK].PMOS = (1 << FUSE_VDD_EN_PIN);
pVgpio->OV[FUSE_VDD_EN_BANK].OE |= (1 << FUSE_VDD_EN_PIN);
pVgpio->OV[FUSE_VDD_EN_BANK].OVS = (1 << FUSE_VDD_EN_PIN);

However, Fss_Firmware_ProgSecureFuseADK() (ADKP write) does not explicitly
call this power enable sequence. It is unclear whether:
1. HSE2 handles fuse power internally for OTP attribute writes, or
2. VGPIO fuse power enable is also required before SetAttribute(ADKP).

Additionally, GrayVIP does not include a fuse power disable sequence after
the write. We are concerned about whether leaving VGPIO fuse power enabled
after the OTP write could cause unintended fuse writes or security issues.

---

[Questions]
1. Is synchronous mode (HSE_IP_REQTYPE_SYNC) supported for SetAttribute(ADKP),
or is async mode mandatory for OTP write operations on S32N55 HSE2?
2. Is VGPIO fuse programming power enable required before calling
SetAttribute(HSE_OTP_FOEM_ADKP_ATTR_ID)?
3. If VGPIO fuse power enable is required, what is the correct procedure
to disable it after the OTP write is complete?
4. Are there any additional prerequisites before calling SetAttribute(HSE_OTP_FOEM_ADKP_ATTR_ID)
that may not be documented?

This is a critical blocker for our customer project delivery.
Any guidance would be greatly appreciated.

Thank you.

Re: S32N55 HSE2 - SetAttribute(HSE_OTP_FOEM_ADKP_ATTR_ID) No Response in Synchronous Mode

Hello again @EddiePark,

Please find my answers to your questions below:

  1. Is synchronous mode (HSE_IP_REQTYPE_SYNC) supported for SetAttribute(ADKP), or is async mode mandatory for OTP write operations on S32N55 HSE2?
    • For What I can understand from the FSS firmware , it is not, as you can see, the Wait and Clear functions calls you mentioned are guarded by the conditional compilation #ifdef FSS_SEM_HSESETATTR_EVENT_NAME. This way you ensure you continue once the request has been processed.
  2. Is VGPIO fuse programming power enable required before calling SetAttribute(HSE_OTP_FOEM_ADKP_ATTR_ID)?
    • No it is not, there are two kinds of one time programmable words handled by the HSE2, one is called fusebox and its handled by the  hseSrvProgFuse_t service, this one requires the VDD_EFUSE to be powered, which is controlled by a GPIO pin and a transistor in the S32N55 RDB. The other kind is usually called just OTP, these do not require the VDD_EFUSE to be powered on, that is why you don't need the GPIO to be turned on.
    • You can check the power domains I am referring to in the reference manual, in particular in Figure 35. FSS power domains [page 241, S32N55 Reference Manual, Rev. 2, 2025-06-30] 
  3. If VGPIO fuse power enable is required, what is the correct procedure to disable it after the OTP write is complete?
    • Depends on the board, in the S32N55 RDB it is controlled by the GPIO you see in the code, however, in a custom board that can be a jumper o an 0ohm resistor. Therefore in the RDB you can just turn off the pin and VDD_EFUSE will be powered off, you can also control it with J18, when having a jumper in that connector, VDD_EFUSE will be always ON, independently of the GPIO state.
  4. Are there any additional prerequisites before calling SetAttribute(HSE_OTP_FOEM_ADKP_ATTR_ID) that may not be documented?
    • I was not able to find any information that might suggest an unknown prerequisite. Have you been able to use any other HSE2 service successfully? 

Please let me know if you have any other question.


Note that, as mentioned in the other post, the S32N55 is still a pre-production and thus, my expertise on this topic is not yet at the highest level. With that said, I will try to help you as much as I can.

Re: S32N55 HSE2 - SetAttribute(HSE_OTP_FOEM_ADKP_ATTR_ID) No Response in Synchronous Mode

Hello,

We are trying to program the ADKP (Application Debug Key/Password) via HSE2 SetAttribute service on S32N55, but we are not getting any response from HSE2.

---

## Environment

- Platform: S32N55 EVB
- GrayVIP version: SW32N5_GRAYVIP_1_0_22_0
- FSS FW version: S32N_FSS_FW_R21-11_1.10.0
- EB Tresos version: 29.0.0
- Called from: FSS M7 core, inside Fss_FW_Init_Task()

---

## What We Tried

### Attempt 1: Synchronous mode (HSE_IP_REQTYPE_SYNC)
```c
xLocalDesc.srvId = HSE_SRV_ID_SET_ATTR;
pSetAttrReq->attrId = HSE_OTP_FOEM_ADKP_ATTR_ID;
pSetAttrReq->attrLen = 32U; /* hseAttrOtpFoemKey_t size */
pSetAttrReq->pAttr = Hse_Ip_ToAHBAddress((HOST_ADDR)pAttr);
RetVal = Sherpa_Cdd_Execute(&xLocalDesc); /* Sync */
```
Result: Timeout - no response from HSE2

### Attempt 2: Asynchronous mode (HSE_IP_REQTYPE_ASYNC_IRQ)
```c
g_xSherpaHseIpReq.eReqType = HSE_IP_REQTYPE_ASYNC_IRQ;
g_xSherpaHseIpReq.pfCallback = &Sherpa_Cdd_HseCallback;
/* Poll bDone flag set by IRQ callback */
while ((FALSE == g_xSherpaCallbackParam.bDone) && (u32Timeout > 0U))
{
u32Timeout--;
}
```
Result: Timeout - bDone never set to TRUE (callback never called)

### Attempt 3: With VGPIO VDD_EFUSE Power Enable
```c
/* Enable VDD_EFUSE via VGPIO */
pVgpio->OV[BANK].PMOS = (1U << PIN);
pVgpio->OV[BANK].OE |= (1U << PIN);
pVgpio->OV[BANK].OVS = (1U << PIN);
```
Result: ShutdownHook called (bus error on VGPIO register access)

---

## Current Implementation

```c
Std_ReturnType SecureDebug_SetADKP(const uint8_t* pDebugKey)
{
/* 1. Check LC == OEM_OPEN */
eRetVal = Sherpa_Cdd_GetAttribute(HSE_OTP_LIFECYCLE_ATTR_ID, ...);
if (HSE_LC_OEM_OPEN != *pLcInSharedMem) { break; }

/* 2. Check if ADKP already programmed */
eRetVal = Sherpa_Cdd_GetAttribute(HSE_OTP_FOEM_ADKP_ATTR_ID, ...);
if (E_OK == eRetVal) { /* Already programmed */ break; }

/* 3. Copy 32-byte key to non-cacheable shared buffer */
memcpy(pAdkpInSharedMem, pDebugKey, HSE_OTP_FOEM_KEY_SIZE);
__DMB();
__DSB();

/* 4. SetAttribute */
eRetVal = Sherpa_Cdd_SetAttribute(
HSE_OTP_FOEM_ADKP_ATTR_ID,
HSE_OTP_FOEM_KEY_SIZE, /* 32 bytes */
(void*)pAdkpInSharedMem);
}
```

---

## Questions

1. According to HSE2 Firmware Reference Manual Figure 12, if Input size == 16, HSE treats it as a plain AES-128 key. If Input size != 16, HSE treats it as a key handle. Is the ADKP size for S32N55 HSE2 16 bytes (AES-128) or 32 bytes?

2. Is VDD_EFUSE power (J18 jumper or VGPIO) required for HSE_OTP_FOEM_ADKP_ATTR_ID SetAttribute? (Previous NXP response said it is NOT required for OTP type, only for fusebox type)

3. Is Secure ADKP Provisioning (via RAM key slot + key handle) the recommended approach for S32N55 HSE2?
```c
/* Import AES-128 key to RAM slot */
SecureStorage_CipherKey_Import(RAM_SLOT, pDebugKey, 16U);
/* SetAttribute with key handle */
Sherpa_Cdd_SetAttribute(HSE_OTP_FOEM_ADKP_ATTR_ID,
sizeof(hseKeyHandle_t),
&keyHandle);
```

4. Is there a prerequisite step (e.g. ADKP_MASTER fuse setting) before programming ADKP that we might be missing?

5. What is the correct MU instance to use for HSE_OTP_FOEM_ADKP_ATTR_ID SetAttribute on S32N55?

Re: S32N55 HSE2 - SetAttribute(HSE_OTP_FOEM_ADKP_ATTR_ID) No Response in Synchronous Mode

Hello @EddiePark,

I will need to contact the internal team for a more specialized support about this. I will get back to you once I have an update from them.


Thanks in advance for your patience.

Re: S32N55 HSE2 - SetAttribute(HSE_OTP_FOEM_ADKP_ATTR_ID) No Response in Synchronous Mode

Hello @EddiePark,

I have received feedback, amazingly fast I must point out. In the release notes for for S32N5 HSE Firmware 1.0.24.0, the following is mentioned:

HSE is going in shutdown while setting/getting key related OTP fuse like SRKH/ODAK, ADKP, MCK using SET/GET ATTR for OTP fuse.

So, if you are using a version older than 1.0.24.0 this might be the reason for the issue. Please note that I needed to refresh my licenses for the S32N HSE FW to access version 1.0.24.0, so if you cannot already see that version (or newer) in your account you may need to contact your NXP representative to activate it.


Please retest with a version 1.0.24.0 or newer and let me know if the behavior changed.


Re: S32N55 HSE2 - SetAttribute(HSE_OTP_FOEM_ADKP_ATTR_ID) No Response in Synchronous Mode

Hi

Thank you for your early response.

I will test using HSE_FW_S32N5_1_0_24_0.

I will get back to you for the result of test

Re: S32N55 HSE2 - SetAttribute(HSE_OTP_FOEM_ADKP_ATTR_ID) No Response in Synchronous Mode

Hello,

Thank you for your previous response regarding HSE_FW_S32N5_1_0_24_0.

We have retested with HSE_FW_S32N5_1_0_24_0 and would like to share our results and ask one additional question.

---

## Update 1: ADKP Provisioning Result

After upgrading to HSE_FW_S32N5_1_0_24_0, the ADKP provisioning is now working correctly.

We confirmed the ADKP is successfully programmed by calling GetAttribute(HSE_OTP_FOEM_ADKP_ATTR_ID), which returns E_OK with a SHA3_384 reference value.

The previous timeout/shutdown issue (reported in the release notes as a bug in versions older than 1.0.24.0) is now resolved.

---

## Update 2: Call Location

We found that the call location also matters.
The SetAttribute(HSE_OTP_FOEM_ADKP_ATTR_ID) must be called AFTER Fss_Btm_PlatformApi_SetFssCohortState(FSS_BTM_COHORT_RUNNING).
Calling it earlier (e.g. immediately after Crypto_43_HSE_Init) resulted in no response from HSE2.

---

## Question: VDD_EFUSE Power Enable Requirement

In our previous NXP Community post, it was stated that:
"OTP attributes (HSE_OTP_FOEM_ADKP_ATTR_ID) do NOT require VDD_EFUSE power,
unlike fusebox operations (hseSrvProgFuse_t)."

However, we would like to reconfirm this, as we attempted to enable VDD_EFUSE via VGPIO and encountered a ShutdownHook (bus error):

```c
VGPIO_Type *pVgpio = (VGPIO_Type *)SECURE_DEBUG_FUSE_VDD_ADDR;
pVgpio->OV[SECURE_DEBUG_FUSE_VDD_BANK].PMOS = (1U << SECURE_DEBUG_FUSE_VDD_PIN);
pVgpio->OV[SECURE_DEBUG_FUSE_VDD_BANK].OE |= (1U << SECURE_DEBUG_FUSE_VDD_PIN);
pVgpio->OV[SECURE_DEBUG_FUSE_VDD_BANK].OVS = (1U << SECURE_DEBUG_FUSE_VDD_PIN);
```

Questions:
1. Is VDD_EFUSE power (J18 jumper or VGPIO) truly NOT required for HSE_OTP_FOEM_ADKP_ATTR_ID SetAttribute on S32N55?
2. If VDD_EFUSE is not required, why does ADKP provisioning only work after Fss_Btm_PlatformApi_SetFssCohortState()?
Is this a timing/initialization dependency rather than a power supply issue?
3. What is the correct VGPIO address and pin configuration for VDD_EFUSE control on S32N55 EVB,
in case it is needed for other OTP operations (e.g. MCK, SRKH)?

Thank you.

タグ(1)
評価なし
バージョン履歴
最終更新日:
‎05-10-2026 05:34 AM
更新者: