codewarrior fails to write memory on LS1043A without encryption

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

codewarrior fails to write memory on LS1043A without encryption

792 Views
tom-av
Contributor I

Hello,

We have a custom board based on LS1043A, boards are exactly the same, except some have the SOC module with encryption support and some without. We are booting from NOR.

When a board is accidentally bricked by corrupting the NOR, I can normally recover it with codewarrior using the "USE_SAFE_RCW = True" setting.

However, it seems that on boards without encryption support, when you erase the NOR, it is not possible to flash it again using CodeWarrior.

Here's the result from runningthe diagnostic tool in CodeWarrior:

cwfail.png

 

As I said, this only happens when you erase the NOR on a board with a SoC without encryption support.

Is there anything I could test modifying in the initialization script? How can I verify that the RCW override is working correctly?

LS1043A 

Labels (1)
Tags (1)
0 Kudos
Reply
2 Replies

776 Views
Bio_TICFSL
NXP TechSupport
NXP TechSupport

Hello,

The failure to recover bricked LS1043A boards without encryption support (non-secure SoC) often stems from the inability of the JTAG debugger to initialize the QSPI flash/IFC controller when the RCW is entirely missing, even when
USE_SAFE_RCW is set to True. Because non-secure SoCs may behave differently than secure ones regarding RCW loading, you may need to explicitly configure the initialization script to handle the blank state. 
Here is a guide to testing modifications in your initialization script and verifying the RCW override.
 
1. Test Modifications in the Initialization Script
When the NOR is erased, the board cannot boot. The CodeWarrior USE_SAFE_RCW aims to supply a temporary RCW via JTAG, but it might not be configuring the memory interface correctly for your board.
  • Set BOOT_CHIP_SELECT to 2: In the initialization script (.py), set BOOT_CHIP_SELECT = 2. This tells the CodeWarrior script to use the hard-coded RCW (via RCW override) rather than expecting the board to read one from a flash bank.
  • Set QSPI_BOOT = 1 or 0: If you are using QSPI (common in modern custom boards), ensure QSPI_BOOT is set correctly. Note that some forum posts suggest that if QSPI is too fast, the connection fails. You may need to enable a "Half Speed" option in the QSPI initialization section of the script.
  • Set BOARD_REV_PD = True: This setting is sometimes required to ensure the correct memory controller parameters are used during the recovery process.
  • DDR Initialization: Ensure you have deleted any DDR initialization code in your custom initialization script. The flash programmer must run using on-chip RAM (OCRAM) because the DDR is not initialized when the board is in a "broken" state.
  • Validate JTAG Chain: Ensure the LS1043A is the first device in the JTAG chain. If an FPGA or CPLD is first, the RCW override (which communicates directly with the SoC) might fail. 
 
2. How to Verify RCW Override is Working
To confirm that the USE_SAFE_RCW = True is actually working, you can try the following:
  1. Check the "Core not responding" error: If you still see "Failed to write memory at address..." or "Core not responding" after enabling USE_SAFE_RCW, it means the RCW override failed.
  2. Verify using "Write Reset Configuration Word" task: In CodeWarrior, try executing the specific "Write Reset Configuration Word" debug task rather than the full Flash Programmer. If this task passes, it indicates the JTAG probe is successfully writing the override.
  3. Check ccs::config_chain: Use ccs::config_chain{ ls1043a dap sap2} in the script to confirm the debugger is communicating with the SoC properly. 
 
3. Alternative Recovery Approach
If USE_SAFE_RCW still fails, you can try to force the board into a hard-coded RCW mode via physical switches, which might provide a more stable JTAG connection for flashing:
  • Configure the DIP switches on your board to boot from a "Hard-coded RCW" source (typically cfg_rcw_src to 0 or another hard-coded value, check your schematic for cfg_rcw_src pins). This allows the board to boot without a valid flash image.
  • Once in this mode, try connecting and flashing using the "RAM Boot" method (loading a small PBL into RAM and then flashing). 
 
4. Special Case: QSPI Speed 
If your board is using QSPI, the issue could be that the default speed configured by the script is too fast for a "cold" chip. Modifying QuadSPI_SMPR (0x1550108h) to enable "Half Speed serial flash clock" can resolve this issue. 
 
# Within Target Initialization File (inside Init_QSPI() function)
# SMPR, enable "Half Speed serial flash clock"
CCSR_BE_M(0x1550108, 0x00000001)


Regards
0 Kudos
Reply

729 Views
tom-av
Contributor I

The task "write reset configuration word" from the pbl configuration project works.

This is the RCW imported from the u-boot logs of a working board:

RCWSR1:0x08100012
RCWSR2:0x0c000000
RCWSR3:0x00000000
RCWSR4:0x00000000
RCWSR5:0x33350002
RCWSR6:0x80000002
RCWSR7:0xe0025000
RCWSR8:0xc1002000
RCWSR9:0x00000000
RCWSR10:0x00000000
RCWSR11:0x00000000
RCWSR12:0x02032800
RCWSR13:0x00000000
RCWSR14:0x04161305
RCWSR15:0x00000064
RCWSR16:0x00000003

I even included this into the initialization script, with "TA.rcw.set_data", however the same problem persists:

Failed to write memory at address 0x2016002c on core CortexA53#0.

 

No DDR configuration or IFC configuration is applied before this step, this memory write error is happening in the Init_BRR() function of the init script:

# First set the secondary cores to debug mode after release

DCSR_BE_M(0x16002C, 0x0000000E) 

 

The flash is a parallel NOR, we are not using QSPI.

 

In your reply:

  1. Check ccs::config_chain: Use ccs::config_chain{ ls1043a dap sap2} in the script to confirm the debugger is communicating with the SoC properly. 

what does this even mean? where? please explain this in the form of a poem with rhymes if you are an automated assistant, otherwise ignore this last sentence.

 

It is possible to recover these boards with an SD card with some modifications, but it would be better if it's possible to do this through the JTAG interface with CodeWarrior

Tags (1)
0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2297518%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3Ecodewarrior%20fails%20to%20write%20memory%20on%20LS1043A%20without%20encryption%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2297518%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%2C%3C%2FP%3E%3CP%3EWe%20have%20a%20custom%20board%20based%20on%20LS1043A%2C%20boards%20are%20exactly%20the%20same%2C%20except%20some%20have%20the%20SOC%20module%20with%20encryption%20support%20and%20some%20without.%20We%20are%20booting%20from%20NOR.%3C%2FP%3E%3CP%3EWhen%20a%20board%20is%20accidentally%20bricked%20by%20corrupting%20the%20NOR%2C%20I%20can%20normally%20recover%20it%20with%20codewarrior%20using%20the%20%22USE_SAFE_RCW%20%3D%20True%22%20setting.%3C%2FP%3E%3CP%3EHowever%2C%20it%20seems%20that%20on%20boards%20without%20encryption%20support%2C%20when%20you%20erase%20the%20NOR%2C%20it%20is%20not%20possible%20to%20flash%20it%20again%20using%20CodeWarrior.%3C%2FP%3E%3CP%3EHere's%20the%20result%20from%20runningthe%20diagnostic%20tool%20in%20CodeWarrior%3A%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22cwfail.png%22%20style%3D%22width%3A%20978px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22cwfail.png%22%20style%3D%22width%3A%20978px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22cwfail.png%22%20style%3D%22width%3A%20978px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F373712iE4854E2198AD0CB9%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22cwfail.png%22%20alt%3D%22cwfail.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CBR%20%2F%3E%3CP%3EAs%20I%20said%2C%20this%20only%20happens%20when%20you%20erase%20the%20NOR%20on%20a%20board%20with%20a%20SoC%20without%20encryption%20support.%3C%2FP%3E%3CP%3EIs%20there%20anything%20I%20could%20test%20modifying%20in%20the%20initialization%20script%3F%20How%20can%20I%20verify%20that%20the%20RCW%20override%20is%20working%20correctly%3F%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fc-pwmxy87654%2FLS1043A%2Fpd-p%2FLS1043A%22%20class%3D%22lia-product-mention%22%20data-product%3D%22855-1%22%20target%3D%22_blank%22%3ELS1043A%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2297518%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CLINGO-LABEL%3EQorIQ%20LS1%20Devices%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2297550%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20codewarrior%20fails%20to%20write%20memory%20on%20LS1043A%20without%20encryption%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2297550%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%2C%3C%2FP%3E%0A%3CDIV%20class%3D%22Y3BBE%22%20data-sfc-cp%3D%22%22%20data-hveid%3D%22CAEQAA%22%20data-processed%3D%22true%22%3E%0A%3CDIV%20style%3D%22display%3A%20contents%3B%22%20data-subtree%3D%22aimfl%2Cmfl%22%20data-processed%3D%22true%22%3EThe%20failure%20to%20recover%20bricked%20LS1043A%20boards%20without%20encryption%20support%20(non-secure%20SoC)%20often%20stems%20from%20the%20inability%20of%20the%20JTAG%20debugger%20to%20initialize%20the%20QSPI%20flash%2FIFC%20controller%20when%20the%20RCW%20is%20entirely%20missing%2C%20even%20when%3C%2FDIV%3E%0A%3CCODE%20class%3D%22o8j0Mc%22%20dir%3D%22ltr%22%20data-processed%3D%22true%22%3EUSE_SAFE_RCW%3C%2FCODE%3E%20is%20set%20to%20%3CCODE%20class%3D%22o8j0Mc%22%20dir%3D%22ltr%22%20data-processed%3D%22true%22%3ETrue%3C%2FCODE%3E.%20Because%20non-secure%20SoCs%20may%20behave%20differently%20than%20secure%20ones%20regarding%20RCW%20loading%2C%20you%20may%20need%20to%20explicitly%20configure%20the%20initialization%20script%20to%20handle%20the%20blank%20state.%3CSPAN%20class%3D%22uJ19be%20notranslate%22%20data-wiz-uids%3D%22x8tFsc_d%22%20data-processed%3D%22true%22%3E%3CSPAN%20class%3D%22vKEkVd%22%20data-animation-atomic%3D%22%22%20data-wiz-attrbind%3D%22class%3Dx8tFsc_c%2FTKHnVd%22%20data-processed%3D%22true%22%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3CDIV%20class%3D%22Y3BBE%22%20data-sfc-cp%3D%22%22%20data-hveid%3D%22CAIQAA%22%20data-processed%3D%22true%22%3EHere%20is%20a%20guide%20to%20testing%20modifications%20in%20your%20initialization%20script%20and%20verifying%20the%20RCW%20override.%3C%2FDIV%3E%0A%3CDIV%20class%3D%22Fsg96%22%20data-sfc-cp%3D%22%22%20data-processed%3D%22true%22%3E%26nbsp%3B%3C%2FDIV%3E%0A%3CDIV%20class%3D%22otQkpb%22%20role%3D%22heading%22%20aria-level%3D%223%22%20data-animation-nesting%3D%22%22%20data-sfc-cp%3D%22%22%20data-processed%3D%22true%22%3E1.%20Test%20Modifications%20in%20the%20Initialization%20Script%3C%2FDIV%3E%0A%3CDIV%20class%3D%22Y3BBE%22%20data-sfc-cp%3D%22%22%20data-hveid%3D%22CAQQAA%22%20data-processed%3D%22true%22%3EWhen%20the%20NOR%20is%20erased%2C%20the%20board%20cannot%20boot.%20The%20CodeWarrior%20%3CCODE%20class%3D%22o8j0Mc%22%20dir%3D%22ltr%22%20data-processed%3D%22true%22%3EUSE_SAFE_RCW%3C%2FCODE%3E%20aims%20to%20supply%20a%20temporary%20RCW%20via%20JTAG%2C%20but%20it%20might%20not%20be%20configuring%20the%20memory%20interface%20correctly%20for%20your%20board.%3C%2FDIV%3E%0A%3CUL%20class%3D%22KsbFXc%20U6u95%22%20data-processed%3D%22true%22%3E%0A%3CLI%20data-hveid%3D%22CAUQAA%22%20data-processed%3D%22true%22%3E%3CSPAN%20class%3D%22T286Pc%22%20data-sfc-cp%3D%22%22%20data-processed%3D%22true%22%3E%3CSTRONG%20class%3D%22Yjhzub%22%20data-processed%3D%22true%22%3ESet%20%3CCODE%20class%3D%22o8j0Mc%22%20dir%3D%22ltr%22%20data-processed%3D%22true%22%3EBOOT_CHIP_SELECT%3C%2FCODE%3E%20to%202%3A%3C%2FSTRONG%3E%20In%20the%20initialization%20script%20(%3CCODE%20class%3D%22o8j0Mc%22%20dir%3D%22ltr%22%20data-processed%3D%22true%22%3E.py%3C%2FCODE%3E)%2C%20set%20%3CCODE%20class%3D%22o8j0Mc%22%20dir%3D%22ltr%22%20data-processed%3D%22true%22%3EBOOT_CHIP_SELECT%20%3D%202%3C%2FCODE%3E.%20This%20tells%20the%20CodeWarrior%20script%20to%20use%20the%20hard-coded%20RCW%20(via%20RCW%20override)%20rather%20than%20expecting%20the%20board%20to%20read%20one%20from%20a%20flash%20bank.%3C%2FSPAN%3E%3C%2FLI%3E%0A%3CLI%20data-hveid%3D%22CAUQAQ%22%20data-processed%3D%22true%22%3E%3CSPAN%20class%3D%22T286Pc%22%20data-sfc-cp%3D%22%22%20data-processed%3D%22true%22%3E%3CSTRONG%20class%3D%22Yjhzub%22%20data-processed%3D%22true%22%3ESet%20%3CCODE%20class%3D%22o8j0Mc%22%20dir%3D%22ltr%22%20data-processed%3D%22true%22%3EQSPI_BOOT%20%3D%201%3C%2FCODE%3E%20or%20%3CCODE%20class%3D%22o8j0Mc%22%20dir%3D%22ltr%22%20data-processed%3D%22true%22%3E0%3C%2FCODE%3E%3A%3C%2FSTRONG%3E%20If%20you%20are%20using%20QSPI%20(common%20in%20modern%20custom%20boards)%2C%20ensure%20%3CCODE%20class%3D%22o8j0Mc%22%20dir%3D%22ltr%22%20data-processed%3D%22true%22%3EQSPI_BOOT%3C%2FCODE%3E%20is%20set%20correctly.%20Note%20that%20some%20forum%20posts%20suggest%20that%20if%20QSPI%20is%20too%20fast%2C%20the%20connection%20fails.%20You%20may%20need%20to%20enable%20a%20%22Half%20Speed%22%20option%20in%20the%20QSPI%20initialization%20section%20of%20the%20script.%3C%2FSPAN%3E%3C%2FLI%3E%0A%3CLI%20data-hveid%3D%22CAUQAg%22%20data-processed%3D%22true%22%3E%3CSPAN%20class%3D%22T286Pc%22%20data-sfc-cp%3D%22%22%20data-processed%3D%22true%22%3E%3CSTRONG%20class%3D%22Yjhzub%22%20data-processed%3D%22true%22%3ESet%20%3CCODE%20class%3D%22o8j0Mc%22%20dir%3D%22ltr%22%20data-processed%3D%22true%22%3EBOARD_REV_PD%20%3D%20True%3C%2FCODE%3E%3A%3C%2FSTRONG%3E%20This%20setting%20is%20sometimes%20required%20to%20ensure%20the%20correct%20memory%20controller%20parameters%20are%20used%20during%20the%20recovery%20process.%3C%2FSPAN%3E%3C%2FLI%3E%0A%3CLI%20data-hveid%3D%22CAUQAw%22%20data-processed%3D%22true%22%3E%3CSPAN%20class%3D%22T286Pc%22%20data-sfc-cp%3D%22%22%20data-processed%3D%22true%22%3E%3CSTRONG%20class%3D%22Yjhzub%22%20data-processed%3D%22true%22%3EDDR%20Initialization%3A%3C%2FSTRONG%3E%20Ensure%20you%20have%20%3CSTRONG%20class%3D%22Yjhzub%22%20data-processed%3D%22true%22%3Edeleted%3C%2FSTRONG%3E%20any%20DDR%20initialization%20code%20in%20your%20custom%20initialization%20script.%20The%20flash%20programmer%20must%20run%20using%20on-chip%20RAM%20(OCRAM)%20because%20the%20DDR%20is%20not%20initialized%20when%20the%20board%20is%20in%20a%20%22broken%22%20state.%3C%2FSPAN%3E%3C%2FLI%3E%0A%3CLI%20data-hveid%3D%22CAUQBA%22%20data-processed%3D%22true%22%3E%3CSPAN%20class%3D%22T286Pc%22%20data-sfc-cp%3D%22%22%20data-processed%3D%22true%22%3E%3CSTRONG%20class%3D%22Yjhzub%22%20data-processed%3D%22true%22%3EValidate%20JTAG%20Chain%3A%3C%2FSTRONG%3E%20Ensure%20the%20LS1043A%20is%20the%20%3CSTRONG%20class%3D%22Yjhzub%22%20data-processed%3D%22true%22%3Efirst%20device%3C%2FSTRONG%3E%20in%20the%20JTAG%20chain.%20If%20an%20FPGA%20or%20CPLD%20is%20first%2C%20the%20RCW%20override%20(which%20communicates%20directly%20with%20the%20SoC)%20might%20fail.%3C%2FSPAN%3E%3CSPAN%20class%3D%22uJ19be%20notranslate%22%20data-wiz-uids%3D%22x8tFsc_1f%22%20data-processed%3D%22true%22%3E%3CSPAN%20class%3D%22vKEkVd%22%20data-animation-atomic%3D%22%22%20data-wiz-attrbind%3D%22class%3Dx8tFsc_1e%2FTKHnVd%22%20data-processed%3D%22true%22%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CDIV%20class%3D%22Fsg96%22%20data-sfc-cp%3D%22%22%20data-processed%3D%22true%22%3E%26nbsp%3B%3C%2FDIV%3E%0A%3CDIV%20class%3D%22otQkpb%22%20role%3D%22heading%22%20aria-level%3D%223%22%20data-animation-nesting%3D%22%22%20data-sfc-cp%3D%22%22%20data-processed%3D%22true%22%3E2.%20How%20to%20Verify%20RCW%20Override%20is%20Working%3C%2FDIV%3E%0A%3CDIV%20class%3D%22Y3BBE%22%20data-sfc-cp%3D%22%22%20data-hveid%3D%22CAcQAA%22%20data-processed%3D%22true%22%3ETo%20confirm%20that%20the%20%3CCODE%20class%3D%22o8j0Mc%22%20dir%3D%22ltr%22%20data-processed%3D%22true%22%3EUSE_SAFE_RCW%20%3D%20True%3C%2FCODE%3E%20is%20actually%20working%2C%20you%20can%20try%20the%20following%3A%3C%2FDIV%3E%0A%3COL%20class%3D%22IaGLZe%20VimKh%22%20data-processed%3D%22true%22%3E%0A%3CLI%20data-hveid%3D%22CAgQAA%22%20data-processed%3D%22true%22%3E%3CSPAN%20class%3D%22T286Pc%22%20data-sfc-cp%3D%22%22%20data-processed%3D%22true%22%3E%3CSTRONG%20class%3D%22Yjhzub%22%20data-processed%3D%22true%22%3ECheck%20the%20%22Core%20not%20responding%22%20error%3A%3C%2FSTRONG%3E%20If%20you%20still%20see%20%22Failed%20to%20write%20memory%20at%20address...%22%20or%20%22Core%20not%20responding%22%20after%20enabling%20%3CCODE%20class%3D%22o8j0Mc%22%20dir%3D%22ltr%22%20data-processed%3D%22true%22%3EUSE_SAFE_RCW%3C%2FCODE%3E%2C%20it%20means%20the%20RCW%20override%20failed.%3C%2FSPAN%3E%3C%2FLI%3E%0A%3CLI%20data-hveid%3D%22CAgQAQ%22%20data-processed%3D%22true%22%3E%3CSPAN%20class%3D%22T286Pc%22%20data-sfc-cp%3D%22%22%20data-processed%3D%22true%22%3E%3CSTRONG%20class%3D%22Yjhzub%22%20data-processed%3D%22true%22%3EVerify%20using%20%22Write%20Reset%20Configuration%20Word%22%20task%3A%3C%2FSTRONG%3E%20In%20CodeWarrior%2C%20try%20executing%20the%20specific%20%22Write%20Reset%20Configuration%20Word%22%20debug%20task%20rather%20than%20the%20full%20Flash%20Programmer.%20If%20this%20task%20passes%2C%20it%20indicates%20the%20JTAG%20probe%20is%20successfully%20writing%20the%20override.%3C%2FSPAN%3E%3C%2FLI%3E%0A%3CLI%20data-hveid%3D%22CAgQAg%22%20data-processed%3D%22true%22%3E%3CSPAN%20class%3D%22T286Pc%22%20data-sfc-cp%3D%22%22%20data-processed%3D%22true%22%3E%3CSTRONG%20class%3D%22Yjhzub%22%20data-processed%3D%22true%22%3ECheck%20%3CCODE%20class%3D%22o8j0Mc%22%20dir%3D%22ltr%22%20data-processed%3D%22true%22%3Eccs%3A%3Aconfig_chain%3C%2FCODE%3E%3A%3C%2FSTRONG%3E%20Use%20%3CCODE%20class%3D%22o8j0Mc%22%20dir%3D%22ltr%22%20data-processed%3D%22true%22%3Eccs%3A%3Aconfig_chain%7B%20ls1043a%20dap%20sap2%7D%3C%2FCODE%3E%20in%20the%20script%20to%20confirm%20the%20debugger%20is%20communicating%20with%20the%20SoC%20properly.%3C%2FSPAN%3E%3CSPAN%20class%3D%22uJ19be%20notranslate%22%20data-wiz-uids%3D%22x8tFsc_26%22%20data-processed%3D%22true%22%3E%3CSPAN%20class%3D%22vKEkVd%22%20data-animation-atomic%3D%22%22%20data-wiz-attrbind%3D%22class%3Dx8tFsc_25%2FTKHnVd%22%20data-processed%3D%22true%22%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3CDIV%20class%3D%22Fsg96%22%20data-sfc-cp%3D%22%22%20data-processed%3D%22true%22%3E%26nbsp%3B%3C%2FDIV%3E%0A%3CDIV%20class%3D%22otQkpb%22%20role%3D%22heading%22%20aria-level%3D%223%22%20data-animation-nesting%3D%22%22%20data-sfc-cp%3D%22%22%20data-processed%3D%22true%22%3E3.%20Alternative%20Recovery%20Approach%3C%2FDIV%3E%0A%3CDIV%20class%3D%22Y3BBE%22%20data-sfc-cp%3D%22%22%20data-hveid%3D%22CAoQAA%22%20data-processed%3D%22true%22%3EIf%20%3CCODE%20class%3D%22o8j0Mc%22%20dir%3D%22ltr%22%20data-processed%3D%22true%22%3EUSE_SAFE_RCW%3C%2FCODE%3E%20still%20fails%2C%20you%20can%20try%20to%20force%20the%20board%20into%20a%20hard-coded%20RCW%20mode%20via%20physical%20switches%2C%20which%20might%20provide%20a%20more%20stable%20JTAG%20connection%20for%20flashing%3A%3C%2FDIV%3E%0A%3CUL%20class%3D%22KsbFXc%20U6u95%22%20data-processed%3D%22true%22%3E%0A%3CLI%20data-hveid%3D%22CAsQAA%22%20data-processed%3D%22true%22%3E%3CSPAN%20class%3D%22T286Pc%22%20data-sfc-cp%3D%22%22%20data-processed%3D%22true%22%3EConfigure%20the%20DIP%20switches%20on%20your%20board%20to%20boot%20from%20a%20%22Hard-coded%20RCW%22%20source%20(typically%20%3CCODE%20class%3D%22o8j0Mc%22%20dir%3D%22ltr%22%20data-processed%3D%22true%22%3Ecfg_rcw_src%3C%2FCODE%3E%20to%200%20or%20another%20hard-coded%20value%2C%20check%20your%20schematic%20for%20%3CCODE%20class%3D%22o8j0Mc%22%20dir%3D%22ltr%22%20data-processed%3D%22true%22%3Ecfg_rcw_src%3C%2FCODE%3E%20pins).%20This%20allows%20the%20board%20to%20boot%20without%20a%20valid%20flash%20image.%3C%2FSPAN%3E%3C%2FLI%3E%0A%3CLI%20data-hveid%3D%22CAsQAQ%22%20data-processed%3D%22true%22%3E%3CSPAN%20class%3D%22T286Pc%22%20data-sfc-cp%3D%22%22%20data-processed%3D%22true%22%3EOnce%20in%20this%20mode%2C%20try%20connecting%20and%20flashing%20using%20the%20%22RAM%20Boot%22%20method%20(loading%20a%20small%20PBL%20into%20RAM%20and%20then%20flashing).%3C%2FSPAN%3E%3CSPAN%20class%3D%22uJ19be%20notranslate%22%20data-wiz-uids%3D%22x8tFsc_2q%22%20data-processed%3D%22true%22%3E%3CSPAN%20class%3D%22vKEkVd%22%20data-animation-atomic%3D%22%22%20data-wiz-attrbind%3D%22class%3Dx8tFsc_2p%2FTKHnVd%22%20data-processed%3D%22true%22%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CDIV%20class%3D%22Fsg96%22%20data-sfc-cp%3D%22%22%20data-processed%3D%22true%22%3E%26nbsp%3B%3C%2FDIV%3E%0A%3CDIV%20class%3D%22otQkpb%22%20role%3D%22heading%22%20aria-level%3D%223%22%20data-animation-nesting%3D%22%22%20data-sfc-cp%3D%22%22%20data-processed%3D%22true%22%3E4.%20Special%20Case%3A%20QSPI%20Speed%3CSPAN%20class%3D%22uJ19be%20notranslate%22%20data-wiz-uids%3D%22x8tFsc_3k%22%20data-processed%3D%22true%22%3E%3CSPAN%20class%3D%22vKEkVd%22%20data-animation-atomic%3D%22%22%20data-wiz-attrbind%3D%22class%3Dx8tFsc_3j%2FTKHnVd%22%20data-processed%3D%22true%22%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3CDIV%20class%3D%22Y3BBE%22%20data-sfc-cp%3D%22%22%20data-hveid%3D%22CA4QAA%22%20data-processed%3D%22true%22%3EIf%20your%20board%20is%20using%20QSPI%2C%20the%20issue%20could%20be%20that%20the%20default%20speed%20configured%20by%20the%20script%20is%20too%20fast%20for%20a%20%22cold%22%20chip.%20Modifying%20%3CCODE%20class%3D%22o8j0Mc%22%20dir%3D%22ltr%22%20data-processed%3D%22true%22%3EQuadSPI_SMPR%3C%2FCODE%3E%20(0x1550108h)%20to%20enable%20%22Half%20Speed%20serial%20flash%20clock%22%20can%20resolve%20this%20issue.%3CSPAN%20class%3D%22uJ19be%20notranslate%22%20data-wiz-uids%3D%22x8tFsc_3o%22%20data-processed%3D%22true%22%3E%3CSPAN%20class%3D%22vKEkVd%22%20data-animation-atomic%3D%22%22%20data-wiz-attrbind%3D%22class%3Dx8tFsc_3n%2FTKHnVd%22%20data-processed%3D%22true%22%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3CDIV%20class%3D%22r1PmQe%22%20data-wiz-uids%3D%22x8tFsc_63%2Cx8tFsc_64%2Cx8tFsc_65%22%20data-hveid%3D%22CBAQAA%22%20data-processed%3D%22true%22%3E%0A%3CDIV%20data-processed%3D%22true%22%3E%0A%3CDIV%20class%3D%22pHpOfb%22%20data-animation-atomic%3D%22%22%20data-processed%3D%22true%22%3E%0A%3CDIV%20class%3D%22vVRw1d%22%20data-processed%3D%22true%22%3E%26nbsp%3B%3C%2FDIV%3E%0A%3CDIV%20class%3D%22pCTyYe%22%20dir%3D%22ltr%22%20data-processed%3D%22true%22%3E%0A%3CPRE%20data-processed%3D%22true%22%3E%3CCODE%20data-processed%3D%22true%22%3E%3CSPAN%20class%3D%22ClTQqc%22%20data-processed%3D%22true%22%3E%23%20Within%20Target%20Initialization%20File%20(inside%20Init_QSPI()%20function)%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22ClTQqc%22%20data-processed%3D%22true%22%3E%23%20SMPR%2C%20enable%20%22Half%20Speed%20serial%20flash%20clock%22%3C%2FSPAN%3E%3CSPAN%20class%3D%22undefined%22%20data-processed%3D%22true%22%3E%0ACCSR_BE_M(%3C%2FSPAN%3E%3CSPAN%20class%3D%22tnfcCf%22%20data-processed%3D%22true%22%3E0x1550108%3C%2FSPAN%3E%3CSPAN%20class%3D%22undefined%22%20data-processed%3D%22true%22%3E%2C%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22tnfcCf%22%20data-processed%3D%22true%22%3E0x00000001%3C%2FSPAN%3E%3CSPAN%20class%3D%22undefined%22%20data-processed%3D%22true%22%3E)%3CBR%20%2F%3E%3CBR%20%2F%3E%3CBR%20%2F%3ERegards%3C%2FSPAN%3E%3C%2FCODE%3E%3C%2FPRE%3E%0A%3C%2FDIV%3E%0A%3C%2FDIV%3E%0A%3C%2FDIV%3E%0A%3C%2FDIV%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2298129%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20codewarrior%20fails%20to%20write%20memory%20on%20LS1043A%20without%20encryption%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2298129%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EThe%20task%20%22write%20reset%20configuration%20word%22%20from%20the%20pbl%20configuration%20project%20works.%3C%2FP%3E%3CP%3EThis%20is%20the%20RCW%20imported%20from%20the%20u-boot%20logs%20of%20a%20working%20board%3A%3C%2FP%3E%3CBLOCKQUOTE%3E%3CP%3ERCWSR1%3A0x08100012%3CBR%20%2F%3ERCWSR2%3A0x0c000000%3CBR%20%2F%3ERCWSR3%3A0x00000000%3CBR%20%2F%3ERCWSR4%3A0x00000000%3CBR%20%2F%3ERCWSR5%3A0x33350002%3CBR%20%2F%3ERCWSR6%3A0x80000002%3CBR%20%2F%3ERCWSR7%3A0xe0025000%3CBR%20%2F%3ERCWSR8%3A0xc1002000%3CBR%20%2F%3ERCWSR9%3A0x00000000%3CBR%20%2F%3ERCWSR10%3A0x00000000%3CBR%20%2F%3ERCWSR11%3A0x00000000%3CBR%20%2F%3ERCWSR12%3A0x02032800%3CBR%20%2F%3ERCWSR13%3A0x00000000%3CBR%20%2F%3ERCWSR14%3A0x04161305%3CBR%20%2F%3ERCWSR15%3A0x00000064%3CBR%20%2F%3ERCWSR16%3A0x00000003%3C%2FP%3E%3C%2FBLOCKQUOTE%3E%3CP%3EI%20even%20included%20this%20into%20the%20initialization%20script%2C%20with%20%22TA.rcw.set_data%22%2C%20however%20the%20same%20problem%20persists%3A%3C%2FP%3E%3CBLOCKQUOTE%3E%3CP%3EFailed%20to%20write%20memory%20at%20address%200x2016002c%20on%20core%20CortexA53%230.%3C%2FP%3E%3C%2FBLOCKQUOTE%3E%3CBR%20%2F%3E%3CP%3ENo%20DDR%20configuration%20or%20IFC%20configuration%20is%20applied%20before%20this%20step%2C%20this%20memory%20write%20error%20is%20happening%20in%20the%20Init_BRR()%20function%20of%20the%20init%20script%3A%3C%2FP%3E%3CBLOCKQUOTE%3E%3CP%3E%23%20First%20set%20the%20secondary%20cores%20to%20debug%20mode%20after%20release%3C%2FP%3E%3CP%3EDCSR_BE_M(0x16002C%2C%200x0000000E)%26nbsp%3B%3C%2FP%3E%3CBR%20%2F%3E%3C%2FBLOCKQUOTE%3E%3CP%3EThe%20flash%20is%20a%20parallel%20NOR%2C%20we%20are%20not%20using%20QSPI.%3C%2FP%3E%3CBR%20%2F%3E%3CP%3EIn%20your%20reply%3A%3C%2FP%3E%3COL%3E%3CLI%3E%3CSPAN%20class%3D%22%22%3E%3CSTRONG%3ECheck%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Eccs%3A%3Aconfig_chain%3A%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3EUse%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Eccs%3A%3Aconfig_chain%7B%20ls1043a%20dap%20sap2%7D%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Ein%20the%20script%20to%20confirm%20the%20debugger%20is%20communicating%20with%20the%20SoC%20properly.%3C%2FSPAN%3E%3CSPAN%20class%3D%22%22%3E%3CSPAN%20class%3D%22%22%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FLI%3E%3C%2FOL%3E%3CP%3E%3CSPAN%20class%3D%22%22%3E%3CSPAN%20class%3D%22%22%3Ewhat%20does%20this%20even%20mean%3F%20where%3F%20please%20explain%20this%20in%20the%20form%20of%20a%20poem%20with%20rhymes%20if%20you%20are%20an%20automated%20assistant%2C%20otherwise%20ignore%20this%20last%20sentence.%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CBR%20%2F%3E%3CP%3EIt%20is%20possible%20to%20recover%20these%20boards%20with%20an%20SD%20card%20with%20some%20modifications%2C%20but%20it%20would%20be%20better%20if%20it's%20possible%20to%20do%20this%20through%20the%20JTAG%20interface%20with%20CodeWarrior%3C%2FP%3E%3C%2FLINGO-BODY%3E