This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Supported chips and header files

I don't know if this is the right pace to ask, if not, I apologize, please point me on the right place, thanks.

I'm using a Winbond W925E240 and I found it in the supported chips: http://www.keil.com/dd/chip/3523.htm
I have a question on the header file for this chip.
The chip has some internal register byte addressable and some other bit addressable.

One of the bit addressable registers is the register EIP.
In the data sheet that register is described like this:

Bit: 7 6 5    4     3    2    1   0
     - - PWDI PCOMP PDIV PCID PX3 PX2

But in the header file I see only one bit defined:

/* EIP */
sbit   PWDI     = EIP^4;

I found two problem in this: first, I have no idea on why there is only the PWDI bit and not the other bits defind; second, it seems to me that the bit is not in the correct position.

I was expecting to see something like this:

sbit   PX2     = EIP^0;
sbit   PX3     = EIP^1;
sbit   PCID    = EIP^2;
sbit   PDIV    = EIP^3;
sbit   PCOMP   = EIP^4;
sbit   PWDI    = EIP^5;

Am I wrong or what?
Thanks in advance.

Parents
  • ... is not something to "believe in"

    I am confident that Keil do not buy every darn chip out there, solder it on a board, load some code and verify thet the header file is correct.

    Thus it is your responsibility to verify the header files you use.

    I do believe that Keil support will fix errors in the header files if you send them an e-mail, but that does not free you from verifying the contents.

    If you were using an extremely popular (or very traditional) derivative, I would be surprised seeing your post, but for an off brand chip I am not surprised.

    Erik

Reply
  • ... is not something to "believe in"

    I am confident that Keil do not buy every darn chip out there, solder it on a board, load some code and verify thet the header file is correct.

    Thus it is your responsibility to verify the header files you use.

    I do believe that Keil support will fix errors in the header files if you send them an e-mail, but that does not free you from verifying the contents.

    If you were using an extremely popular (or very traditional) derivative, I would be surprised seeing your post, but for an off brand chip I am not surprised.

    Erik

Children
  • I understand those aren't error free files, I just want someone to help me to decide if I was wrong or not.
    Your answer helps me a little: I assume you wrote _after_ reading the whole problem and so I'll go for a "yes, you're right, the file is wrog, correct it by yourself" interpretation.
    I'll also write to keil support to point out this mistake.
    Thanks.

  • emme,
    just like erik said - there is no way of knowing. it would be best if you contact Keil for help, as I am not sure this exotic processor has any fans here...
    good luck

  • I never use the provided header files, I always make my own.

    I much prefer a format where a search (properly defined) can give all accesses to a SFR or a bit

    a small extract from one of my header files will give you the idea

    sfr     SF_TCON         = 0x88;
    //SF_TCON = 0 + SM_TCON_TF1 + SM_TCON_TR1 + SM_TCON_TF0 + SM_TCON_TR0 + SM_TCON_IE1 + SM_TCON_IT1 + SM_TCON_IE0 + SM_TCON_IT0;
      sbit    SB_TCON_IT0     = 0x88;
      sbit    SB_TCON_IE0     = 0x89;
      sbit    SB_TCON_IT1     = 0x8A;
      sbit    SB_TCON_IE1     = 0x8B;
      sbit    SB_TCON_TR0     = 0x8C;
      sbit    SB_TCON_TF0     = 0x8D;
      sbit    SB_TCON_TR1     = 0x8E;
      sbit    SB_TCON_TF1     = 0x8F;
      #define SM_TCON_TF1       0x80
      #define SM_TCON_TR1       0x40
      #define SM_TCON_TF0       0x20
      #define SM_TCON_TR0       0x10
      #define SM_TCON_IE1       0x08
      #define SM_TCON_IT1       0x04
      #define SM_TCON_IE0       0x02
      #define SM_TCON_IT0       0x01
    


    any search on TCON will give every access to that SFR, any search on TR0 will give every access to that bit whether it is used as a bit or in an AND or an OR.

    Erik

  • Erik, your example is very inspiring, I'll follow it.
    Can you please explain what SF SB and SM prefixes means?
    Thanks.

  • I'd guess at:
    SF = SFR;
    SB = sbit;
    SM = bit-mask?