m6-reveng
m6-reveng copied to clipboard
Unable to find a suitable SPI speed
Not an issue, just a question:
Hello, interested by your work, I've ordered a M6 smart band to work with it.
I've (seems) correctly flashed the BluePill and soldered the three wire to the m6 band (GND, SWS, and RST), but the "tlsr82-debugger-client.py" program does not able to find the M6 band.
python3 tlsr82-debugger-client.py --serial-port /dev/ttyACM0 get_soc_id
Trying speed 2
Trying speed 3
Trying speed 4
Trying speed 5
Trying speed 6
Trying speed 7
Trying speed 8
Trying speed 9
....
many attempts later
...
Trying speed 108
Trying speed 109
Trying speed 110
Trying speed 111
Trying speed 112
Trying speed 113
Trying speed 114
Trying speed 115
Trying speed 116
Trying speed 117
Trying speed 118
Trying speed 119
Trying speed 120
Trying speed 121
Trying speed 122
Trying speed 123
Trying speed 124
Trying speed 125
Trying speed 126
Traceback (most recent call last):
File "~/m6-reveng/tlsr82-debugger-client/tlsr82-debugger-client.py", line 401, in <module>
main()
File "~/m6-reveng/tlsr82-debugger-client/tlsr82-debugger-client.py", line 397, in main
args.func(args)
File "~/m6-reveng/tlsr82-debugger-client/tlsr82-debugger-client.py", line 349, in get_soc_id_main
init_soc(args.sws_speed)
File "~/m6-reveng/tlsr82-debugger-client/tlsr82-debugger-client.py", line 267, in init_soc
find_suitable_sws_speed()
File "~/m6-reveng/tlsr82-debugger-client/tlsr82-debugger-client.py", line 109, in find_suitable_sws_speed
raise RuntimeError("Unable to find a suitable SPI speed")
RuntimeError: Unable to find a suitable SPI speed
Any tips? the only different that i've found in my m6 band, it's that there are no a the capacitor on the RST pin....
postimg.cc/G85BzphC
Hey @user-e,
The first thing I'd try is trying a few different values for this set_pgm_speed
call. You may try something like 0x05
, 0x07
and up.
It's curious that there is no capacitor on the board. The capacitor introduces a little delay in the reset, since it takes some time to charge it. If nothing else works, I'd try putting a cap there and experiment with some different values. This doc contains a "Reset charging curve", which you can use to estimate the capacitor value, or try a few different ones too.
I hope this helps.
Thanks for reply @rbaron
I've tried with other value for that set_pgm_speed call, but nothing change. So I've added a capacitor on the reset pin, i don't know the value because i've took it from a random Samsung Smartphone... Something has change, in fat now the M6 reset/reboot when the python program start, but still not working.
I've tried with a higher SLEEP_AFTER_RESET_IN_S value, and with a higher value in the set_pgm_speed call, but nothing change.
I will try some different capacitor in the next days and i will let you know!
Here a video: https://streamable.com/eh8w5n