thansks, the error return 0xAA55A21C is due to missing some precondition. how about call Set_Attr cause cpu halt? i only do 2 steps
1. use HSE_install_FW project to install hse fw and check version ok.
2. use my app , just run Set_Attr(HSE_DEBUG_AUTH_MODE_ATTR_ID,...), then mcu halted and have to reset, then check this attr is written.
3. run Set_Attr(HSE_EXTEND_CUST_SECURITY_POLICY_ATTR_ID, ...) , then mcu halted as step2, after reset, check this value is written.
same as write ADKP. etc, i've met this in 2 samples, and every write operation always go to mcu halt. i think is there any precondtion to set?
here is my hse wrapper function, since my SDK is hse_ip servicerequest , not hse_send in most examples.
static const uint8_t MUIF = 0;
static hseSrvDescriptor_t gHseSrvDesc[HSE_IP_NUM_OF_CHANNELS_PER_MU] = {0};
static const Hse_Ip_ReqType gSyncTxOption = {HSE_IP_REQTYPE_SYNC, NULL, NULL, 1000000};
hseSrvResponse_t Set_Attr(hseAttrId_t attrId, uint32_t attrLen, void *pAttr)
{
hseSrvResponse_t ret = HSE_SRV_RSP_GENERAL_ERROR;
hseSrvDescriptor_t *pHseSrvDesc = NULL;
uint8_t ch = HSE_IP_INVALID_MU_CHANNEL_U8;
ch = Hse_Ip_GetFreeChannel(MUIF);
if (HSE_IP_INVALID_MU_CHANNEL_U8 != ch)
{
pHseSrvDesc = &gHseSrvDesc[ch];
memset(pHseSrvDesc, 0, sizeof(hseSrvDescriptor_t));
pHseSrvDesc->srvId = HSE_SRV_ID_SET_ATTR;
pHseSrvDesc->hseSrv.setAttrReq.attrId = attrId;
pHseSrvDesc->hseSrv.setAttrReq.attrLen = attrLen;
pHseSrvDesc->hseSrv.setAttrReq.pAttr = (HOST_ADDR)pAttr;
ret = Hse_Ip_ServiceRequest(MUIF, ch, &gSyncTxOption, pHseSrvDesc);
}
return ret;
}