New Revision 1B of LPC5536 Triggers Hard Fault

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

New Revision 1B of LPC5536 Triggers Hard Fault

701 Views
nobodyKnows
Contributor III

Hi,

We recently received new PCBs featuring the updated chip revision 1B of the LPC5536. However, we are encountering a hard fault when using the same firmware in the SDK function FLASH_IsFlashAreaReadable(). I've attached a screenshot that captures the step right before the system crashes into a hard fault. We are currently using SDK version 25.03.00 with MCUXpresso IDE version v24.12.

Any insights or suggestions on resolving this issue would be greatly appreciated. Thank you!

 

0 Kudos
Reply
7 Replies

662 Views
Habib_MS
NXP Employee
NXP Employee

Hello @nobodyKnows,

I did not find any changes between revisions except for the errata mentioned in chapter 5.1 "ROM.1" in the Errata sheet LPC553x, which is directly related to revision 1B. Could you verify that your FLASH_init function does what is indicated in the errata?

BR
Habib

0 Kudos
Reply

460 Views
nobodyKnows
Contributor III

Hello,

thanks a lot for your fast responds. We tried to implement the workaround according to errata sheet. But it does not help. I guess the  API location address  0x13028c41U is wrong for Rev. 1B.

 

0 Kudos
Reply

442 Views
Habib_MS
NXP Employee
NXP Employee

Hello @nobodyKnows,

Could you provide a detailed explanation of the methodology you used to implement the errata fix?

BR
Habib

0 Kudos
Reply

394 Views
nobodyKnows
Contributor III
status_t FFR_Init(flash_config_t *config);

void initFlash(){
	FLASH_Init(&flashConfig);
	FFR_Init(&flashConfig); //Workaround Chip Errata (Rev. 1B) -> ROM.1
}

 

 

0 Kudos
Reply

369 Views
Habib_MS
NXP Employee
NXP Employee

Hello @nobodyKnows,

I understand that you are using the FLASH_Init function from our SDK, and as you mentioned, you are currently using SDK version 25.03. Could you verify that this function is executing correctly? Specifically, this line:

/* Call ffr_init is required for 1B. Also OK for 0A. */
return BOOTLOADER_API_TREE_POINTER->flashDriver->ffr_init(config);

On the other hand, when you switched to the new LPC revision, did you modify any part of the hardware design?

BR
Habib

0 Kudos
Reply

208 Views
nobodyKnows
Contributor III

Hi,

Okay I see the fix is already done in API. Yes it is called and all other functions seems to work. It is just FLASH_IsFlashAreaReadable() which is not working.

Now we use this workaround:

bool flashRead (uint32_t addr, uint8_t *flashData, uint32_t size){
	status_t status;
	if(SYSCON->DIEID == 0){
		status = FLASH_IsFlashAreaReadable(&flashConfig, addr, size);
		if(status != kStatus_FLASH_Success){
			return false;
		}
	}

	status = FLASH_Read(&flashConfig, addr, flashData, size);

	return (status == kStatus_FLASH_Success);

}

 

0 Kudos
Reply

53 Views
Habib_MS
NXP Employee
NXP Employee

Hello @nobodyKnows,

I found this post which appear have the same problem, and the fix was to not use the function "FLASH_IsFlashAreaReadable", instead of this, use the FLASH_Read() HAL API call, which if the status returned an error, this means that probably the FLASH area is hidding. Which is the same flow where you are using in your workaround.

Let me ask to the internal team to obtain more information about this issue, but at the moment your workaround could be works.

BR
Habib

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2291070%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ENew%20Revision%201B%20of%20LPC5536%20Triggers%20Hard%20Fault%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2291070%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CDIV%20class%3D%22%22%3E%3CDIV%20class%3D%22%22%3E%3CDIV%20class%3D%22%22%3E%3CDIV%20class%3D%22%22%3E%3CP%3EHi%2C%3C%2FP%3E%3CP%3EWe%20recently%20received%20new%20PCBs%20featuring%20the%20updated%20chip%20revision%201B%20of%20the%20LPC5536.%20However%2C%20we%20are%20encountering%20a%20hard%20fault%20when%20using%20the%20same%20firmware%20in%20the%20SDK%20function%20FLASH_IsFlashAreaReadable().%20I've%20attached%20a%20screenshot%20that%20captures%20the%20step%20right%20before%20the%20system%20crashes%20into%20a%20hard%20fault.%20We%20are%20currently%20using%20SDK%20version%2025.03.00%20with%20MCUXpresso%20IDE%20version%20v24.12.%3C%2FP%3E%3CP%3EAny%20insights%20or%20suggestions%20on%20resolving%20this%20issue%20would%20be%20greatly%20appreciated.%20Thank%20you!%3C%2FP%3E%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FDIV%3E%3CBR%20%2F%3E%3CP%3E%E2%80%83%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2291161%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20New%20Revision%201B%20of%20LPC5536%20Triggers%20Hard%20Fault%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2291161%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F68167%22%20target%3D%22_blank%22%3E%40nobodyKnows%3C%2FA%3E%2C%3C%2FP%3E%0A%3CP%3EI%20did%20not%20find%20any%20changes%20between%20revisions%20except%20for%20the%20errata%20mentioned%20in%20chapter%205.1%20%22ROM.1%22%20in%20the%20%3CA%20href%3D%22https%3A%2F%2Fwww.nxp.com%2Fdocs%2Fen%2Ferrata%2FLPC553x_ES.pdf%22%20target%3D%22_self%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3EErrata%20sheet%20LPC553x%3C%2FA%3E%2C%20which%20is%20directly%20related%20to%20revision%201B.%20Could%20you%20verify%20that%20your%20FLASH_init%20function%20does%20what%20is%20indicated%20in%20the%20errata%3F%3CBR%20%2F%3E%3CBR%20%2F%3EBR%3CBR%20%2F%3EHabib%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2294509%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20New%20Revision%201B%20of%20LPC5536%20Triggers%20Hard%20Fault%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2294509%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F68167%22%20target%3D%22_blank%22%3E%40nobodyKnows%3C%2FA%3E%2C%3C%2FP%3E%0A%3CP%3ECould%20you%20provide%20a%20detailed%20explanation%20of%20the%20methodology%20you%20used%20to%20implement%20the%20errata%20fix%3F%3C%2FP%3E%0A%3CP%3EBR%3CBR%20%2F%3EHabib%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2294030%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20New%20Revision%201B%20of%20LPC5536%20Triggers%20Hard%20Fault%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2294030%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%2C%3C%2FP%3E%3CP%3Ethanks%20a%20lot%20for%20your%20fast%20responds.%20We%20tried%20to%20implement%20the%20workaround%20according%20to%20errata%20sheet.%20But%20it%20does%20not%20help.%20I%20guess%20the%26nbsp%3B%20API%20location%20address%26nbsp%3B%3CSPAN%3E%200x13028c41U%3C%2FSPAN%3E%26nbsp%3Bis%20wrong%20for%20Rev.%201B.%3C%2FP%3E%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2295233%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20New%20Revision%201B%20of%20LPC5536%20Triggers%20Hard%20Fault%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2295233%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F68167%22%20target%3D%22_blank%22%3E%40nobodyKnows%3C%2FA%3E%2C%3C%2FP%3E%0A%3CP%3EI%20understand%20that%20you%20are%20using%20the%20FLASH_Init%20function%20from%20our%20SDK%2C%20and%20as%20you%20mentioned%2C%20you%20are%20currently%20using%20SDK%20version%2025.03.%20Could%20you%20verify%20that%20this%20function%20is%20executing%20correctly%3F%20Specifically%2C%20this%20line%3A%3C%2FP%3E%0A%3CP%3E%3CEM%3E%2F*%20Call%20ffr_init%20is%20required%20for%201B.%20Also%20OK%20for%200A.%20*%2F%3C%2FEM%3E%3CBR%20%2F%3E%3CSTRONG%3E%3CEM%3Ereturn%20BOOTLOADER_API_TREE_POINTER-%26gt%3BflashDriver-%26gt%3Bffr_init(config)%3B%3C%2FEM%3E%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3EOn%20the%20other%20hand%2C%20when%20you%20switched%20to%20the%20new%20LPC%20revision%2C%20did%20you%20modify%20any%20part%20of%20the%20hardware%20design%3F%3C%2FP%3E%0A%3CP%3EBR%3CBR%20%2F%3EHabib%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2295749%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20New%20Revision%201B%20of%20LPC5536%20Triggers%20Hard%20Fault%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2295749%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%2C%3C%2FP%3E%3CP%3EOkay%20I%20see%20the%20fix%20is%20already%20done%20in%20API.%20Yes%20it%20is%20called%20and%20all%20other%20functions%20seems%20to%20work.%20It%20is%20just%26nbsp%3B%3CSPAN%3EFLASH_IsFlashAreaReadable()%3C%2FSPAN%3E%26nbsp%3Bwhich%20is%20not%20working.%3C%2FP%3E%3CP%3ENow%20we%20use%20this%20workaround%3A%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-c%22%3E%3CCODE%3Ebool%20flashRead%20(uint32_t%20addr%2C%20uint8_t%20*flashData%2C%20uint32_t%20size)%7B%0A%09status_t%20status%3B%0A%09if(SYSCON-%26gt%3BDIEID%20%3D%3D%200)%7B%0A%09%09status%20%3D%20FLASH_IsFlashAreaReadable(%26amp%3BflashConfig%2C%20addr%2C%20size)%3B%0A%09%09if(status%20!%3D%20kStatus_FLASH_Success)%7B%0A%09%09%09return%20false%3B%0A%09%09%7D%0A%09%7D%0A%0A%09status%20%3D%20FLASH_Read(%26amp%3BflashConfig%2C%20addr%2C%20flashData%2C%20size)%3B%0A%0A%09return%20(status%20%3D%3D%20kStatus_FLASH_Success)%3B%0A%0A%7D%3C%2FCODE%3E%3C%2FPRE%3E%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E