bugAVR C Runtime Library - Bugs: bug #31873, power_aes_enable/disable() are...

 
 

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

bug #31873: power_aes_enable/disable() are commented in power.h for xmega devices

Submitter:  Anitha Boyapati <aboyapati>
Submitted:  Tue 14 Dec 2010 06:53:21 AM UTC
   
 
Category:  Header Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Header files
Status:  Fixed Assigned to:  aboyapati
Percent Complete:  100% Open/Closed:  Closed
Release:  1.7.0 Fixed Release:  None

Wed 16 Feb 2011 08:57:15 AM UTC, comment #5: 


>> 1) PR_AES_bm is missing in the power_all_enable()/disable for xmegaA series


Yes. This was something I planned to ask in the ML and forgot. Infact the line was commented earlier. I thought there might be a reason for not including AES_bm.  Going by the history log, I think changes were not done to the methods after the initial revision.

>> 2) Xmega D series doesn't have DAC bit in PR_PA and PR_PB registers, so power_dac_enable()/disable() should be removed from power.h
>> 3)Xmega D series doesn't have USART1 bit in PR_PC, PR_PD, PR_PE and PR_PF registers, so power_usart1_enable()/disable() should be removed from power.h
>> 4) These changes should also be reflected in power_all

_enable()/disable() for Xmega D series


Thanks Usha!!

I made the necessary changes (even to AES_bm). Built and verified. The changes are present in revison 2213.

http://svn.sv.gnu.org/viewvc/?view=rev&root=avr-libc&revision=2213


Anitha Boyapati <aboyapati>
Wed 16 Feb 2011 06:52:21 AM UTC, comment #4: 

I went through the patch (file #22684).Please consider the following changes w.r.t the patch.

1) PR_AES_bm is missing in the power_all_enable()/disable for xmegaA series
2) Xmega D series doesn't have DAC bit in PR_PA and PR_PB registers, so power_dac_enable()/disable() should be removed from power.h
3)Xmega D series doesn't have USART1 bit in PR_PC, PR_PD, PR_PE and PR_PF registers, so power_usart1_enable()/disable() should be removed from power.h
4) These changes should also be reflected in  power_all
_enable()/disable() for Xmega D series

Usha <usha>
Mon 14 Feb 2011 10:29:07 AM UTC, comment #3: 

svn diff attached for future reference. Build verified.

(file #22684)

Anitha Boyapati <aboyapati>
Sat 12 Feb 2011 04:02:32 AM UTC, comment #2: 

Power management for Xmega devices is not correct. Changes made are:

1. PR_PR does not exist. It is replaced with PR_PRGEN

2. Only A series has AES, EBI and DMA bit defined. Functions to enable/disable these are separated

3. Part Description File of ATXmega256D3 does not define Power Reduction registers. This could be a bug with XML file. Since header files should match XML files, support for power reduction has been removed for ATXmega256D3. When the XML gets fixed, the corresponding support will be added in power.h

4. power_all_enable()/disable() function changes for A and D series.

5. Documentation changes for power_all_enable/disable functions. Xmegas were not included before.

Please review.


(file #22655)

Anitha Boyapati <aboyapati>
Fri 11 Feb 2011 11:36:57 AM UTC, comment #1: 

Also, I think there is no member like PR_PR. It should be PRGEN going by PR_struct

All related references (for xmega devices) to PR_PR should be changed to PR_PRGEN

Anitha Boyapati <aboyapati>
Tue 14 Dec 2010 06:53:21 AM UTC, original submission:  


For all Xmega devices, support for power_aes_enable() and power_aes_disable() were commented in power.h.

#if defined(_AVR_ATxmega16A4_) \
|| defined(_AVR_ATxmega16D4_) \
...
|| defined(_AVR_ATxmega256A3_) \
|| defined(_AVR_ATxmega256A3B_)

/*
#define power_aes_enable()  (PR_PR &= (uint8_t)~(PR_AES_bm))
#define power_aes_disable() (PR_PR |= (uint8_t)PR_AES_bm)
*/


Xmega A reference manual (Section 8.6) clearly defines Power Reduction Registers and AES bit.

http://www.atmel.com/dyn/resources/prod_documents/doc8077.pdf

Anitha Boyapati <aboyapati>

 

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

Attached Files
file #22684:  bug31873.patch added by aboyapati (9KiB - text/x-patch - Final patch with Changelog and NEWS updated)
file #22655:  bug31873.patch added by aboyapati (8KiB - text/x-patch - Initial patch file to fix Xmega issues in power.h)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by usha (Posted a comment)
  • -email is unavailable- added by aboyapati (Submitted the item)
  •  

    Follow 7 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2011-02-14 aboyapati StatusIn Progress Fixed
        Percent Complete0% 100%
        Open/ClosedOpen Closed
    2011-02-14 aboyapati Attached File- Added bug31873.patch, #22684
    2011-02-12 aboyapati StatusNone In Progress
        Assigned toNone aboyapati
    2011-02-12 aboyapati Attached File- Added bug31873.patch, #22655

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code