EmbDev.net

Forum: ARM programming with GCC/GNU tools LPC-P2129 CANbus interrupt


von Abe A. (olimex)


Rate this post
0 useful
not useful
Hi,

I'm using Olimex-board LPC-P2129 and programming it with Rowley Cross
studio 1.9. I find CANbus example for this processor on the internet and
try it with Rowley Crossstudio, but it doesn't work.
Can somebody has an example with CAN in Crosstudio??

Thanks

von Martin T. (mthomas) (Moderator)


Rate this post
0 useful
not useful
Abe Abe wrote:
> Hi,
>
> I'm using Olimex-board LPC-P2129 and programming it with Rowley Cross
> studio 1.9. I find CANbus example for this processor on the internet
Link? Source-code?

> and
> try it with Rowley Crossstudio, but it doesn't work.
What does not "work"? Can you step trough the code with a debugger or at
least insert some printf/uart_puts to see where the application stops
"working". Do you have the basic startup and linker set-up correctly?
Try with a simple application like the usual "LED-blink" first, add some
interrupt-handling ("LED-Blink in Timer-ISR") and insert the CAN-code
once you have this working.

von Abe A. (olimex)


Rate this post
0 useful
not useful
Martin Thomas wrote:
> Abe Abe wrote:
>> Hi,
>>
>> I'm using Olimex-board LPC-P2129 and programming it with Rowley Cross
>> studio 1.9. I find CANbus example for this processor on the internet
> Link? Source-code?
>
>> and
>> try it with Rowley Crossstudio, but it doesn't work.
> What does not "work"? Can you step trough the code with a debugger or at
> least insert some printf/uart_puts to see where the application stops
> "working". Do you have the basic startup and linker set-up correctly?
> Try with a simple application like the usual "LED-blink" first, add some
> interrupt-handling ("LED-Blink in Timer-ISR") and insert the CAN-code
> once you have this working.

Hello, I was busy this week so I didn't have a chance to reply.

I writo a simple program:
I have 2 Olimex LPC-P2129 boards. When I press button1 on first board it
transmitts MSG with ID 1 to another board and when I press button2 on
first board it transmitts MSG with ID 2 to another board. This part of
the program works OK.

But the problem is, that on the second board I get 2 receive interrupts
for 1 message. When I get a msg with ID1 the receive interrupt occours
but after that it occours again. I don't understand why is that
happenning. Can anybody help me please?

I use the example of lpc_2129_CanAll_V110.

Thank you

Reply

Entering an e-mail address is optional. If you want to receive reply notifications by e-mail, please log in.

Rules — please read before posting

  • Post long source code as attachment, not in the text
  • Posting advertisements is forbidden.

Formatting options

  • [c]C code[/c]
  • [avrasm]AVR assembler code[/avrasm]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]




Bild automatisch verkleinern, falls nötig
Note: the original post is older than 6 months. Please don't ask any new questions in this thread, but start a new one.