HardFault Error While Init Clock

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

HardFault Error While Init Clock

486 Views
daoph
Contributor I

Hi,

 

I am facing a problem while configuring the S32K344. Without I2C MCAL configuration, I can go to debug mode. However, when I add I2C MCAL configuration, I got the following error:

MemManage: The processor attempted an instruction fetch from a location that does not permit execution.

while Mcu_InitClock(McuClockSettingConfig_0) was called. Could you please help? I attached the project here.

I'm using S32K3X4EVB

0 Kudos
Reply
3 Replies

451 Views
daoph
Contributor I

Thanks for your reply,

 

I already enable the PLL & I2C peripheral clock, but the problem still persist.

daoph_0-1762837917813.png

 

0 Kudos
Reply

194 Views
Robin_Shen
NXP TechSupport
NXP TechSupport

Thank you for your patience.
Here is the reply from Software Team:

I checked the example after adding I2C, I see that the section int_sram_no_cacheable was overflowed Because I2C used quite larger spaces in that section.

The solution is that reduces using int_sram_no_cacheable

E.g: in the file ethif_port.c,  you can also remove the statement:  " __attribute__ ((section (".int_sram_no_cacheable")))" as below

__attribute__ ((section (".int_sram_no_cacheable")))

VAR_ALIGN(uint8 ethif_DataBuffer[ETH_RXBD_NUM * ETH_43_ETH_MAX_RXBUFFLEN_SUPPORTED], 64);

BTW, Please remove the preprocessor: "D_CACHE_ENABLE" if ping cannot work

Please remove D_CACHE_ENABLE if the ping cannot work LWIP_I2C.png

0 Kudos
Reply

456 Views
Robin_Shen
NXP TechSupport
NXP TechSupport

Hi 

Please configure the McuPeripheral -> Peripheral Clock Enable

Hope it helps.


Best Regards,
Robin
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "ACCEPT AS SOLUTION" button. Thank you!

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos
Reply