I'm using the C90TFS version Beta035 with the keil IDE on the MK10FX512VLQ12 target.
I'm able to init, erase block, erase sector, verify block, verify section and FlashProgramPhrase.
But I'm not allowed to partition the flexmem. When I debug I get error code 0x4 = FTFx_ERR_ACCERR. Sometimes the unit restarts or crash in the FlashCommandSequence called from the DEFlashPartition.
It doesn't seem to be related to the EEEDataSizeCode or the DEPartitionCode. I'm not allowed to FlashEraseAllBlock blocks but I'm allowed to FlashEraseBlock so I loop through all blocks before doing the partition command.
Anny Ideas?
Hi,
The following code is based on the asm from https://community.freescale.com/message/354833#354833
nDATA0 EQU 0x20
nDATA1 EQU 0x06
DATA0 EQU nDATA0:AND:0x3F
DATA1 EQU nDATA1:AND:0x0F
; </h>
AREA |.ARM.__AT_0x100003F8|, CODE, READONLY
DCB 0xFF, 0xFF, 0xFF, 0xFF, DATA1, DATA0, 0xFF, 0xFF
END
0x06 ends up in 0x100003FC and 0x20 in 0x100003FD this should be correct according to chapter 30.3.3 Data flash IFR map.
In the FlashInit command reads of FCCOBA register for EEEDataSetSize and FCCOBB register for DEPartitionCode. These registers are set to FF and not 0x06 and 0x20. This results in DFlash size 80000hx. Expected result is 40000 and 40000
Any Ideas?
Hello,
This is the scatter file used in the application to program K70F512 Data Flash IFR:
; *************************************************************
; *** Scatter-Loading Description File generated by uVision ***
; *************************************************************
LR_IROM1 0x00000000 0x00080000 { ; load region size_region
ER_IROM1 0x00000000 0x00080000 { ; load address = execution address
.ANY (+RO)
}
}
Check also, that flash algorithm is flashing the IFR area.
Best Regards,
Luis
Her is the scatter file for my project:
LR_IROM1 0x00000000 0x00080000 { ; load region size_region
ER_IROM1 0x00000000 0x00080000 { ; load address = execution address
*.o (RESET, +First)
*(InRoot$$Sections)
.ANY (+RO)
}
RW_IRAM1 0x1FFF0000 0x00010000 { ; RW data
.ANY (+RW +ZI)
}
}
If I have understood "flashing the IFR area correct"; As mention in the previous post the asm code sets 0x06 in 0x100003FC and 0x20 in 0x100003FD. This is verified by running the asm from one project and reading the memory assignment from another. Is the IFR address correct (0x100003FC & 0x100003FD)?
Hi,
As I told you, this is for K70FX512 and the code project was coming from Keil and verified at least, for a customer. You will have to review it in your own derivative. Or contact Keil to ask for the right configturation of your derivative. Using Pemicro you can flash the locations in the connection settings (also with Keil) , with ulink you need to go in this way, running the code to flash the locations.
Luis
Hello,
Please, check my answer to this threat in case that can also help you.
https://community.freescale.com/message/354833#354833
Luis
Hello mrandreas,
Please have a look at this Application note from Keil, and also at the Reference Manual of your device.
http://www.keil.com/appnotes/files/apnt220.pdf
Regards!