Author Topic: Snap-On automotive scan tool system date not set in flash memory  (Read 3707 times)

0 Members and 1 Guest are viewing this topic.

Offline u666sa

  • Frequent Contributor
  • **
  • Posts: 443
  • Country: us
Re: Snap-On automotive scan tool system date not set in flash memory
« Reply #25 on: November 09, 2024, 10:57:27 am »
I wonder if this is possible? Lift the two pins sor SCL and SDL. Program the RTC. Then solder those pins back?

 

Online AgentfootTopic starter

  • Contributor
  • Posts: 45
  • Country: us
Re: Snap-On automotive scan tool system date not set in flash memory
« Reply #26 on: November 09, 2024, 05:53:23 pm »
I wonder if this is possible? Lift the two pins sor SCL and SDL. Program the RTC. Then solder those pins back?



Something like this may need to be done. I did order a new 1371 to try to program off the PCB. I figured that should prove if something on the PCB is preventing programing. Will have the new 1371 to try in a few days.
 

Offline u666sa

  • Frequent Contributor
  • **
  • Posts: 443
  • Country: us
Re: Snap-On automotive scan tool system date not set in flash memory
« Reply #27 on: November 09, 2024, 06:30:21 pm »
You can't try it off PCB. Because it needs PCB to work.
When you do this, microscope, smallest tip you have, smallest T12 will be fine. You can't short things on PCB with your tip, keep in mind. Nor can you short things with your tweezers. Opt for ceramic teezers, or really careful work under microscope.
 

Online AgentfootTopic starter

  • Contributor
  • Posts: 45
  • Country: us
Re: Snap-On automotive scan tool system date not set in flash memory
« Reply #28 on: November 09, 2024, 07:11:49 pm »
You can't try it off PCB. Because it needs PCB to work.
When you do this, microscope, smallest tip you have, smallest T12 will be fine. You can't short things on PCB with your tip, keep in mind. Nor can you short things with your tweezers. Opt for ceramic teezers, or really careful work under microscope.

I was confused to why you said off PCB would not work, so I checked the data sheet. I then saw the typical operating circuit does include a crystal between X1 and X2 and a resistor Between Vcc and SQW/INT.

So If I add the crystal and resistor and The raspberry pi provides the 3.3V, ground, SDA, SCL, and pull-up resistors, it should work off the PCB correct?

Edit I also now see there is a connection to the WDS pin also. Can anyone explain what this watchdog timer is or does?
« Last Edit: November 09, 2024, 07:22:52 pm by Agentfoot »
 

Offline u666sa

  • Frequent Contributor
  • **
  • Posts: 443
  • Country: us
Re: Snap-On automotive scan tool system date not set in flash memory
« Reply #29 on: November 09, 2024, 08:06:11 pm »
it should work off the PCB correct?

What happens when you disconnect the battery? RTC gets reset, correct?
So..
You would have to program it in board, with device off, then solder data lines back and turn on your device.  :horse:
 

Online AgentfootTopic starter

  • Contributor
  • Posts: 45
  • Country: us
Re: Snap-On automotive scan tool system date not set in flash memory
« Reply #30 on: November 09, 2024, 08:26:43 pm »
it should work off the PCB correct?

What happens when you disconnect the battery? RTC gets reset, correct?
So..
You would have to program it in board, with device off, then solder data lines back and turn on your device.  :horse:

I think you misunderstood my thought process. I figured if I could order a new chip and program it off the PCB then it will prove something on the PCB is preventing the onboard chip from being programed. Then I know I may have to lift a pin or do something else for the onboard chip to be programed. I unfortunately do not have a microscope for soldering so lifting a pin for me is not exactly easy. Programming the chip and then soldering it to the PCB was never in my thought process because like you said it won't work.
 

Online AgentfootTopic starter

  • Contributor
  • Posts: 45
  • Country: us
Re: Snap-On automotive scan tool system date not set in flash memory
« Reply #31 on: November 09, 2024, 09:41:29 pm »
I found when I remove the micro SD card and boot the tool with no operating system the Raspberry pi does seem to find the chip.


Unfortunately the links darkspr1te mentioned in post #9 seem to be outdated. First link results in "hwclock: cannot access the hardware clock via any known method. The second link used an outdated driver.

Ill see if I can find more current information to get the programming done.

Edit- sorry for the big picture still figuring out how to use the forum.
« Last Edit: November 09, 2024, 09:43:26 pm by Agentfoot »
 

Offline u666sa

  • Frequent Contributor
  • **
  • Posts: 443
  • Country: us
Re: Snap-On automotive scan tool system date not set in flash memory
« Reply #32 on: November 09, 2024, 09:47:12 pm »
Now you just have to modify it to current date and time, insert SD and reboot.  :box:
 

Online AgentfootTopic starter

  • Contributor
  • Posts: 45
  • Country: us
Re: Snap-On automotive scan tool system date not set in flash memory
« Reply #33 on: November 10, 2024, 03:00:15 am »
Some progress was made. I received my DS1307RTC for the pi and was able to get it programmed and running with these instructions https://pimylifeup.com/raspberry-pi-rtc/.

So with my new knowledge and confidence I connected my scan tool with the DS1371RTC  back up to the pi. Im able to write the date, then read the date. But when the scan tool is restarted I can no longer read the date. It says "hwclock: ioctl9RTC_RD_TIME) to /dev/rtc0 to read the time failed: Invalid argument". Then if I write the date again it reads just fine. I tried writing the date then rebooting into the operating system but the date was still invalid.

So it seems I can temporarily write the date to the DS1371 on the tool but something prevents it from saving after a reboot. The coin cell battery is installed when this happens.
 

Offline u666sa

  • Frequent Contributor
  • **
  • Posts: 443
  • Country: us
Re: Snap-On automotive scan tool system date not set in flash memory
« Reply #34 on: November 10, 2024, 08:18:57 am »
On leg 8 there is 3 volts when scan tool is off and nothing connected to it?

 

Online AgentfootTopic starter

  • Contributor
  • Posts: 45
  • Country: us
Re: Snap-On automotive scan tool system date not set in flash memory
« Reply #35 on: November 10, 2024, 01:12:59 pm »
On leg 8 there is 3 volts when scan tool is off and nothing connected to it?



Leg 8, Vcc is always powered. It receives power from the battery when the scan tool is off. The tool provides 3.3V when it is on.
 

Online AgentfootTopic starter

  • Contributor
  • Posts: 45
  • Country: us
Re: Snap-On automotive scan tool system date not set in flash memory
« Reply #36 on: November 10, 2024, 02:09:41 pm »
It seems the ds1307 and ds1371 count and store time differently. Below is the descriptions. This must explain why I can not program the ds1371 on my tool.


The DS1371 is a real-time clock (RTC) with a I2C serial interface that provides elapsed seconds from a
user-defined starting point in a 32-bit counter (Figure 2). A 24-bit counter can be configured as either a
watchdog counter or as an alarm counter.
The time-of-day counter is a 32-bit up counter. The contents can be read or written by accessing the
address range 00h–03h. When the counter is read, the current time of day is latched into a register, which
is output on the serial data line while the counter continues to increment. Writing to the counter resets the
countdown chain for the time-of-day counter (Figure 2). The watchdog countdown chain is unaffected. If
the square-wave output is enabled and is set to 1Hz, the output resets when the countdown chain is reset.
Because the other square-wave frequencies are derived before the section of the countdown chain that is
reset, the other frequencies are unaffected by a write to the time-of-day counter.

The DS1307 is a low-power clock/calendar with 56 bytes of battery-backed SRAM. The clock/calendar provides
seconds, minutes, hours, day, date, month, and year information. The date at the end of the month is automatically
adjusted for months with fewer than 31 days, including corrections for leap year.The time and calendar information is obtained by reading the appropriate register bytes. Table 2 shows the RTC
registers. The time and calendar are set or initialized by writing the appropriate register bytes. The contents of the
time and calendar registers are in the BCD format. The day-of-week register increments at midnight. Values that
correspond to the day of week are user-defined but must be sequential (i.e., if 1 equals Sunday, then 2 equals
Monday, and so on.) Illogical time and date entries result in undefined operation. Bit 7 of Register 0 is the clock halt
(CH) bit. When this bit is set to 1, the oscillator is disabled. When cleared to 0, the oscillator is enabled. On first
application of power to the device the time and date registers are typically reset to 01/01/00 01 00:00:00
(MM/DD/YY DOW HH:MM:SS). The CH bit in the seconds register will be set to a 1. The clock can be halted
whenever the timekeeping functions are not required, which minimizes current (IBATDR).
The DS1307 can be run in either 12-hour or 24-hour mode. Bit 6 of the hours register is defined as the 12-hour or
24-hour mode-select bit. When high, the 12-hour mode is selected. In the 12-hour mode, bit 5 is the AM/PM bit with
logic high being PM. In the 24-hour mode, bit 5 is the second 10-hour bit (20 to 23 hours). The hours value must be
re-entered whenever the 12/24-hour mode bit is changed.
 

Online AgentfootTopic starter

  • Contributor
  • Posts: 45
  • Country: us
Re: Snap-On automotive scan tool system date not set in flash memory
« Reply #37 on: November 15, 2024, 03:35:30 pm »
I was able to set the time on the DS1371 chip and get my scan tool working again. It took loading a custom driver to the raspberry pi to communicate with the DS1371.

Thank you all for your help in learning how to do this!
 

Offline darkspr1te

  • Frequent Contributor
  • **
  • Posts: 390
  • Country: zm
Re: Snap-On automotive scan tool system date not set in flash memory
« Reply #38 on: November 17, 2024, 01:24:06 pm »
Well Done matey!.
You should also paste/post here the custom driver and guide to assist others in achieving this.




I know the elation you can feel when you have a situation like this and win.




darkspr1te

 

Online AgentfootTopic starter

  • Contributor
  • Posts: 45
  • Country: us
Re: Snap-On automotive scan tool system date not set in flash memory
« Reply #39 on: November 24, 2024, 12:17:06 am »
Just found out a custom driver is not needed for this on the raspberry pi. Just load and use the DS1374 driver. The time setting part is the same as the DS1371. There is some differences with the more advanced features though.
 

Offline tazarian

  • Newbie
  • Posts: 6
  • Country: us
Re: Snap-On automotive scan tool system date not set in flash memory
« Reply #40 on: January 25, 2025, 11:05:59 pm »
how were you able to add that driver im getting an error that i cant use hwclock but got it to read 68 when detecting with i2c
thanks
 

Offline tazarian

  • Newbie
  • Posts: 6
  • Country: us
Re: Snap-On automotive scan tool system date not set in flash memory
« Reply #41 on: January 25, 2025, 11:10:11 pm »
hwclock: Cannot access the Hardware Clock via any known method.
hwclock: Use the --verbose option to see the details of our search for an access method.
 

Online AgentfootTopic starter

  • Contributor
  • Posts: 45
  • Country: us
Re: Snap-On automotive scan tool system date not set in flash memory
« Reply #42 on: January 26, 2025, 01:24:52 am »
hwclock: Cannot access the Hardware Clock via any known method.
hwclock: Use the --verbose option to see the details of our search for an access method.

This will load the driver and set the driver the the correct i2c address. Then you should be able to set time.

Code: [Select]
sudo modprobe rtc-ds1374
echo ds1374 0x68 |sudo tee /sys/class/i2c-adapter/i2c-?/new_device/code]

 

Offline tazarian

  • Newbie
  • Posts: 6
  • Country: us
Re: Snap-On automotive scan tool system date not set in flash memory
« Reply #43 on: January 26, 2025, 04:29:20 am »
so that installs the driver without getting it off of github?
 

Offline tazarian

  • Newbie
  • Posts: 6
  • Country: us
Re: Snap-On automotive scan tool system date not set in flash memory
« Reply #44 on: January 26, 2025, 08:00:31 am »
 echo ds1374 0x68 |sudo tee /sys/class/i2c-adapter/i2c-?/new_device
ds1374 0x68
tee: /sys/class/i2c-adapter/i2c-1/new_device: Device or resource busy
tee: /sys/class/i2c-adapter/i2c-2/new_device: Device or resource busy
 

Online AgentfootTopic starter

  • Contributor
  • Posts: 45
  • Country: us
Re: Snap-On automotive scan tool system date not set in flash memory
« Reply #45 on: January 26, 2025, 01:36:09 pm »
The driver is already included in linux. The first line loads the driver. The second line sets it to the correct i2c address.

I never saw that error. My guess is the chip is communicating with another chip with is blocking you from communicating. Are you doing this to a solus ultra? If so take out the micro SD card and turn on the scanner. When the scanner shows the insert memory card screen you should be able to communicate with the chip.
 

Offline tazarian

  • Newbie
  • Posts: 6
  • Country: us
Re: Snap-On automotive scan tool system date not set in flash memory
« Reply #46 on: January 26, 2025, 02:13:05 pm »
yes i have solus ultra thanks
 

Offline tazarian

  • Newbie
  • Posts: 6
  • Country: us
Re: Snap-On automotive scan tool system date not set in flash memory
« Reply #47 on: January 26, 2025, 05:11:56 pm »
got it to finally work i had to just add that to the raspberry pi instead of all the other stuff and then it worked using that driver. thanks again for all your help this thing has been a thorn in my side for years. finally someone got it to work lol. i accidentally pulled battery a long time ago thinking that is what was wrong with it and nope it was just the date the whole time. there was someone on mhh auto that was able to tell me that at least. i was trying to change date with ttl usb adapter and it wouldnt do anything.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf