S32K358 HSE API causes reset and reports HSE_ERR_GENERAL Hi, Our project using S32K358 with HSE B firmware with AB blocks. An issue happened when executing HSE API to get attribute cause reset. As I debug, before execute API, FSR is normal image.pngimage.png After executing Mu_Ip_SetTxRegister to set MU0 TR[1] register, 2 registers reports errors FSR status is 0F600002 means channel #1 execution is inprogress image (6).pngimage (6).png GSR status is 67030001 means HSE_ERR_GENERAL image 8.pngimage 8.png I checked other program that HSE APIs work normally, after executing Mu_Ip_SetTxRegister to set MU0 TR[1] register, 2 registers are normal FSR status is 0F600000 GSR status is 00000000 How to solve this issue? Re: S32K358 HSE API causes reset and reports HSE_ERR_GENERAL Hi, We are already check and the problem does not come from interrupt. It comes from the Watchdog. We disabled the watchdog and no reset happen. Thanks. Re: S32K358 HSE API causes reset and reports HSE_ERR_GENERAL Hello, is there any update on that case ? i'm facing the same issue. the MCU S32K324 got reset after 1 sec of advancing the life cycle to OEM_PROD using the HSE firmware ? Thanks in advance Ayoub. Re: S32K358 HSE API causes reset and reports HSE_ERR_GENERAL Your new case has been assigned to the regional FAE team, so I would suggest leaving the next steps and investigation to them in order to avoid duplicating efforts.
Re: S32K358 HSE API causes reset and reports HSE_ERR_GENERAL By the time advancing HSE LC, I was using Trace32. May be the measurement time is not correct. Sorry for that. After a few tries unlocking debug port, Trace32 reports ECU continuously reset. Even if I do power off/on the board, the ECU still in reset. HaiHoangSoftware_0-1752114844597.pngHaiHoangSoftware_0-1752114844597.png How do I know which type of reset is happening (destructive/functional) and check the root cause? The debug port is secured in LC IN_FIELD. I can not unlock debug port with debug script because of this issue. Re: S32K358 HSE API causes reset and reports HSE_ERR_GENERAL If it happens 1s later, it can be anything. And it can be unrelated to life cycle advancing. I would need more details about the problem. Re: S32K358 HSE API causes reset and reports HSE_ERR_GENERAL Right after reset, the HSE secured the debug port because HSE lifecycle changed to IN_FIELD. RGM FES and DES registers can not be read right after reset. Re: S32K358 HSE API causes reset and reports HSE_ERR_GENERAL Do you know what was source of the reset? Did you check RGM FES and DES registers after the reset? If HSE firmware is installed, it is not possible to advance the life cycle using LC configuration word. There can be any value, it will be ignored when HSE firmware is installed. The life cycle can be advanced only via HSE service in this case. Regards, Lukas Re: S32K358 HSE API causes reset and reports HSE_ERR_GENERAL Hi, I did execute these command in synchronous mode. The strange thing when I call set attribute to program ADPK and config debug authorization mode, the ecu execute normally. Only when I call set attribute to change HSE LifeCycle, the API return no error, but 1 second later, the program suddenly reset. Do I need to set the Address LC configuration word before advancing HSE LifeCycle? HaiHoangSoftware_0-1751869464437.pngHaiHoangSoftware_0-1751869464437.png What will happen if the value in LC configuration word is 0x00000000? Re: S32K358 HSE API causes reset and reports HSE_ERR_GENERAL Hi, I did execute these command in synchronous mode. The strange thing when I call set attribute to program ADPK and config debug authorization mode, the ecu execute normally. Only when I call set attribute to change HSE LifeCycle, the API return no error, but 1 second later, the program suddenly reset. Do I need to set the Address LC configuration word before advancing HSE LifeCycle? HaiHoangSoftware_0-1751595287949.pngHaiHoangSoftware_0-1751595287949.png What if the value in LC configuration word is 0x00000000? Re: S32K358 HSE API causes reset and reports HSE_ERR_GENERAL My recommendation is to run the command as synchronous to avoid issues with interrupts.
A command is triggered by function Hse_Ip_ServiceRequest. And there's following sequence for asynchronous method:
lukaszadrapa_0-1751363963705.pnglukaszadrapa_0-1751363963705.png
The Mu_Ip… functions are inlined, so there’s no problem. But OsIf functions from BaseNXP module are not inlined, so you need to move them too.
Regards,
Lukas
Re: S32K358 HSE API causes reset and reports HSE_ERR_GENERAL Hi, These APIs is places in Block 1, from 0x0060FB3E. Is that safe enough for the execution? Is there any reason to cause ECU reset? HaiHoangSoftware_0-1751350485291.pngHaiHoangSoftware_0-1751350485291.png Re: S32K358 HSE API causes reset and reports HSE_ERR_GENERAL Well, there's one missing sentence: UTEST flash is programmed by HSE when life cycle is advanced. Re: S32K358 HSE API causes reset and reports HSE_ERR_GENERAL The device is not supposed to automatically reset. Most likely, this is caused by read-while-write error. Read-while-write is supported between flash blocks. However, be aware that flash block 0 and UTEST are in the same partition.
It’s shown in “Table 102. Flash block configuration” and in “21.3 UTest NVM sector” in S32K3 reference manual.
And also section “14.6.5 Synchronizing flash read/write access between HSE and application core” in HSE-B Firmware reference manual can be important for further development.
The solution is to execute the code from RAM or from another flash block.
Regards,
Lukas Re: S32K358 HSE API causes reset and reports HSE_ERR_GENERAL Hi, I resolve this issue by placing input params for set attribute API as global volatile variable. But after execute API to change life cycle successfully, the ECU automatically reset. We plan to implement change lifecycle as a UDS service but it seems to be not possible if HSE firmware auto reset ECU. Do I need to do anything to run ECU normal after change lifecycle? Re: S32K358 HSE API causes reset and reports HSE_ERR_GENERAL Hi, Follow NXP demo App, I implement a function to advance LC using Set_Attr service include 3 steps: Program ADKP Change Debug authorization mode to Password Advance HSE LC Steps 1,2 was executed normally with Mu0 instance and 1 free channel. Steps 3 always reports FSR= 0x0f600002 and GSR=67030001 Are there any step below needed: Back up IVT Address LC configuration word Do I miss anything to advance LC? HaiHoangSoftware_0-1751280488672.pngHaiHoangSoftware_0-1751280488672.png Re: S32K358 HSE API causes reset and reports HSE_ERR_GENERAL Hi @HaiHoangSoftware
The most common reason for HSE_ERR_GENERAL is invalid address provided as a parameter for HSE service. It’s either completely invalid address pointing to unimplemented memory space or HSE has no access to that memory due to XRDC configuration or there’s multibit ECC error in that memory.
It may be also caused by data cache – make sure that data cache is either disabled or that all memory resources used for communication with HSE are forced to non-cacheable memory.
If you got such error when using HSE_SRV_ID_GET_ATTR service, check the pAttr address and disable data cache for test purposes:
lukaszadrapa_0-1751023995011.pnglukaszadrapa_0-1751023995011.png
Regards,
Lukas
View full article