-
Notifications
You must be signed in to change notification settings - Fork 991
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
Fix MSD flashing for kl26z (microbit) #853
Conversation
@gerargz do you have a bit more info about why this addition was required? |
Do you know why DAPLink crashes with this code in place? What are the fault syndrome register values, and which instruction faulted? Could it be a stack overflow? If you're getting an imprecise fault, you can add this code to init to force precise faults (at small performance penalty): // Disable write buffer to make bus faults precise.
SCnSCB->ACTLR = SCnSCB_ACTLR_DISDEFWBUF_Msk; (Frankly, it's bad that DAPLink wasn't powering down debug after MSD programming all along.) |
@microbit-carlos Powering down debug after programming will reduce power consumption of the target. |
This issue might be relevant: microbit-foundation#9 |
b811ad4
to
f39e86d
Compare
I checked with micro:bit board and the problem is that the first call to read |
I also changed the checks mentioned in microbit-foundation#9 |
Disable changes in [f1bb93e] for kl26z
68d69be
to
ad474ac
Compare
* Call swd_init_debug() after reset + fix ACK checks
* Call swd_init_debug() after reset + fix ACK checks
* Call swd_init_debug() after reset + fix ACK checks
I bisected to find out when
kl26z_microbit_if
MSD flashing stopped working (DAPLink crashes). This led me to [f1bb93e]. The attached heavy-handed change fixes for gcc and armcc.@gerargz, @flit, @carlosperate: other nRF51822 platforms seem to work without this patch, but I am not sure why why it only impacts kl26z.