From 5e64ec62f2c0569500bccd751955e3f2df270975 Mon Sep 17 00:00:00 2001 From: Mariano Alvira Date: Tue, 14 Apr 2009 17:43:29 -0400 Subject: [PATCH] notes about initfromflash. verified that there is important init in there. --- doc/radioinit | 3 +++ doc/ws-dis | 12 ++++++------ 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/doc/radioinit b/doc/radioinit index eb7b2cb34..5aa4ad8de 100644 --- a/doc/radioinit +++ b/doc/radioinit @@ -279,3 +279,6 @@ suspect that InitFromFlash is a factory trim for each part. Since I'm not doing that then the range and reliability are suffering. Getting the NVM to work should probably be my next step. +Debugging with JLink has shown there absolutely is init entries in the +flash set in the factory that are important. e.g. this is where the +0x00607707 number get turned into something more like 0x00685... diff --git a/doc/ws-dis b/doc/ws-dis index 5be0bc013..a57a38dd4 100644 --- a/doc/ws-dis +++ b/doc/ws-dis @@ -5460,12 +5460,12 @@ Disassembly of section P2: 00403218 : 403218: b570 push {r4, r5, r6, lr} 40321a: b08a sub sp, #40 - 40321c: 0006 lsls r6, r0, #0 // r0 has 0x1F000 from call in radioinit - 40321e: a804 add r0, sp, #16 - 403220: 2102 movs r1, #2 - 403222: 7001 strb r1, [r0, #0] // *0x1F000 = 2; - 403224: 2101 movs r1, #1 - 403226: 7101 strb r1, [r0, #4] // *0x1F000 = 1; + 40321c: 0006 lsls r6, r0, #0 // r6 gets r0 has 0x1F000 from call in radioinit + 40321e: a804 add r0, sp, #16 // r0 now points sp+16 + 403220: 2102 movs r1, #2 // r1 = 2 + 403222: 7001 strb r1, [r0, #0] // put 2 on the stack + 403224: 2101 movs r1, #1 // + 403226: 7101 strb r1, [r0, #4] // put 1 on the stack 403228: f400 fce4 bl 3bf4 // call to ROM: I assume this turns on the NVM reg 40322c: 482b ldr r0, [pc, #172] (4032dc ) r0 = &u32SystemClock 40322e: 6800 ldr r0, [r0, #0] // r0 = u32SystemClock