Hello all,
Today I've found that my self-reception stuff in lpc2xxx CAN driver
doesn't work. :-( The reason was a missed call of
cyg_drv_interrupt_acknowledge().
I really don't understand how I missed it and why the stuff worked
early. Anyway, attached file is a patch of this issue.
Best regards
Alexey Shusharin
diff -bur /opt/ecos-repo/cvs/ecos/packages/devs/can/arm/lpc2xxx/current/ChangeLog ./devs/can/arm/lpc2xxx/current/ChangeLog
--- /opt/ecos-repo/cvs/ecos/packages/devs/can/arm/lpc2xxx/current/ChangeLog 2007-08-01 13:35:31.000000000 +0700
+++ ./devs/can/arm/lpc2xxx/current/ChangeLog 2007-08-02 11:56:10.000000000 +0700
@@ -1,3 +1,8 @@
+2007-08-02 Alexey Shusharin <[EMAIL PROTECTED]>
+
+ * src/can_lpc2xxx.c: Added acknowledging call in rx interrupt
+ (self-reception part)
+
2007-07-07 Alexey Shusharin <[EMAIL PROTECTED]>
* cdl/can_lpx2xxx.cdl: Option
Только в ./devs/can/arm/lpc2xxx/current/CVS: Entries.Log
diff -bur /opt/ecos-repo/cvs/ecos/packages/devs/can/arm/lpc2xxx/current/src/can_lpc2xxx.c ./devs/can/arm/lpc2xxx/current/src/can_lpc2xxx.c
--- /opt/ecos-repo/cvs/ecos/packages/devs/can/arm/lpc2xxx/current/src/can_lpc2xxx.c 2007-08-01 13:35:32.000000000 +0700
+++ ./devs/can/arm/lpc2xxx/current/src/can_lpc2xxx.c 2007-08-02 11:10:40.000000000 +0700
@@ -1791,6 +1791,9 @@
// Clear receive buffer
HAL_WRITE_UINT32(CAN_CTRL_CMR(info), CMR_RX_RELEASE_BUF);
+ // Acknowledge a vector
+ cyg_drv_interrupt_acknowledge(vector);
+
// Exit without calling DSR
LPC2XXX_DBG_PRINT("self_rx_ISR (%p)\n", (void*) data);
return CYG_ISR_HANDLED;