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

Embedded ethernet kit resets

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



Joined: 18 Oct 2009
Posts: 14

View user's profile Send private message

Embedded ethernet kit resets
PostPosted: Mon Mar 15, 2010 12:04 pm     Reply with quote

I seem to be getting alot of resets in MACGetHeader, has anyone else seen this or have any ideas?

Code:
   // such as if a single SPI bit error occurs while communicating or a
   // momentary power glitch could cause this to occur in rare circumstances.
   if(header.NextPacketPointer > RXSTOP || ((BYTE_VAL*)(&header.NextPacketPointer))->bits.b0 ||
      header.StatusVector.bits.Zero ||
      header.StatusVector.bits.CRCError ||
      header.StatusVector.bits.ByteCount > 1518 ||
      !header.StatusVector.bits.ReceiveOk)
   {
      //Reset();
      printf("RESET CPU\r\n");
      reset_cpu();
   }
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Mon Mar 15, 2010 12:19 pm     Reply with quote

Add a printf statement (or statements) to display all those values in
the if() statement. Then you can see which one is causing the problem.
chrispol



Joined: 18 Oct 2009
Posts: 14

View user's profile Send private message

PostPosted: Tue Mar 16, 2010 11:58 am     Reply with quote

Good idea will do

Thanks
chrispol



Joined: 18 Oct 2009
Posts: 14

View user's profile Send private message

PostPosted: Tue Mar 16, 2010 12:10 pm     Reply with quote

Code:
Last Reset = 12
header.StatusVector.bits.CRCError
!header.StatusVector.bits.ReceiveOk

Last Reset = 0
((BYTE_VAL*)(&header.NextPacketPointer))->bits.b0
!header.StatusVector.bits.ReceiveOk

Last Reset = 0
!header.StatusVector.bits.ReceiveOk

Last Reset = 0
!header.StatusVector.bits.ReceiveOk

Last Reset = 0
!header.StatusVector.bits.ReceiveOk

Last Reset = 0
!header.StatusVector.bits.ReceiveOk

Last Reset = 0
header.StatusVector.bits.ByteCount > 1518
!header.StatusVector.bits.ReceiveOk

Last Reset = 0
!header.StatusVector.bits.ReceiveOk

Last Reset = 0
!header.StatusVector.bits.ReceiveOk

Last Reset = 0
!header.StatusVector.bits.ReceiveOk

Last Reset = 0
header.NextPacketPointer > RXSTOP
header.StatusVector.bits.Zero
header.StatusVector.bits.ByteCount > 1518

Last Reset = 0
((BYTE_VAL*)(&header.NextPacketPointer))->bits.b0
!header.StatusVector.bits.ReceiveOk

Last Reset = 0
!header.StatusVector.bits.ReceiveOk

Last Reset = 0
!header.StatusVector.bits.ReceiveOk

Last Reset = 0
!header.StatusVector.bits.ReceiveOk

Last Reset = 0
!header.StatusVector.bits.ReceiveOk

Last Reset = 0
!header.StatusVector.bits.ReceiveOk

Last Reset = 0
!header.StatusVector.bits.ReceiveOk

Last Reset = 0
header.NextPacketPointer > RXSTOP
header.StatusVector.bits.Zero
header.StatusVector.bits.ByteCount > 1518

Last Reset = 0
!header.StatusVector.bits.ReceiveOk

Last Reset = 0
!header.StatusVector.bits.ReceiveOk

Last Reset = 0
((BYTE_VAL*)(&header.NextPacketPointer))->bits.b0
!header.StatusVector.bits.ReceiveOk

Last Reset = 0
!header.StatusVector.bits.ReceiveOk

Last Reset = 0
!header.StatusVector.bits.ReceiveOk

Last Reset = 0
!header.StatusVector.bits.ReceiveOk

Last Reset = 0
!header.StatusVector.bits.ReceiveOk

Last Reset = 0
header.StatusVector.bits.ByteCount > 1518
!header.StatusVector.bits.ReceiveOk

Last Reset = 0

                                                                               


seems like a bit of all of them are triggering
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