Writing EEPROM fails if Die Temperature is queried

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

cross mob
Anonymous
Not applicable

Hi,

   

I am using the DieTemp_Start and DieTemp_Query functions periodically in my main loop. If I write data to the EEPROM it fails. I have to disable the DieTemp functions to get the EEPROM written. Is there a way to get periodic Die Temperature measurement and EEPROM writing both together ? Maybe by blocking the Temp reading when accessing  the EEPROM ?

   

Here is the update function from the main loop:

   

void UpdateDieTemp()
{
  if (DieTemp_Query(&dieTemp) == CYRET_SUCCESS)
    DieTemp_Start(); 
}
void SecondLoop()

   

 

   

Thanks

0 Likes
2 Replies
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

I would suggest you to use DieTemp_GetTemp(*int16). Your sequence of calls seem to be a bit confusing and you should read the die temp. twice. Have a look at the APIs in the datasheet.

   

 

   

Bob

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

The reason for failling is probably an unterminated read request for the temperature. The eeprom write routines query the temp to calculate the write-pulse length according to temp to ensure a reliable programming. This may fail if you leave the DieTemp APIs "hanging"

   

 

   

Bob

0 Likes