Login Register

Vida CEM swapping

A mid-size luxury crossover SUV, the Volvo XC90 made its debut in 2002 at the Detroit Motor Show. Recognized for its safety, practicality, and comfort, the XC90 is a popular vehicle around the world. The XC90 proved to be very popular, and very good for Volvo's sales numbers, since its introduction in model year 2003 (North America). P2 platform.
Post Reply
User avatar
RickHaleParker
Posts: 7129
Joined: 25 May 2015
Year and Model: See Signature below.
Location: Kansas
Has thanked: 8 times
Been thanked: 958 times

Re: Vida CEM swapping

Post by RickHaleParker »

T5Luke wrote: 24 Apr 2021, 04:12 I didn't mean the noise over the voltage, i meant the voice in timing. You have an scope, can you measure the time between sending and receiving, lines should stay at 2.5V for 60 to 90us. Also a logic analyzer performes very well for this task.
The scope is a 20 Mhz Analog CRO. I have never tried using it for digital signals. It might be time for me to get a DSO and/or a logic analyzer. I did RF communications. Digital is just a hobby.

I still think using the Teensy's interrupts would be a better approach to detecting Latency. That way the Teensy would tell us when events happen rather then trying to ferret out the events from a messy signal. Using the interrupts may get more consistent Latency times. Which would make detecting the correct Byte as simple as: If Latency > X+Y then Byte = true.

If I was something other then a C grasshopper. I would try the interrupt approach myself.

I do recall using hardware interrupts to time events on the old C= 64 and C= Amiga. Worked real good and was blazing fast.
⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙
1998 C70, B5234T3, 16T, AW50-42, Bosch Motronic 4.4, Special Edition package.
2003 S40, B4204T3, 14T twin scroll AW55-50/51SN, Siemens EMS 2000.
2004 S60R, B8444S TF80 AWD. Yamaha V8 conversion
2005 XC90 T6 Executive, B6294T, 4T65 AWD, Bosch Motronic 7.0.

T5Luke
Posts: 142
Joined: 11 November 2020
Year and Model: S60 T5 2001
Location: DE
Has thanked: 11 times
Been thanked: 130 times

Post by T5Luke »

The cheapest (around 10 dollars) usb analyzers are enough to analyze the bus. A anser for wrong or right code should be relatively constant.

Interrupts also have its cons, on most cpus they have a lot of overhead, they backup registers to stack and call other routines before the main task begins. So lots of cpu cycles get lost just calling an interrupt, also it is possible time is not the same for each interrupt calls. I don't know how they are handled by arduino, especially i dont know how they are handled by teensy. Normally a simple poll loop should be more precise. The arduino functions loose lots of cpu cycles just reading a pin (around 50 cycles on standard arduino), it could be less then 10 with direct port access, i dont know how much cycles get lost at teensy for just on digital read.

vtl
Posts: 4723
Joined: 16 August 2012
Year and Model: 2005 XC70
Location: Boston
Has thanked: 114 times
Been thanked: 603 times

Post by vtl »

The original idea was to detect latency as low as like 6 cycles of MCU base frequency (30 MHz for Renesas). No interrupts in the world would allow doing this, other than on CPU clocked at like 10+ GHz. Later it turned out the CAN bus cycle is always aligned at CAN clock frequency, not MCU clock. So such high the precision is not required in that case.

I've tried reading directly, but it didn't help, because the initial algorithm was misfit for the task.

Agree with T5Luke, a counterfeit $11.xx Saleae Logic clone is enough for the task. I use it all the time. When I become rich I'll buy a real one, just as a thanks to Saleae team.

User avatar
RickHaleParker
Posts: 7129
Joined: 25 May 2015
Year and Model: See Signature below.
Location: Kansas
Has thanked: 8 times
Been thanked: 958 times

Post by RickHaleParker »

T5Luke wrote: 24 Apr 2021, 06:37 The cheapest (around 10 dollars) usb analyzers are enough to analyze the bus. A anser for wrong or right code should be relatively constant.

Interrupts also have its cons, on most cpus they have a lot of overhead, they backup registers to stack and call other routines before the main task begins. So lots of cpu cycles get lost just calling an interrupt, also it is possible time is not the same for each interrupt calls. I don't know how they are handled by arduino, especially i dont know how they are handled by teensy. Normally a simple poll loop should be more precise. The arduino functions loose lots of cpu cycles just reading a pin (around 50 cycles on standard arduino), it could be less then 10 with direct port access, i dont know how much cycles get lost at teensy for just on digital read.
It looks like the $10.00 USB Logic analyzers are meant to work with certain software packages. Is there a open source application that will work with the $10.00 USB Logic analyzers?

How about we let the interrupt method be an alternative idea in case we cannot get the reliability needed. Nobody will know if or how well it works until somebody tries it. I do think using the interrupt method would eliminate the cycles between Request and Received, TX ready and TX sent as variables.
⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙
1998 C70, B5234T3, 16T, AW50-42, Bosch Motronic 4.4, Special Edition package.
2003 S40, B4204T3, 14T twin scroll AW55-50/51SN, Siemens EMS 2000.
2004 S60R, B8444S TF80 AWD. Yamaha V8 conversion
2005 XC90 T6 Executive, B6294T, 4T65 AWD, Bosch Motronic 7.0.

T5Luke
Posts: 142
Joined: 11 November 2020
Year and Model: S60 T5 2001
Location: DE
Has thanked: 11 times
Been thanked: 130 times

Post by T5Luke »

Anybody has Dice, CODE and likes to try?
Only tested 1 time on bench and it worked. CEM allows only 100 write cycles so i dont like to do endless tests.

Image

There are some small things i need to fix, if tests work 3 times i will upload here for all...

lukas743
Posts: 2
Joined: 7 November 2019
Year and Model: S60 2002
Location: Polska
Has thanked: 1 time

Post by lukas743 »

T5Luke wrote: 24 Apr 2021, 08:08 Anybody has Dice, CODE and likes to try?
Only tested 1 time on bench and it worked. CEM allows only 100 write cycles so i dont like to do endless tests.

Image

There are some small things i need to fix, if tests work 3 times i will upload here for all...
does it work in old P2 CEM? MY02. I have CEM on bench and working PIN

T5Luke
Posts: 142
Joined: 11 November 2020
Year and Model: S60 T5 2001
Location: DE
Has thanked: 11 times
Been thanked: 130 times

Post by T5Luke »

No at the moment only CEM from MY 2005 or newer, teensy can only generate code for this at the moment, when we crack the earlier CEM this way i will also modify for this...

User avatar
RickHaleParker
Posts: 7129
Joined: 25 May 2015
Year and Model: See Signature below.
Location: Kansas
Has thanked: 8 times
Been thanked: 958 times

Post by RickHaleParker »

Updated CEM list 4/24/2021

P1 CEM Part numbers.
8690719 | 8690720 | 8690721 | 8690722 | 30765471 | 30728906 | 30765015 | 31254317 | 31327215 | 31254749 | 31254903 | 31296881

P2 CEM-B (Brick shaped 1999-2004 with K-line ) Part numbers.
8645716 | 8645719 | 8688434 | 8688436 | 8688513 | 30657629 | 9494336 | 9494594 | 8645171 | 9452553 | 8645205 | 9452596 | 8602436 | 9469809 | 8645200 |

P2 CEM-L ( L shaped and marked L 2005 - 2014 ) Part numbers.
30682981 | 30682982 | 30728542 | 30765149 | 30765646 | 30786475 | 30786889 | 31282457 | 31314468 |

P2 CEM-H ( L shaped and marked H 2005 - 2007 )
30786476 | 30728539 | 30682982 | 30728357 | 30765148 | 30765643 | 30786476 | 30786890 | 30795115 | 31282455 | 31394157 | 30786579

Notes
30759114 listed as a L shaped P2 CEM unable to determine if it is a CEM-L or CEM-H.
⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙
1998 C70, B5234T3, 16T, AW50-42, Bosch Motronic 4.4, Special Edition package.
2003 S40, B4204T3, 14T twin scroll AW55-50/51SN, Siemens EMS 2000.
2004 S60R, B8444S TF80 AWD. Yamaha V8 conversion
2005 XC90 T6 Executive, B6294T, 4T65 AWD, Bosch Motronic 7.0.

User avatar
RickHaleParker
Posts: 7129
Joined: 25 May 2015
Year and Model: See Signature below.
Location: Kansas
Has thanked: 8 times
Been thanked: 958 times

Post by RickHaleParker »

vtl wrote: 24 Apr 2021, 07:00 Agree with T5Luke, a counterfeit $11.xx Saleae Logic clone is enough for the task. I use it all the time. When I become rich I'll buy a real one, just as a thanks to Saleae team.
What software are you using with the Saleae Logic clone? All the clones I looked at don't say anything about included software.
⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙⸙
1998 C70, B5234T3, 16T, AW50-42, Bosch Motronic 4.4, Special Edition package.
2003 S40, B4204T3, 14T twin scroll AW55-50/51SN, Siemens EMS 2000.
2004 S60R, B8444S TF80 AWD. Yamaha V8 conversion
2005 XC90 T6 Executive, B6294T, 4T65 AWD, Bosch Motronic 7.0.

T5Luke
Posts: 142
Joined: 11 November 2020
Year and Model: S60 T5 2001
Location: DE
Has thanked: 11 times
Been thanked: 130 times

Post by T5Luke »

They work by original software.

Post Reply
  • Similar Topics
    Replies
    Views
    Last post