-
Notifications
You must be signed in to change notification settings - Fork 3k
Fix bug in MBR for NRF52 series #6798
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
Conversation
The MBR VTOR state depends on how the application is booted. This makes it difficult to initialize the MBR correctly since a bug prevents the MBR from being initialized more than once. This commit resets the MBR and SoftDevice to a known state before initializing the MBR and setting the VTOR through the SoftDevice.
@c1728p9 this should be a more robust way of booting the device. |
#define UICR_BOOTLOADER_ADDRESS 0x10001014 | ||
#define MBR_ADDRESS 0x0 | ||
#define MBR_VTOR_ADDRESS 0x20000000 | ||
#define SOFTDEVICE_VTOR_ADDRESS 0x20000004 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is MBR_VTOR_ADDRESS
the vector table itself or a pointer to the vector table address?
|
||
/* Reset SoftDevive VTOR. */ | ||
uint32_t *softdevice_vtor_address = (uint32_t *) SOFTDEVICE_VTOR_ADDRESS; | ||
*softdevice_vtor_address = 0xFFFFFFFF; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why 0xFFFFFFFF
? Does this have a special meaning to the softdevice?
/morph build |
Build : SUCCESSBuild number : 1912 Triggering tests/morph test |
Exporter Build : SUCCESSBuild number : 1558 |
Test : SUCCESSBuild number : 1729 |
Description
The MBR VTOR state depends on how the application is booted. This makes it difficult to initialize the MBR correctly since a bug prevents the MBR from being initialized more than once.
This commit resets the MBR and SoftDevice to a known state before initializing the MBR and setting the VTOR through the SoftDevice.
Pull request type