jventerprises
Joined: 01 Apr 2004 Posts: 43 Location: Boston
|
CAN_putd and the ECANCON register |
Posted: Wed Jan 24, 2007 10:02 am |
|
|
hi all,
i've noticed that the CAN_putd function from the CANbus dev kit contains the following. (from can-18f4580.c)
int1 can_putd(int32 id, int * data, int len, int priority, int1 ext, int1 rtr) {
int i;
int * txd0;
int port;
txd0=&TXRXBaD0;
// find emtpy transmitter
// map access bank addresses to empty transmitter
if (!TXB0CON.txreq) {
CANCON.win=CAN_WIN_TX0;
ECANCON.ewin=TX0;
port=0;
}
.......
the confusing part is that the ECANCON register bits can only be changed when in configuration mode (per the data sheet), yet this isnt done in any of the CAN examples. Am i missing somthing? _________________ Jon |
|