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

Do not read or write feature flags from an ISR #1338

merged 1 commit into from May 25, 2017


Copy link

commented May 18, 2017


Device panic (assertion failure) occurs when DFU mode is triggered via baud rate change.


Do not read or write feature flags, which are stored in DCT, from an ISR. Users are still allowed to call such methods as System.reset() and System.dfu() from an ISR to preserve backwards compatibility.

Steps to Test

  • Try to enable DFU mode via baud rate change.
  • Check what happens with System.resetReason(), characterize the behavior.

Example App





  • User is totes amazing for contributing!
  • Contributor has signed CLA (Info here)
  • Problem and Solution clearly stated
  • Run unit/integration/application tests on device
  • Added documentation
  • Added to after merging (add links to docs and issues)

@sergeuz sergeuz added this to the 0.7.0 milestone May 18, 2017

@sergeuz sergeuz requested a review from avtolstoy May 18, 2017

@@ -1270,10 +1280,9 @@ int HAL_Feature_Set(HAL_Feature feature, bool enabled)
current |= 2; // 0bxxxxxx10 to disable the clock, any other value to enable it.
dct_write_app_data(&current, DCT_RADIO_FLAGS_OFFSET, 1);
return 0;

This comment has been minimized.

Copy link

technobly May 25, 2017


Any reason we don't use the same error checking pattern here?

int result = dct_read_app_data_copy(DCT_RADIO_FLAGS_OFFSET, &current, sizeof(current));
if (result != 0) {
    return result;
result = dct_write_app_data(&current, DCT_RADIO_FLAGS_OFFSET, 1);
if (result != 0) {
    return result;

@technobly technobly merged commit 1c5ca3b into feature/photon/wiced-3.7.0-7 May 25, 2017

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
continuous-integration/travis-ci/push The Travis CI build passed

@technobly technobly deleted the fix/dfu_from_isr branch May 25, 2017

@technobly technobly added the internal label Jun 15, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
2 participants
You can’t perform that action at this time.