pvvx / pvvx.github.io

web data
32 stars 33 forks source link

Telink-Flasher, changing bindkey, old bindkey is displayed after writing new bindkey #4

Closed JsBergbau closed 3 years ago

JsBergbau commented 3 years ago

After clicking "Set new Token & Bind keys" entered key reverts back to previous key. After clicking "Show all mi keys" current/correct key is shown.

KeyChange

pvvx commented 3 years ago

Most likely this is the work of cache flash. The new value is written to Flash, but the cache is not flushed. When new keys are entered, the reboot flag is set. requires updating multiple variables in memory. This update only happens on cold initialization. There is no procedure for resetting the Flash cache in the SDK and there is no answer to the question in the Telink forum "How to reset the Flash cache?".

pvvx commented 3 years ago

Changed all memcpy() -> flash_read() for mi-keys...

JsBergbau commented 3 years ago

Thanks for fixing so fast. Works now. Can you also have a look at this Pullrequest? https://github.com/pvvx/pvvx.github.io/pull/3 If you need some changes, just tell.