Error reading Kinetis internal flash

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Error reading Kinetis internal flash

814 Views
kecart
Contributor III

I have written a bootloader for a Kinetis K61FN1M0 using CW MCU 10.6 and Processor Expert.  Immediately after PE_low_level_init(); in main() I am calling a function that looks at some values at the top of the FLASH at location 0xFFF00.  I get an error when I hit the instruction shown below at 00009ca4 that causes the code to .jump to the PE_ISR(Cpu_Interrupt) routine.  Can anyone tell me why this might be happening?  The Memory window of the IDE shows the expected values are at the location I am trying to read.

47     pAppDef = (APPLICATION_DEF_PTR)__AppInfo__;

00009c98:   mov r3,#0xff00

00009c9c:   movt r3,#0xf

00009ca0:   str r3,[r7,#4]

48     if( pAppDef->InfoVersion != 0xFFFFFFFF )

00009ca2:   ldr r3,[r7,#4]

00009ca4:   ldr r3,[r3,#12]

00009ca6:   cmp r3,#0xffffffff

00009caa:   beq Check_App_CSM+0xf2 (0x9d46); 0x00009d46

Tags (3)
2 Replies

545 Views
carlos_neri
NXP Employee
NXP Employee

I would check the value of R3 just when 0x9CA4 will be executed.

Looking at the base address, R3+12 would be 0xFFF0C which seems to be good, but my current guess is that probably the address calculated isn't 0xFFF0C but something non-even that causes a misaligned access?

545 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

can you please send me the demo project and the problem screenshot?

0 Kudos