Keil Logo

ebdata

The ebdata memory type can be only used to declare variables. You can not declare ebdata functions. This memory is accessed using 16-bit addresses and is the on-chip extended bit-addressable memory (0xF100 - 0xF1FF) of the C16x/ST10/XC16x. This memory (which is limited to 256 bytes) contains only extended SFR registers (no RAM), which can be accessed as words or as bits.

Variables declared ebdata are located in the SDATA group.

Declare ebdata variables as follows:

unsigned int ebdata eb_var;

Declare bits within an ebdata variable as follows:

struct s  {
  unsigned int b0:1;
  unsigned int b1:1;
  unsigned int b2:1;
  unsigned int b3:1;
  unsigned int b4:1;
  unsigned int b5:1;
  unsigned int b6:1;
  unsigned int b7:1;
};

struct s ebdata  v;

void main (void)  {
  if (v.b1)  {
    v.b0 = 1;
  }
}

You can use ebdata variables to access extended SFRs by:

  1. Defining the SFRs in a C source file,
  2. Compiling the file using the ORDER directive,
  3. and Using the SECTIONS linker directive to locate SFR definitions to the appropriate address. For example:
    L166 ... SECTIONS(?EB?SFRBIT%EBDATA(0F100H), ?BD?SFRBIT%BDATA(0FF00H))
    
  4. Note

    • All SFRs (including extended SFRs) are defined in the SFR Definitions Files for each supported microcontroller. While it is possible, there is no need to use the ebdata type to define SFRs.
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.