TLE987X Emulated EEPROM

Announcements

Webinar: Integrated solutions for smaller, simpler low-voltage motor control design.
Join the webinar to experience!

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
lock attach
Attachments are accessible only for community members.
syrine
Level 1
Level 1
5 questions asked 10 sign-ins First reply posted

Dear Infineon support team,

I am using TLE987x EvalBoard to test emulated EEPROM with the integrated circuit  TLE9872QTW40. I'm referring to this manual :

https://www.infineon.com/dgdl/Infineon-TLE987x_EvalBoard-UserManual-v02_00-EN.pdf?fileId=5546d462749... 

I make this changes in the keil workspace  :

https://community.infineon.com/t5/MOTIX-MCU/TLE987X-Emulated-EEPROM/m-p/403015#M1613 

I compiled and loaded the example code the "NVM_DATA_FLASH_HANDLING_EXAMPLE_TLE987X" in the EvalBoard with no changes.
A debug shows that it does not enter in  this condition : 

 

    if (PORT_ReadPin(0x10) == 1u)
    {
      /* Example data flash operation: */
      /* Byte0 of Page0 is read, inverted and a set of 128 bytes with */
      /* the inverted data is being prepare and stored again in Page0. */
      /* The data in Page0 gets inverted with every programming. */
      pDataFlashAddr = (uint8 *)(_pDataFlashPage0_);
      data = *pDataFlashAddr;
      memset(&TargetData, data ^ (uint8)0xFF, FlashPageSize);
      lprog_res = locProgramPage(_pDataFlashPage0_, TargetData);

      if (lprog_res.bit.GlobFail == 1u)
      {
        /* Page programming failed even with local retry */
        /* If the supply was too low, then the programming can be tried again. */
        /* If the VS is stable again then the programming should work. */
        /* If the programming failed for other reasons, then either the fail reasons are*/
        /* covered already inside the function locProgramPage() or the usage of the data*/
        /* flash gets temporarly disabled by setting the variable bDataFlashEnabled to 'false'.*/
      }

      /* Send the device into Sleep Mode, with Cyclic Wake enabled  */
      SCU_EnterSleepMode();
    }

I commented  this line only and then I compiled and loaded the code :

if (PORT_ReadPin(0x10) == 1u)


After this , I tried another load but keil cannot recognize anymore the EvalBoard and no load can be done.

I get this error

keil_mcu_error.PNG

Please find attached the example code used

Best Regards

 

 

0 Likes
1 Solution
Raj_C
Moderator
Moderator
Moderator
500 replies posted 50 likes received 250 replies posted

Hi @syrine ,

 

The reason for the device not being detected is that after commenting the line

 if (PORT_ReadPin(0x10) == 1u)

code is executing the

SCU_EnterSleepMode();

Even after pressing the reset. The code execution will reach the  SCU_EnterSleepMode(); hence device is always in sleep mode.

 

To prevent device from entering into the sleep mode please follow the following steps:

  • Use MON1 as a wake-up source, and RESET as a wake-up trigger
  • For this purpose, connect the pin RESET with pin MON1
  • Set VS below 8V (the MONx threshold is defined as VS/2, RESET drives 5V max.)
  • The output of RESET is fed into the MON1 and is recognized as a wake-up event
  • By this the device stays alive and can be reflashed after the successful flash update, the connection between RESET and MON1 can be removed, and VS can be risen again.

 

Before flashing the existing code example please make the following changes also in the project settings:

  >>Go to Debug menu->Settings->Flash Download and confirm if TLE9872QTW40 with 252k size is selected.

Raj_JC_0-1678767299767.png

 

Please let us know if you need further support.

 

Thank you

Best Regards

Raj Chaudhari

View solution in original post

0 Likes
1 Reply
Raj_C
Moderator
Moderator
Moderator
500 replies posted 50 likes received 250 replies posted

Hi @syrine ,

 

The reason for the device not being detected is that after commenting the line

 if (PORT_ReadPin(0x10) == 1u)

code is executing the

SCU_EnterSleepMode();

Even after pressing the reset. The code execution will reach the  SCU_EnterSleepMode(); hence device is always in sleep mode.

 

To prevent device from entering into the sleep mode please follow the following steps:

  • Use MON1 as a wake-up source, and RESET as a wake-up trigger
  • For this purpose, connect the pin RESET with pin MON1
  • Set VS below 8V (the MONx threshold is defined as VS/2, RESET drives 5V max.)
  • The output of RESET is fed into the MON1 and is recognized as a wake-up event
  • By this the device stays alive and can be reflashed after the successful flash update, the connection between RESET and MON1 can be removed, and VS can be risen again.

 

Before flashing the existing code example please make the following changes also in the project settings:

  >>Go to Debug menu->Settings->Flash Download and confirm if TLE9872QTW40 with 252k size is selected.

Raj_JC_0-1678767299767.png

 

Please let us know if you need further support.

 

Thank you

Best Regards

Raj Chaudhari

0 Likes