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

Sketch not kept in CC1352 memory after a RESET or a power-cycle #1

Open
rei-vilo opened this issue Sep 18, 2019 · 1 comment
Open

Comments

@rei-vilo
Copy link
Member

It looks like the sketch isn't kept in the CC1352 memory after a RESET or a power-cycle.

When trying the Commissioner / Joiner example, I'm using one laptop:

  • First, connect the first board,
  • Then, build and upload Commissioner to a first board,
  • Second, disconnect the first board and connect the second one,
  • Then, build and upload Joiner to the second board,
  • Finally, connect the first board.

When pressing RESET, the Project Zero OOTB demo starts again.

#1 [ 0.027 ] �[32;1mINFO: �[30;1m(led_service.c:191) �[0mRegistered service, 5 attributes, status 0x00
#2 [ 0.028 ] �[32;1mINFO: �[30;1m(button_service.c:230) �[0mRegistered service, 7 attributes
#3 [ 0.028 ] �[32;1mINFO: �[30;1m(data_service.c:209) �[0mRegistered service, 6 attributes
#4 [ 0.029 ] �[32;1mINFO: �[30;1m(project_zero.c:660) �[0mRegistered OAD Service
#5 [ 0.029 ] �[32;1mINFO: �[30;1m(project_zero.c:2888) �[0mLeft button not held under boot, not reverting to factory.
#6 [ 0.029 ] �[32;1mINFO: �[30;1m(project_zero.c:2890) �[0mRight+Left button not held under boot, not erasing external flash.
#7 [ 0.029 ] �[32;1mINFO: �[30;1m(project_zero.c:678) �[0mOAD Image v0001
#8 [ 0.029 ] �[32;1mINFO: �[30;1m(led_service.c:207) �[0mRegistered callbacks to application. Struct @200021e4
#9 [ 0.029 ] �[32;1mINFO: �[30;1m(button_service.c:248) �[0mRegistered callbacks to application. Struct @200021ec
#10 [ 0.029 ] �[32;1mINFO: �[30;1m(data_service.c:227) �[0mRegistered callbacks to application. Struct @200021f4
#11 [ 0.029 ] �[32;1mINFO: �[30;1m(led_service.c:242) �[0mSetParameter : LED0 len: 1
#12 [ 0.029 ] �[32;1mINFO: �[30;1m(led_service.c:250) �[0mSetParameter : LED1 len: 1
#13 [ 0.029 ] �[32;1mINFO: �[30;1m(button_service.c:289) �[0mSetParameter : BUTTON0 len: 1
#14 [ 0.029 ] �[32;1mINFO: �[30;1m(button_service.c:322) �[0mTrying to send noti/ind: connHandle ffff, �[33mNoti/ind disabled�[0m
#15 [ 0.029 ] �[32;1mINFO: �[30;1m(button_service.c:300) �[0mSetParameter : BUTTON1 len: 1
#16 [ 0.029 ] �[32;1mINFO: �[30;1m(button_service.c:322) �[0mTrying to send noti/ind: connHandle ffff, �[33mNoti/ind disabled�[0m
#17 [ 0.029 ] �[32;1mINFO: �[30;1m(data_service.c:265) �[0mSetParameter : String len: 40
#18 [ 0.029 ] �[32;1mINFO: �[30;1m(data_service.c:276) �[0mSetParameter : Stream len: 20
#19 [ 0.029 ] �[32;1mINFO: �[30;1m(data_service.c:298) �[0mTrying to send noti/ind: connHandle ffff, �[33mNoti/ind disabled�[0m
#20 [ 0.034 ] �[32;1mINFO: �[30;1m(project_zero.c:1161) �[0mGAP is started. Our address: �[32m80:6F:B0:2B:33:50�[0m
#21 [ 0.035 ] �[32;1mINFO: �[30;1m(project_zero.c:1179) �[0mName in advertData array: �[33mProjectZero�[0m
#000022 [ 0.047 ] �[32;1mINFO: �[30;1m(project_zero.c:1382) �[0mAdv Set 0 Enabled

Where the sketch is uploaded, into the RAM memory? Or does the boot-loader takes the sketch from the external Flash?

@rei-vilo
Copy link
Member Author

rei-vilo commented Sep 18, 2019

Document Silicon Errata CC1352R SimpleLinkTM Wireless MCU Device Revision E lists

Advisory Sys_01 Device Might Boot Into ROM Serial Bootloader When Waking Up From Shutdown

Revisions Affected:

Revision E and earlier

Details:

For the conditions given below, the device will boot into and execute the ROM serial bootloader when waking up from Shutdown power mode. Intended behavior is to execute the application image.

  • The wake up from Shutdown must be caused by toggling or noise on the JTAG TCK pin and not by a GPIO event.
  • The Customer Configuration Section (CCFG) must have configured the bootloader with the following field values:
    – BOOTLOADER_ENABLE = 0xC5 (Bootloader enabled)
    – BL_ENABLE = 0xC5 (Bootloader pin backdoor enabled)
    – BL_PIN_NUMBER = n (any valid DIO number)

With the above prerequisites, the bootloader will be entered in the following cases:

  • The CCFG bootloader pin level (BL_LEVEL) is set to 0x0 (active low) AND the input buffer enable for the DIO defined in BL_PIN_NUMBER is disabled in register IOC.IOCFGn.IE. If the input buffer is not enabled, the DIO level will always read 0 and bootloader will be entered.
  • The input buffer controlled by IOC.IOCFGn.IE is enabled and the DIO input value is the same level as the CCFG bootloader pin level (BL_LEVEL) when entering Shutdown (GPIO input values are latched when entering Shutdown)

Please refer to the ICEMelter chapter in the CC13x2, CC26x2 SimpleLinkTM Wireless MCU Technical Reference Manual for details on how noise entering the JTAG TCK pin can wake up the device

Workarounds:

One of the following workarounds must be implemented:

  • If input buffer is not enabled, use only active high bootloader pin level (BL_LEVEL)
  • If input buffer is enabled, ensure DIO input pin level is not the same as bootloader pin level (BL_LEVEL) when entering Shutdown.

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

1 participant