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

Library function clearBondStoreData() overwrites bootloader on nRF52832 #164

Closed
mholin1 opened this issue Jun 22, 2017 · 6 comments
Closed

Comments

@mholin1
Copy link

mholin1 commented Jun 22, 2017

Running "HID_test" Example from the Arduino BLEPeripheral Library on a Sparkfun nRF52832 Breakout Board as-is but running HID_test with the function clearBondStoreData() in place apparently overwrites some part of the bootloader as the board will not then boot to the application after a reset resulting in the the Softdevice, application and bootloader having to be reloaded.

@bojh
Copy link
Contributor

bojh commented Jun 26, 2017

I had the same issue working with a modified OTA bootloader on nRF52832 from the nRF5_SDK_11.0.0/examples/dfu/bootloader. You can shift your bondstore by 6 code pages, then the bondstore is starting from address: 0x79000
BLEBondStore bondStore = BLEBondStore(6);
... before binding by e.g.:
BLE.setBondStore(bondStore);

No arguments in the BondStore constructor does use the offset=0 (default) resulting to a bondstore start address 0x7F000. offset=6 does result in the start address 0x79000. The DFU bootloader area is located to 0x7A00..0x8000.
See also the memory map:
http://infocenter.nordicsemi.com Software Development Kit > nRF5 SDK > nRF5 SDK v11.0.0 > Examples > DFU bootloader examples > BLE & HCI/UART Bootloader/DFU

@mholin1
Copy link
Author

mholin1 commented Jun 26, 2017 via email

@bojh
Copy link
Contributor

bojh commented Jun 26, 2017

you are welcome - that's the benefit of open source

@mholin1
Copy link
Author

mholin1 commented Jun 26, 2017

A colleague once said engineering is the process of knocking down a brick wall only to find another just behind it. It is working better after moving the bond store but something is still up as the board still does not boot to the application after hardware reset requiring the firmware to be reloaded. Also unfortunately the Win. 10 Driver Error (issue 160) is still there. Still much appreciate the progress.

@sandeepmistry
Copy link
Owner

Closing as resolved, feel free open a pull request that changes the flash page number for the Sparkfun board.

@mholin1
Copy link
Author

mholin1 commented Aug 2, 2017 via email

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

3 participants