[Ovmsdev] Problem with sending CAN-message

Geir Øyvind Vælidalo geir at validalo.net
Tue Jan 12 05:50:38 HKT 2016

Hi guys!

I’m trying to send a can-messages. I copied the code from the Twizy-code, but it seems to fail for me.
This is the code for sending: 
	while (TXB0CONbits.TXREQ) {}; 			<— This one is ok
	TXB0CON = 0; TXB0SIDL = (ks_send_can.id & 0x07) << 5; 
	TXB0SIDH = (ks_send_can.id >> 3); 
	TXB0D0 = ks_send_can.byte[0]; 
	TXB0D1 = ks_send_can.byte[1];
   	TXB0CON = 0b00001000;  //Mark the message for sending
	while (TXB0CONbits.TXREQ) {}; 			<— Here it hangs

TXREQ seems like it never gets cleared :-\ I have CAN Write enabled, so that is not the problem.

Any ideas? 

Best regards,

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openvehicles.com/pipermail/ovmsdev/attachments/20160111/2399b131/attachment.htm>

More information about the OvmsDev mailing list