HSE_ReadAdkp returning HSE_SRV_RSP_INVALID_ADDR

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

HSE_ReadAdkp returning HSE_SRV_RSP_INVALID_ADDR

Jump to solution
551 Views
Bhushan1312
Contributor I

Hello Team,

I am trying to set ADKP for S32K314 platform.

Though I am able to confirm HSE Flag Enabled and HSE FW Version using below functions:

HSEFwFlg = checkHseFwFeatureFlagEnabled();
 
(void)HSE_GetVersion_Example(&gHseFwVersion);
 
I am getting HSE_SRV_RSP_INVALID_ADDR (0x55A5A26AUL) for check_DebugPasswordProgrammed_Status() function where HSE_ReadAdkp() is called. I guess expected response when ADKP is not programmed is HSE_SRV_RSP_NOT_ALLOWED.
 
Please guide me in this.
 
Thanks,
 
Bhushan
0 Kudos
Reply
1 Solution
510 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi @Bhushan1312 

Yes, I confirmed that reading of HSE_APP_DEBUG_KEY_ATTR_ID will return error code HSE_SRV_RSP_NOT_ALLOWED when ADKP is not programmed yet.

Try to disable data cache to see if it makes a difference. All data objects used for communication with HSE must be forced to non-cacheable memory and it is quite common root cause.

Also notice that HSE can’t see DTCM memory at 0x2000_0000. This address range is visible only for core. HSE can see only DTCM backdoor addresses at 0x2100_0000. My recommendation is to use only normal RAM for communication with HSE, not DTCM.

There’s an option to enable DTCM support in Autosar Crypto driver. Then the driver checks all used addresses and it adds corresponding offset when necessary. If Crypto driver is not used, this is up to user. The best option is  - do not use DTCM for communication with HSE.

Regards,

Lukas

View solution in original post

0 Kudos
Reply
2 Replies
511 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi @Bhushan1312 

Yes, I confirmed that reading of HSE_APP_DEBUG_KEY_ATTR_ID will return error code HSE_SRV_RSP_NOT_ALLOWED when ADKP is not programmed yet.

Try to disable data cache to see if it makes a difference. All data objects used for communication with HSE must be forced to non-cacheable memory and it is quite common root cause.

Also notice that HSE can’t see DTCM memory at 0x2000_0000. This address range is visible only for core. HSE can see only DTCM backdoor addresses at 0x2100_0000. My recommendation is to use only normal RAM for communication with HSE, not DTCM.

There’s an option to enable DTCM support in Autosar Crypto driver. Then the driver checks all used addresses and it adds corresponding offset when necessary. If Crypto driver is not used, this is up to user. The best option is  - do not use DTCM for communication with HSE.

Regards,

Lukas

0 Kudos
Reply
483 Views
Bhushan1312
Contributor I

Thank You @lukaszadrapa ..

I moved HSE related data variables to Non-Cacheable SRAM and it worked for me.

 

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2263698%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EHSE_ReadAdkp%20returning%20HSE_SRV_RSP_INVALID_ADDR%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2263698%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%20Team%2C%3C%2FP%3E%3CP%3EI%20am%20trying%20to%20set%20ADKP%20for%20S32K314%20platform.%3C%2FP%3E%3CP%3EThough%20I%20am%20able%20to%20confirm%20HSE%20Flag%20Enabled%20and%20HSE%20FW%20Version%20using%20below%20functions%3A%3C%2FP%3E%3CDIV%3E%3CSPAN%3EHSEFwFlg%20%3D%20checkHseFwFeatureFlagEnabled()%3B%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E(void)HSE_GetVersion_Example(%26amp%3BgHseFwVersion)%3B%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3EI%20am%20getting%20HSE_SRV_RSP_INVALID_ADDR%20(0x55A5A26AUL)%20for%20check_DebugPasswordProgrammed_Status()%20function%20where%20HSE_ReadAdkp()%20is%20called.%20I%20guess%20expected%20response%20when%20ADKP%20is%20not%20programmed%20is%26nbsp%3BHSE_SRV_RSP_NOT_ALLOWED.%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3EPlease%20guide%20me%20in%20this.%20%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3EThanks%2C%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3EBhushan%3C%2FSPAN%3E%3C%2FDIV%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2264487%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20HSE_ReadAdkp%20returning%20HSE_SRV_RSP_INVALID_ADDR%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2264487%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%3CSPAN%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F258016%22%20target%3D%22_blank%22%3E%40Bhushan1312%3C%2FA%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%3EYes%2C%20I%20confirmed%20that%20reading%20of%20%3C%2FSPAN%3EHSE_APP_DEBUG_KEY_ATTR_ID%20will%20return%20error%20code%20H%3CSPAN%3ESE_SRV_RSP_NOT_ALLOWED%20when%20ADKP%20is%20not%20programmed%20yet.%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3ETry%20to%20disable%20data%20cache%20to%20see%20if%20it%20makes%20a%20difference.%20All%20data%20objects%20used%20for%20communication%20with%20HSE%20must%20be%20forced%20to%20non-cacheable%20memory%20and%20it%20is%20quite%20common%20root%20cause.%3C%2FP%3E%0A%3CP%3EAlso%20notice%20that%20HSE%20can%E2%80%99t%20see%20DTCM%20memory%20at%200x2000_0000.%20This%20address%20range%20is%20visible%20only%20for%20core.%20HSE%20can%20see%20only%20DTCM%20backdoor%20addresses%20at%200x2100_0000.%20My%20recommendation%20is%20to%20use%20only%20normal%20RAM%20for%20communication%20with%20HSE%2C%20not%20DTCM.%3C%2FP%3E%0A%3CP%3EThere%E2%80%99s%20an%20option%20to%20enable%20DTCM%20support%20in%20Autosar%20Crypto%20driver.%20Then%20the%20driver%20checks%20all%20used%20addresses%20and%20it%20adds%20corresponding%20offset%20when%20necessary.%20If%20Crypto%20driver%20is%20not%20used%2C%20this%20is%20up%20to%20user.%20The%20best%20option%20is%20%26nbsp%3B-%20do%20not%20use%20DTCM%20for%20communication%20with%20HSE.%3C%2FP%3E%0A%3CP%3ERegards%2C%3C%2FP%3E%0A%3CP%3ELukas%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2265702%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20HSE_ReadAdkp%20returning%20HSE_SRV_RSP_INVALID_ADDR%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2265702%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EThank%20You%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F37795%22%20target%3D%22_blank%22%3E%40lukaszadrapa%3C%2FA%3E%26nbsp%3B..%3C%2FP%3E%3CP%3EI%20moved%20HSE%20related%20data%20variables%20to%20Non-Cacheable%20SRAM%20and%20it%20worked%20for%20me.%3C%2FP%3E%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E