CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

Checking Internal Registers

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
tranz



Joined: 10 Feb 2007
Posts: 78

View user's profile Send private message Send e-mail Yahoo Messenger MSN Messenger

Checking Internal Registers
PostPosted: Fri Dec 07, 2007 2:57 pm     Reply with quote

Hi,

I am using RTL8019as in one of my projects, I was hoping to see some internal register values of my RTL after some tests on my LCD. But it only shows the value I had defined it with. Can anyone tell me the way I can check the internal registers of the RTL8019as

Previously I used to try seeing the values of registers like this..as shown in the example code below.

Code:

#define RCR     0x0C            /* rx configuration reg for wr */
#define TCR     0x0D            /* tx configuration reg for wr */
#define DCR     0x0E            /* data configuration reg for wr */
#define IMR     0x0F            /* interrupt mask reg for wr */
.....couple of other definitions
void mactest(void)
{lcd_init();
//This is a test function, which checks the integrity of the RTL8019AS
//Implement loop back test...

NICPut(RCR, 0x00);//recieve configuration register RCR, PAR0-5 accept packet
NICPut(DCR, 0x40);

// Place NIC in LOOPBACK mode 1
 NICPut(TCR, 0x02);
////Other parameters for checking

NICPut(ISR, 0x00);

MACPut(11);
printf(lcd_putc,"ISR=%d",ISR);
printf(lcd_putc,"\nFIFO=%d",FIFO);

}
The problem is when I try to see the values of the registers, it just shows me the values which I had defined the registers with . NOT the internal values of the register. Which what I need.

Can anyone help?

Appreciate any response I can get.

Thank You



PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Fri Dec 07, 2007 4:49 pm     Reply with quote

You are only calling the NICput() function. It writes to registers.

You probably got that code from here:
http://svn.bemix.org/elcn/checkout/ethernet/Source/RTL8019AS.c?rev=1
It shows a function to read the registers:
Quote:

static void NICReset(void);
static void NICPut(BYTE reg, BYTE val);
static BYTE NICGet(BYTE reg);
static void NICSetAddr(WORD addr);
tranz



Joined: 10 Feb 2007
Posts: 78

View user's profile Send private message Send e-mail Yahoo Messenger MSN Messenger

PostPosted: Fri Dec 07, 2007 8:12 pm     Reply with quote

Hi,
Thanks for the response. I did use NICget(), but then I am not getting the value I had put in RX buffer, after the loop back test. The board I am working on works. But still I dont get the proper output. Any solutions to that?
Ostello
Guest







PostPosted: Sat Dec 08, 2007 11:50 am     Reply with quote

Hi,

Can anyone tell me who to make the PAR0-5 to accept data packet and reject packet using the CCS compiler.
tranz



Joined: 10 Feb 2007
Posts: 78

View user's profile Send private message Send e-mail Yahoo Messenger MSN Messenger

PostPosted: Sat Dec 08, 2007 3:30 pm     Reply with quote

Even after using NICGet function and displaying the values on the LCD, the LCD shows "FF" instead of the actual value put in the register.

So is there any other way of displaying the value, or have I done something wrong.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group