Hi all,
I have created a custom Teensy board using the Mini54TAN before. Out of curiosity and if I don't have any Min54 left (I am living in Germany meaning it will take 3-4 weeks to get new Mini54s) I built my PCB with everything except the Mini54. I have a J-Link Edu and wanted to flash my application via SWD (I have these signals exposed on my custom PCB).
What I do is this (I am running on a Mac)
Code:
> ./JLinkExe -if SWD -device MK20DX256VLH7
SEGGER J-Link Commander V5.10s (Compiled Mar 9 2016 18:54:51)
DLL version V5.10s, compiled Mar 9 2016 18:54:45
Connecting to J-Link via USB...O.K.
Firmware: J-Link V9 compiled Mar 8 2016 11:12:56
Hardware version: V9.30
S/N: 269308445
License(s): FlashBP, GDB
OEM: SEGGER-EDU
Emulator has Trace capability
VTref = 3.325V
Type "connect" to establish a target connection, '?' for help
J-Link>connect
Specify target interface speed [kHz]. <Default>: 4000 kHz
Speed>1000
Device "MK20DX256XXX7" selected.
Found SWD-DP with ID 0x2BA01477
Found SWD-DP with ID 0x2BA01477
Found Cortex-M4 r0p1, Little endian.
FPUnit: 6 code (BP) slots and 2 literal slots
CoreSight components:
ROMTbl 0 @ E00FF000
ROMTbl 0 [0]: FFF0F000, CID: B105E00D, PID: 000BB000 SCS
ROMTbl 0 [1]: FFF02000, CID: B105E00D, PID: 003BB002 DWT
ROMTbl 0 [2]: FFF03000, CID: B105E00D, PID: 002BB003 FPB
ROMTbl 0 [3]: FFF01000, CID: B105E00D, PID: 003BB001 ITM
ROMTbl 0 [4]: FFF41000, CID: B105900D, PID: 000BB9A1 TPIU
Cortex-M4 identified.
J-Link>erase
Erasing device (MK20DX256xxx7)...
Comparing flash [100%] Done.
Erasing flash [100%] Done.
Verifying flash [100%] Done.
J-Link: Flash download: Total time needed: 0.894s (Prepare: 0.105s, Compare: 0.000s, Erase: 0.780s, Program: 0.000s, Verify: 0.000s, Restore: 0.008s)
Erasing done.
J-Link>loadfile /Users/pschuster/Desktop/Blink.ino.hex
Downloading file [/Users/pschuster/Desktop/Blink.ino.hex]...
Comparing flash [100%] Done.
Erasing flash [100%] Done.
Programming flash [100%] Done.
Verifying flash [100%] Done.
J-Link: Flash download: Flash programming performed for 1 range (14336 bytes)
J-Link: Flash download: Total time needed: 0.505s (Prepare: 0.136s, Compare: 0.006s, Erase: 0.000s, Program: 0.312s, Verify: 0.000s, Restore: 0.048s)
O.K.
J-Link>r
Reset delay: 0 ms
Reset type NORMAL: Resets core & peripherals via SYSRESETREQ & VECTRESET bit.
J-Link>g
Well, but the MK20 does not startup. I can see the Reset signal is HIGH, which shows that it's not empty (I think) and doing something. But I cannot see the crystal to start up using my oscilloscope.
Is there any configuration necessary for the MK20 besides the raw application? I.e. does the application at startup (first things it does in main) do all the setup (like start crystal commands) or are there any registers to set outside of the application?
I am asking you because you dived into these details in this topic and thought that you could perhaps help me.
Thanks in advance,
Phillip