Yahoo Groups archive

Lpc2000

Index last updated: 2026-04-28 23:31 UTC

Message

Re: CAN Extended Identifiers?????????????URGENT....

2004-08-24 by embeddedjanitor

--- In lpc2000@yahoogroups.com, "luvpc2129" <luvpc2129@y...> wrote:
> I am trying to recieve messages on LPC2129 with Extended 
> Identifiers.The sample code given in the files works well for normal
> identifiers but when i tried to recieve Extended Identifiers over 
> CAN  my C1RID field reads as 0x00 or 0xFF
> i already set the CIRFS register with proper value but its still not
> reading the identifier field proerply.Has anyone faced a similar 
> problem......im open to all suggestions.
> 
> 		 C1RFS = 0X80080400;
> Regards
> Micheal

I'm using extended identifiers fine with code based on the 
LPC_CANAll.zip example. The FullCAN does not work for extended 
identifiers.

I found only one problem in LPC_CANAll. The code did not clear 
pending errors on initialisation

    ....
  pSFR = (unsigned int *) &C1MOD + offset; // Select Mode register
  *pSFR = 1; // Go into Reset mode

  // Start of added code
  pSFR = (unsigned int *) &C1CMR + offset; // Select command register
  *pSFR = 0x0E; // Clear receive buffer, data overrun, abort tx

   // End of added code

  pSFR = (unsigned int *) &C1IER + offset; // Select Interrupt Enable 
Register
  *pSFR = 0;// Disable All Interrupts
....

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.