Problems with SPD/eMcem_Init()

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

Problems with SPD/eMcem_Init()

Jump to solution
1,347 Views
brunoGT88
Contributor III

i'm using MR-CANHUBK344, RTD 6.0.0 and SPD 1.0.5, when I call eMcem_Init(&eMcem_Config_0), within the function eMcem_Init in line:
/* Validate state */
if( (Std_ReturnType)E_OK == eMcem_CheckState( EMCEM_INIT_ID ) )

within the function eMcem_CheckState in line:

if( EMCEM_S_LOCKED == eMcem_DriverState )

the program goes to MemManage_Handler, I don’t know how to solve it.



My int main(void)

brunoGT88_1-1763382617999.png


Std_ReturnType eMcem_Init( const eMcem_ConfigType *pConfigPtr )

brunoGT88_2-1763382649977.png


static Std_ReturnType eMcem_CheckState( uint8 u8FuncId )

brunoGT88_3-1763382675752.png



void MemManage_Handler(void)

brunoGT88_4-1763382703983.png



thank you!

0 Kudos
Reply
1 Solution
1,313 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hello @brunoGT88,

According to the SPD 1.0.5 release notes, the drivers are compatible only with RTD 4.0.0 and RTD 5.0.0.
Therefore, using RTD 6.0.0 may lead to compatibility issues.

If you encounter a MemManage fault, it is most likely related to MPU (Memory Protection Unit) configuration.
Try the following steps:

  • Disable the MPU in the startup code (system.c), or
  • Remove the MPU_ENABLE definition from the preprocessor settings.

danielmartynek_0-1763409256466.png

Which MemManage fault is reported in the Configurable Fault Status Register (CFSR)?

https://developer.arm.com/documentation/dui0646/c/Cortex-M7-Peripherals/System-control-block/Configu...


Where is eMcem_DriverState located in memory?

What are the attributes of the MPU region that contains it?

 

Regards,

Daniel

 

 

View solution in original post

0 Kudos
Reply
4 Replies
1,314 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hello @brunoGT88,

According to the SPD 1.0.5 release notes, the drivers are compatible only with RTD 4.0.0 and RTD 5.0.0.
Therefore, using RTD 6.0.0 may lead to compatibility issues.

If you encounter a MemManage fault, it is most likely related to MPU (Memory Protection Unit) configuration.
Try the following steps:

  • Disable the MPU in the startup code (system.c), or
  • Remove the MPU_ENABLE definition from the preprocessor settings.

danielmartynek_0-1763409256466.png

Which MemManage fault is reported in the Configurable Fault Status Register (CFSR)?

https://developer.arm.com/documentation/dui0646/c/Cortex-M7-Peripherals/System-control-block/Configu...


Where is eMcem_DriverState located in memory?

What are the attributes of the MPU region that contains it?

 

Regards,

Daniel

 

 

0 Kudos
Reply
1,164 Views
brunoGT88
Contributor III

Hi @danielmartynek , sorry for the delay to respond, I tried for a few days to work with RTD 6.0.0, but to avoid work, with errors that were happening, I decided to download and install RTD 4.0.0, and eMcem worked perfectly, thank you very much for your help.

Now I have another doubt, I’m using the BIST for self-test, and I’m using the NXP’s own example - SPD_Demo as support, but after calling Bist_Run(BIST_SAFETYBOOT_CFG); the micro resets, as expected, but when it returns , it needs to return with the reasonReset == MCU_ST_DONE_RESET flag, but it always returns as MCU_POWER_ON_RESET, so the behavior is always call Bist_Run(BIST_SAFETYBOOT_CFG); and reset.

Here are some prints of my settings:

brunoGT88_0-1764020634481.png


Do I need to configure any peripherals in the RTD,  MCAL or in the SDP to work?

Thank you!



0 Kudos
Reply
1,123 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hi @brunoGT88,

Please create a new thread whenever the follow-up is unrelated to the original issue. This helps keep the discussion organized and clear.

 

Thank you,

BR, Daniel

0 Kudos
Reply
1,119 Views
brunoGT88
Contributor III

Ok, Thank you!

0 Kudos
Reply