Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OTA example getting 'stuck' on loading subtype 0x11 (OTA App #2) #961

Closed
jnorgan opened this issue Sep 5, 2017 · 2 comments
Closed

OTA example getting 'stuck' on loading subtype 0x11 (OTA App #2) #961

jnorgan opened this issue Sep 5, 2017 · 2 comments

Comments

@jnorgan
Copy link
Contributor

jnorgan commented Sep 5, 2017

I was using the OTA example code and after two OTAs, it was getting stuck loading only the second OTA app (subtype 0x11). It looks like the sequence value for A was incremented to 0x00000003 and since the bootloader is using the following:

return MAX(sa.ota_seq, sb.ota_seq) - 1;

get_selected_boot_partition() continues to return 2 and the bootloader loads OTA App #2 instead of cycling back to load the first slot.

I haven't dug into the ota_ops code enough to contribute a proper fix. I'm doing a hacky return (MAX(sa.ota_seq, sb.ota_seq) - 1) % 2; in the above bootloader code, but this can't be the correct fix for this.

Anyone able to help on this?

@negativekelvin
Copy link
Contributor

#955

@jnorgan
Copy link
Contributor Author

jnorgan commented Sep 6, 2017

👍 Yep. That's exactly it. Sorry for the duplicate.

@jnorgan jnorgan closed this as completed Sep 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants