This is the mail archive of the ecos-patches@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] stm32 uart: use 16bit register access


On 17/05/2010 12:10, Nick Garnett wrote:
Spencer Oliver<spen@spen-soft.co.uk> writes:

stm32 uart: use 16bit register access

Access all uart register using 16bit access, as per the ST docs.

The ST docs I have, RM0008 version 11 from April 2010, show these registers as 32 bits wide. The top 16 bits are alway marked as reserved, so 16 bit accesses should work and the document says "The peripheral registers can be accessed by half-words (16-bit) or words (32-bit)." Nothing that requires 16 bit accesses. Given that ST have left the 32 bit headroom, and that some of the registers are already using all 16 low order bits, I think it would be a mistake to switch to 16 bit accesses. Future versions might start using the higher order bits, and we would just have to switch back.

Was there a specific reason you wanted to use 16 bit accesses rather
than 32 bit?


I was getting a Access Fault when testing, changing to use 16bit access cured the problem for me.
This was when the Enable Usage, Bus and Mem fault handlers were enabled in hal_reset_vsr.


Looking at reference code from the stm32lib shows all the accesses as 16bit.

Oh well, just rebuilt all and working fine now :)

Cheers
Spen


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]