2014-12-18 02:41 AM
Hello,
since ST did not respond to any license key request, and it is not possible to contact support I will try it here: I need a license key for C90LC SSD Flash Driver for Programming SPC564B74 Meanwhile I took the C90LC SSD JDP Flash Driver from a Freescale compatible device MPC564xB (where you don't need a fricking license key for any of their drivers). Since then I have strange problems executing the FlashInit function through JTAG Nexus Interface. Everything works as expected, until leaving Debug mode for executing the function (BTW: which is not only horribly explained but differently done by the PE Micro Nexus Multilink Programmer). If I do it the way described in AN4365 (http://cache.freescale.com/files/32bit/doc/app_note/AN4365.pdf?fasp=1
) the FlashInit won't be called and CPU will enter Debug mode instantly. In this case the CPUSCR returns: PC: 0xFFFFC004, IR: 0x7C0103A6, CTL: 0x0. According to PC it's somewhere in the Boot Assist Module hence I assume something went wrong. The Steps I have done: - Setup MMU as described in 4.1 - cleared interrupt vectors - Init SRAM as described in 4.2 - (5.2.2 Step 1) uploaded ssd_config structure to sram start at 0x40000000: _ssd_cfg.c90flRegBase = 0xC3F88000; _ssd_cfg.mainArrayBase = 0x00000000; _ssd_cfg.mainArraySize = 0; _ssd_cfg.pageSize = 0x0008; _ssd_cfg.shadowRowBase = 0xFFC000; _ssd_cfg.shadowRowSize = 0x4000; _ssd_cfg.lowBlockNum = 0; _ssd_cfg.highBlockNum = 0; _ssd_cfg.midBlockNum = 0; _ssd_cfg.BDMEnable = 1; - uploaded C90LC_JDP_SSD FlashInit VLE c_array driver to 0x40000028 - (5.2.2 Step 2) setup r1 as stack pointer to 0x40001FFF - (5.2.2 Step 3) setup r3 to point to ssd_config structure: 0x40000000 - (5.2.2 Step 4) setup CPUSCR with CTL: 0x00000002, IR: 0x1800D000, PC: 0x40000024, MSR: 0x00000002 - (5.2.2 Step 5) 2.8 Exit from Debug mode: - A) Clear OCR[DMDIS], OCR[DR] bits (by writing back previous read and both bits cleared value?). Note: OCR[MCLK] is referenced at 2.8 as you should leave the bit set, but it's not a valid bit of OCR rather it belongs to OSR and hence it's read only - B) Write CPUSCR (CTL, IR, PC, MSR) (Is this really necessary, since it's already done in 5.2.2 Step 4 ?) - C) Write OCMD with bits set GO, EX and RS=CPUSCR Note: According to this description I would assume that after this command DEBUG mode is left and CPU is running. In e200z4 Reference Manual there it says: ''The processor will leave the debug mode after the TAP controller Update-DR state is entered.'' So I assume something is wrong here and a write to CPUSCR is needed after that too. So I tried swapping B, and C. (that's what PE Micro Nexus Multilink is doing) - (5.2.2 Step 6) Poll OnCE Status Register (OSR) for re-entering Debug Mode - (5.2.2 Step 7) read the return value in r3 As I already said: If I do it that way the return value in r3 points still to the ssd_config structure, so FlashInit didn't execute? CPUSCR is PC: 0xFFFFC004, IR: 0x7C0103A6, CTL: 0x0 If I do it the way PE Micro Nexus Multilink does (swapping 5.2.2 Step 5: B and C): when Polling OnCE Status Register (5.2.2 Step 6) the first time I get 1000100001 (MCLK, HALT is set) then every following time 0100011000 (ERR, STOP, DEBUG is set) and even Bit 9 which should be always 1 is not set.2015-01-05 08:06 AM
Hello ehcsur ,
Sorry for the late answer,There is a nice example on Flash integration in SPC5Studio AppwizardSPC560Bxx OS-Less Flash Integration Test Application for B64XXthe Flash driver component integrates C90LC SSD Flash Driver.You can try to create SPC560ECxx OS-Less Flash Integration Test Application with B74xxand in the Flash Driver component, there is a nice documentation. Best regards2015-01-07 05:45 AM
Hello yvin.erwan.001,
thank you for your answer. Is it possible for you to answer my outstanding questions from my initial post? I have checked SPC5Studio and there is no SPC560Bxx OS-Less Flash Integration Test Application. only the following are available for B74xx:Also for other controllers there is no ''... OS-Less Flash Integration Test Application''
I even doubt that those example would help in this situation since in those examples the CPU is controlled inside from application (assumption) and not via NEXUS Debug interface. Regards2015-01-07 06:56 AM
Hello Ehcsur ,
Could you update your SPC5Studio ? (cf screenshot) B74 is part of SPC560ECxx family. Best regards Erwan ________________ Attachments : 2015-01-07_155357.png : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006I0YK&d=%2Fa%2F0X0000000baK%2FPk5n8TEMC_JEv08CJUoOgqj6p0Ey7TVbjctS.FF8QsU&asPdf=false2015-01-12 10:55 PM
what's different between mpc5604p and spc560p50l3 ?
the c90lc ssd flash driver run successfully on mpc5604p but failed on spc560p50.Thank you very much.2015-01-19 02:29 AM
Hello yvin.erwan.001,
I've updated SPC5Studio and the SPC560Bxx OS-Less Flash Integration Test Application is available now. But as expected the example controls the driver within application running on MCU. Therefore it won't help. I have to control the flash driver via Nexus Debug interface. But as stated the CPU/DEBUG-Registers do not behave as described in documentation. May you please help there?