patchAVR C Runtime Library - Patches: patch #9659, Update eeprom_is_ready for...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

patch #9659: Update eeprom_is_ready for avrxmega3 devices

Submitter:  Pitchumani <pitchumani>
Submitted:  Thu 21 Jun 2018 06:54:18 AM UTC
   
 
Category:  None Priority:  5 - Normal
Status:  Done Privacy:  Public
Assigned to:  pitchumani Open/Closed:  Closed

Fri 29 Jun 2018 06:43:34 AM UTC, comment #1: 
Pitchumani <pitchumani>
Group Member
Thu 21 Jun 2018 06:54:18 AM UTC, original submission:  

Macro eeprom_is_ready checks NVM_STATUS register for all xmega devices. New avrxmega3 devices have NVM status register defined with new name NVMCTRL_STATUS. Below patch updates the eeprom_is_ready definition to check the eeprom busy bit based on the NVM status register.


--- avr-libc/include/avr/eeprom.h   (revision 2546)
+++ avr-libc/include/avr/eeprom.h   (working copy)
@@ -112,8 +112,10 @@
  */
 #if    defined (__DOXYGEN__)
 # define eeprom_is_ready()
-#elif  defined (__AVR_XMEGA__) && __AVR_XMEGA__
+#elif  defined (NVM_STATUS)
 # define eeprom_is_ready() bit_is_clear (NVM_STATUS, NVM_NVMBUSY_bp)
+#elif  defined (NVMCTRL_STATUS)
+# define eeprom_is_ready() bit_is_clear (NVMCTRL_STATUS, NVMCTRL_EEBUSY_bp)
 #elif  defined (DEECR)
 # define eeprom_is_ready() bit_is_clear (DEECR, BSY)
 #elif  defined (EEPE)


Pitchumani <pitchumani>
Group Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by pitchumani (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-06-29 pitchumani StatusWorks For Me Done
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code