unable to read GPNVM bits

Go To Last Post
2 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Dear all,

 

for setting up the TCR feature I need to read back the GPNVM bits 7&8. I use the code that is posted serveral times here:

 

uint32_t ulEEFC_bits;
  EFC->EEFC_FCR = (EEFC_FCR_FKEY_PASSWD | EEFC_FCR_FCMD_GGPB);
 
  while (!(EFC->EEFC_FSR & EEFC_FSR_FRDY));
ulEEFC_bits = EFC->EEFC_FRR;

 

In the debugger I can see  that after the while() loop the expected value is in EFC_EEFC->FRR. However, reading that value into the variable ulEEFC_bits gives me always 0x00 back. Also after reading that the register the value of the register goes to 0x00. I assume that is correct because the reference manual says that with each read the next 32Bit of the result of the EFC command is given.

Any idea why I cannot copy the content of the register into a variable?

 

Best Regards

Markus

Last Edited: Thu. Jan 9, 2020 - 01:28 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

:: Morten

 

(yes, I work for Microchip, yes, I do this in my spare time, now stop sending PMs)

 

The postings on this site are my own and do not represent Microchip’s positions, strategies, or opinions.

Topic locked