[Ovmsdev] Problems with IncomingFrameCan when registering two can buses.
Geir Øyvind Vælidalo
geir at validalo.net
Sat Dec 30 05:14:24 HKT 2017
I’m having problems with IncomingFrameCan when reading from two can buses from the Kia Soul. One of the can buses dies prematurely, and quite fast, with no visible errors. Most of the time it is Can2 that dies, however that is not always the case.
I tried with an almost empty IncomingFrameCan2, containing just a counter to see how many times it is called, and it varied from 15 to almost 200 before it dies.
This is the code:
RegisterCanBus(1, CAN_MODE_ACTIVE, CAN_SPEED_500KBPS);
RegisterCanBus(2, CAN_MODE_ACTIVE, CAN_SPEED_100KBPS);
…
void OvmsVehicleKiaSoulEv::IncomingFrameCan2(CAN_frame_t* p_frame)
{
uint8_t *d = p_frame->data.u8;
m_counter->SetValue( m_counter->AsInt()+1 );
}
IncomingFrameCan1 is quite verbose, but should not take too long time to process. But I have a lot of Polls on Can1:
static const OvmsVehicle::poll_pid_t vehicle_kiasoulev_polls[] =
{
{ 0x7e2, 0x7ea, VEHICLE_POLL_TYPE_OBDIIVEHICLE, 0x02, { 30, 30, 30 } }, // VIN
{ 0x7e4, 0x7ec, VEHICLE_POLL_TYPE_OBDIIGROUP, 0x01, { 30, 10, 10 } }, // BMC Diag page 01
{ 0x7e4, 0x7ec, VEHICLE_POLL_TYPE_OBDIIGROUP, 0x02, { 30, 30, 10 } }, // BMC Diag page 02
{ 0x7e4, 0x7ec, VEHICLE_POLL_TYPE_OBDIIGROUP, 0x03, { 30, 30, 10 } }, // BMC Diag page 03
{ 0x7e4, 0x7ec, VEHICLE_POLL_TYPE_OBDIIGROUP, 0x04, { 30, 30, 10 } }, // BMC Diag page 04
{ 0x7e4, 0x7ec, VEHICLE_POLL_TYPE_OBDIIGROUP, 0x05, { 30, 30, 10 } }, // BMC Diag page 05
{ 0x794, 0x79c, VEHICLE_POLL_TYPE_OBDIIGROUP, 0x02, { 30, 30, 10 } }, // OBC - On board charger
{ 0x7e2, 0x7ea, VEHICLE_POLL_TYPE_OBDIIGROUP, 0x00, { 30, 10, 10 } }, // VMCU Shift-stick
{ 0x7e2, 0x7ea, VEHICLE_POLL_TYPE_OBDIIGROUP, 0x02, { 30, 10, 0 } }, // VMCU Motor temp++
{ 0x7df, 0x7de, VEHICLE_POLL_TYPE_OBDIIGROUP, 0x06, { 30, 10, 0 } }, // TMPS
{ 0x7c5, 0x7cd, VEHICLE_POLL_TYPE_OBDIIGROUP, 0x01, { 30, 10, 0 } }, // LDC - Low voltage DC-DC
{ 0, 0, 0, 0, { 0, 0, 0 } }
};
The few times that Can2 is the one that lives on, I can’t see any metrics from Can1.
Current source can be seen here: https://github.com/goev/Open-Vehicle-Monitoring-System-3 <https://github.com/goev/Open-Vehicle-Monitoring-System-3> in case someone can take a look.
Any pointers to where I can start looking, or tips to what I can try?
Best regards,
Geir
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openvehicles.com/pipermail/ovmsdev/attachments/20171229/54c412ee/attachment.htm>
More information about the OvmsDev
mailing list