Bitfields and reserved bits in C (maybe a silly question)

1 post / 0 new
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi all:

From some time to now I was using bit fields as a useful way to do process signalling and switching between different task my code was designed to do. But I observed that this technique is somehow "expensive" in terms of code size generated.

My question is if someone tryed successfully to place a bitfield in a reserved area (say $07($27) in the AT90S2313) and read the same which was written. May be the case that these reserved locations were untested in the fab but remain functional?

What I want is to move bit structures to a place which could be bit addressable with instructions as SBI CBI and the like, avoiding the expense of LDS rx,bf ANDI rx,K ..... and then STS bf,rx when changing a single bit in a field.

I know that ATtiny2313 (and some other AVR's) does have a bit addressable area intended for general purpose usage but I cannot have even a sample and nobody can say when this chip will enter into production (as far as I know atmel is sampling the part for qualified customers only, not my case of course)

Thanks to all