OpenSourceEBike / TSDZ2_wireless

TSDZ2_wireless
36 stars 11 forks source link

Very strange bug! #106

Closed rananna closed 3 years ago

rananna commented 3 years ago

@casainho , On the forum you asked me to change TSDZ2_FIRMWARE_MAJOR := 0 TSDZ2_FIRMWARE_MINOR := 6 in the makefile for the wireless controller Previously, I had these set to 1 for both. When I do this, the motor will not go out of initializing when I try to turn it on When I set them to 1 everything is fine. It is only a CFLAG, what is going on??

rananna commented 3 years ago

Could this be the source of the strange issues we are seeing on the forum?

casainho commented 3 years ago

I need to check when I am at the computer... Maybe just tomorrow.

rananna commented 3 years ago

On the forum I just confirmed a successful flash of the wireless remote. The wireless controller still has issues, maybe it is somehow related to this?

casainho commented 3 years ago

APP_VER_MAJOR / MINOR and not TSDZ2_FIRMWARE_MAJOR / MINOR!!

Maybe the bootloader has some bug and needs increase of APP_VER_MAJOR / MINOR, that was some idea I had.

bl_settings: $(SREC_PATH)nrfutil settings generate --family NRF52840 --application $(OUTPUT_DIRECTORY)/TSDZ2_wireless.hex --application-version-string $(APP_VER_MAJOR).$(APP_VER_MINOR).0 --bootloader-version 1 --bl-settings-version 2 $(OUTPUT_DIRECTORY)/bl_settings.hex

OTA: $(SREC_PATH)nrfutil pkg generate --hw-version 52 --sd-req 0xB9 --application-version-string $(APP_VER_MAJOR).$(APP_VER_MINOR).0 --application $(OUTPUT_DIRECTORY)/TSDZ2_wireless.hex --key-file private.key --app-boot-validation VALIDATE_ECDSA_P256_SHA256 $(OUTPUT_DIRECTORY)/TSDZ2_wireless_ota_update.zip

rananna commented 3 years ago

What does tsdz2_firmware_major/minor do?

rananna commented 3 years ago

I will give him an updated file to try.

casainho commented 3 years ago

tsdz2_firmware_major/minor - at boot, display asks motor controller for his firmware version and checks against this, only initializes the motor / sends the configurations, if the version is correct, otherwise gives an error.

rananna commented 3 years ago

Checked bootloader code.app. version shouldn't cause any issue. Had user try higher/lower version. Still an issue. He can flash wireless remote firmware, but not the controller. Ran out of ideas.

casainho commented 3 years ago

I think you should focus on the next release for today and tomorrow - I can test it tomorrow. Then we will see as everyone of us will be using it.

rananna commented 3 years ago

Ok. No more changes expected from me. I will test again today that I be sure everything works.

On the other topic found this on the Nordic site: https://devzone.nordicsemi.com/f/nordic-q-a/58618/dfu-upgraded-app-wont-boot

We use -o0, maybe try -o3?

Of course, an important question to answer is why are we not having the same issue?