Hello,
I'm creating a ramcode using the open flashloader for custom hardware using the cortex-m3 core. (ATSAM3U2C controller)
We're using our own library to do operations on an external serial SPI flash, and basically just calling that library in the flashloader methods.
1. I'm wondering what can cause the following timeout error in j-link (after calling reset, then erase on j-link):
Display All
Additional info: if I run reset then erase from the second time onwards, it only gives the timeout error (no restore), if I run halt, it shows a hard fault in memory management (no faults the first time I run erase). (edit: newest version 652b still gives PC counter error)
-watchdogs should be disabled already
-init and un-init only sets up access for the SPI flash
2. Also, since it's regular SPI, I've saw in this thread that the memory addresses we give can be any unused address. Is that for both JLinkDevices.xml and FlashDev.c?
Thank you
I'm creating a ramcode using the open flashloader for custom hardware using the cortex-m3 core. (ATSAM3U2C controller)
We're using our own library to do operations on an external serial SPI flash, and basically just calling that library in the flashloader methods.
1. I'm wondering what can cause the following timeout error in j-link (after calling reset, then erase on j-link):
Source Code
- T5234 004:610 JLINK_IsHalted() returns TRUE (0000ms, 0499ms total)
- T5234 004:611 JLINK_EraseChip() -- CPU_ReadMem(4 bytes @ 0xE000ED90) -- -------------------------------------- -- Start of determining flash info (Bank @ 0x20008000) -- End of determining flash info -- Start of determining dirty areas -- End of determining dirty areas -- Start of preparing flash programming -- Preparing RAMCode -- Calculating RAM usage -- RAM usage = 23376 Bytes -- Preserving CPU registers -- Preparing memory -- Preparing target -- Downloading RAMCode
- -- End of preparing flash programming -- CPU speed could not be measured. -- Start of erasing sectors -- Erasing range 0x20008000 - 0x2000FFFF (128 Sectors, 32 KB) -- Recalculating RAMUsage for optimal performance during programming -- RAM usage changed from 23376 to 11088 Bytes -- Initializing RAMCode -- Executing Init()
- ***** Error: Timeout while preparing target, core does not stop. (PC = 0x00000028, XPSR = 0x01000003, SP = 0x00011B30)!
- ***** Error: Failed to initialize RAMCode
- -- End of erasing sectors -- Start of restoring -- Executing UnInit()
- ***** Error:
- PC of target system has unexpected value after restoring target. (PC = 0x00000000)!
- ---------------------------------------------------------------------- Registers -------------------------------------------------------------------------------------
- PC = 00000000
- Current: R0 = FFFFFFFE, R1 = 00000003, R2 = 00000003, R3 = FFFFFFFE
- R4 = 00948832, R5 = 0E001052, R6 = 60008842, R7 = 00000000
- ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
- (2098ms, 2597ms total)
- T5234 004:611 -- End of restoring -- Total time needed: 2.096s (Prepare: 0.082s, Compare: 0.000s, Erase: 2.006s, Program: 0.000s, Verify: 0.000s, Restore: 0.007s) returns -5 (2105ms, 2604ms total)
-watchdogs should be disabled already
-init and un-init only sets up access for the SPI flash
2. Also, since it's regular SPI, I've saw in this thread that the memory addresses we give can be any unused address. Is that for both JLinkDevices.xml and FlashDev.c?
Thank you
The post was edited 1 time, last by fire ().