Do you have a question? Post it now! No Registration Necessary
September 29, 2005, 3:45 pm
rate this thread
I'm (trying ...) developing an application with CAN Bean and I'm not
an expert of CAN ...
I set-up bit timing correctly (20uS) and I'm able to send messages
with SendFrame but seems that OnFullRxBuffer event is never invoked, even
OnReceiverErrorPassive/OnBusOff are never invoked, instead OnFreeTxBuffer is
This is CAN init parameters:
/* CMCR0: ??=0,??=0,??=0,SYNCH=0,TLNKEN=0,SLPAK=0,SLPRQ=0,SFTRES=1 */
CMCR0 = 1; /* CAN reset */
/* CMCR1: ??=0,??=0,??=0,??=0,??=0,LOOPB=0,WUPM=0,CLKSRC=0 */
/* CIDAC: IDAM1=0,IDAM0=0 */
CIDAR0 = 0; /* Set the acceptance code, register CIDAR0 */
CIDAR1 = 0; /* Set the acceptance code, register CIDAR1 */
CIDAR2 = 0; /* Set the acceptance code, register CIDAR2 */
CIDAR3 = 0; /* Set the acceptance code, register CIDAR3 */
CIDMR0 = 0; /* Set the acceptance mask, register CIDMR0 */
CIDMR1 = 0; /* Set the acceptance mask, register CIDMR1 */
CIDMR2 = 0; /* Set the acceptance mask, register CIDMR2 */
CIDMR3 = 0; /* Set the acceptance mask, register CIDMR3 */
/* CBTR0: SJW1=1,SJW0=1,BRP5=0,BRP4=0,BRP3=0,BRP2=1,BRP1=0,BRP0=0 */
CMCR1_CLKSRC=0; /* Select the clock source */
CMCR0 &= ~1; /* Start the device */
CRIER = 127; /* Enable interrupts */
RXFIE bit in CRIER reg is set so rx CAN interrupt is enabled,
acceptable mask is zero, so why is OnFullRxBuffer never called ... ?
I'm sending messages with CANalyzer but
Probably I'm doing many mistakes ...
I'm using CW 3.1 with PE 2.96.
Thanks a lof for any help.
Re: CW CAN Bean for HC908AZ60
which should be the same as the HC08. If you are interested,
email me at email@example.com Due to spam this
email gets changed after a couple of days so if somebody is
reading this later and wants the code you'll have to go to
my web site for a current email address.
Steven D. Letkeman BSc.
President - Zanthic Technologies Inc.
www.zanthic.com Embedded micro-controllers and CAN interfaces
www.brightan.com Automated lighting systems
- » Industrial IoT Latest Technology Research, Top Players with Current Trends and Emerging Ch...
- — Newest thread in » Embedded Programming