git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@5429 35acf78f-673a-0410-8e92-d51de3d6d3f4

This commit is contained in:
gdisirio 2013-03-14 15:25:03 +00:00
parent 2f5f9bd380
commit 3133defc42
4 changed files with 86 additions and 249 deletions

View File

@ -2,7 +2,7 @@
Connection Failed Report from
Basic UDE Target Interface, Version: 1.10.4
created: 03/05/13, 10:41:20
created: 03/14/13, 16:20:20
----------------------------------------------------------
@ -16,45 +16,41 @@ UDE version:
Path: C:\Program Files\pls\UDE 4.0
Target configuration file:
C:\ChibiStudio\chibios\demos\PPC-SPC563M-GCC\UDE\stm_xpc563m64_minimodule_debug_jtag.cfg
C:\ChibiStudio\chibios\demos\PPC-SPC564A-GCC\UDE\stm_xpc564a_minimodule_debug_jtag.cfg
Error messages:
PpcJtagTargIntf: Can't connect target !
PpcJtagTargIntf: Failed to open communication channel !
UAD2CommDev: Can't connect Universal Access Device 2 !
Please check:
- Power supply of UAD2
- Communication cable to UAD2
PpcJtagTargIntf: Failed to access JTAG debug module !
UDEDebugServer: - serial no. -1 was suprised removed . To correct the situation, connect the communication device again and try to establish target communication.
UDEDebugServer: Unable to establish connection . To correct the situation, check configuration file entries and try again.
Settings:
PortType: CommDev
CommDevSel: PortType=USB,Type=UAD2
JtagViaPod: y
PortType: Default
CommDevSel:
JtagViaPod: n
TargetPort: Default
JtagTapNumber: 0
JtagNumOfTaps: 1
JtagNumIrBefore: 0
JtagNumIrAfter: 0
MaxJtagClk: 1000
MaxJtagClk: 5000
AdaptiveJtagPhaseShift: y
JtagMuxPort: -1
JtagMuxWaitTime: 5
JtagIoType: Jtag
EtksArbiterMode: 0
ConnOption: Reset
ConnOption: Default
UseExtReset: y
ResetWaitTime: 50
HaltAfterReset: y
ChangeJtagClk: -1
ExecInitCmds: y
InvalidateCache: n
InvalidateCache: y
ChangeMsr: n
ChangeMsrValue: 0x00000000
ResetPulseLen: 10
InitScript Script:
// TLB invalidate
SETSPR 0x3F4 0x2 0xFFFFFFFF
// select TLB 1
SETSPR 0x274 0x10000108 0xFFFFFFFF
@ -82,9 +78,21 @@ Settings:
// execute TLB write instruction
EXECOPCODE 0x7C0007A4
// programm internal SRAM
// programm external memory
// TLB 1, entry 2
SETSPR 0x270 0x10020000 0xFFFFFFFF
// Valid, protect against invalidation, global entry, size=16MB
SETSPR 0x271 0xC0000700 0xFFFFFFFF
// effective page number 20000000
SETSPR 0x272 0x20000020 0xFFFFFFFF
// real page 20000000, UX,SX,UW,SW,UR,SR
SETSPR 0x273 0x2000003F 0xFFFFFFFF
// execute TLB write instruction
EXECOPCODE 0x7C0007A4
// programm internal SRAM
// TLB 1, entry 3
SETSPR 0x270 0x10030000 0xFFFFFFFF
// Valid, protect against invalidation, global entry, size=256k
SETSPR 0x271 0xC0000400 0xFFFFFFFF
// effective page number 40000000, I
@ -96,7 +104,7 @@ Settings:
// programm peripheral A modules
// TLB 1, entry 4
SETSPR 0x270 0x10030000 0xFFFFFFFF
SETSPR 0x270 0x10040000 0xFFFFFFFF
// Valid, protect against invalidation, global entry, size=1MB
SETSPR 0x271 0xC0000500 0xFFFFFFFF
// effective page number C3F00000, I
@ -106,22 +114,24 @@ Settings:
// execute TLB write instruction
EXECOPCODE 0x7C0007A4
// cache invalidate
SETSPR 0x3F3 0x00000003 0x00000003
SETSPR 0x3F3 0x00000000 0x00000003
// setup IVOPR
// points to internal memory at 0x40000000
SETSPR 0x3F 0x40000000 0xFFFFFFFF
// MMU data error vector offset
SETSPR 0x19D 0x0 0xFFFFFFFF
// MMU instruction error vector offset
// setup clock to 80MHz
//SET FMPLL_SYNCR 0x28000000 0xFFFFFFFF
//WAIT 0x5
// disable watchdog
SET SWT_CR 0xFF00000A
SET SWT_SR 0x0000C520
SET SWT_SR 0x0000D928
SET SWT_MCR 0xFF00000A
// set NEXUS priority to above cpu instruction for runtime access
//SET XBAR_MPR3 0x321
// setup clock to 120MHz
SET 0xC3F80008 0xF000003C 0xF00F00FF
WAIT 0x2
SET 0xC3F8000C 0x00000001 0x000000FF
WAIT 0x5
SimioAddr: g_JtagSimioAccess
FreezeTimers: y
@ -132,7 +142,7 @@ Settings:
ExecOnHaltCmds: n
ExecOnHaltCmdsWhileHalted: n
OnHaltScript Script:
Script is empty
EnableProgramTimeMeasurement: n
TimerForPTM: Default
DefUserStreamChannel: 0
@ -142,12 +152,12 @@ Settings:
UseRestartWhileRunningHandling: n
UseNexus: y
DoSramInit: y
ForceCacheFlush: n
ForceCacheFlush: y
IgnoreLockedLines: n
HandleWdtBug: n
ForceEndOfReset: n
UseHwResetMode: y
HwResetMode: Execute
UseHwResetMode: n
HwResetMode: Simulate
HandleNexusAccessBug: n
UseMasterNexusIfResetState: y
UseLocalAddressTranslation: y
@ -155,7 +165,7 @@ Settings:
InitSramOnlyWhenNotInitialized: n
InvalidTlbOnReset: y
DoNotEnableTrapSwBrp: n
AllowResetOnCheck: n
AllowResetOnCheck: y
BootPasswd0: 0xFEEDFACE
BootPasswd1: 0xCAFEBEEF
BootPasswd2: 0xFFFFFFFF
@ -171,21 +181,21 @@ Settings:
JTAG target infos:
JTAG-ID: 0x00000000
UsedJtagClk: 0 kHz
ExtVoltage: 0.0 V
IntVoltageUsed: n
ExtVoltage: 3276.7 V
IntVoltageUsed: y
Target infos:
CoreName: Core
FullCoreName: Controller0.Core
ExtClock: 12000000
IntClock: 80000000
ExtClock: 8000000
IntClock: 120000000
SysClock: 0
HasNexus: n
BigEndian: n
CanSimio: n
CanPhysicalAccess: n
HasSpe: n
NumOfSimioChannels: 0
NumOfSimioChannels: 2157080748
JtagId: 0x00000000
IsEarlyStep: n
IsMaster: y
@ -220,7 +230,7 @@ Target infos:
Has Data Value comparators: y
Reset Mode: 0x00000002
STM timer base address: 0xFFF3C000
MC_ME base address: 0x00000000
MC_ME base address: 0xC3FDC000
Core in Lockstep mode: n
Core in DPM mode: n
Core is HSM: n
@ -246,15 +256,23 @@ Target infos:
InactiveAfterReset: n
Communication device:
Type/Firmware:
Serial Number: 0
Type/Firmware: UAD2
Serial Number: 326060
Communication protocol handler:
LastCmd: 0x0000
LastResult: 0x0000
ExpBytes: 0 (0x0000)
RetBytes: 0 (0x0000)
LastTimeout: 0
LastCmd: 0x0410
LastResult: 0xC023
ExpBytes: 576 (0x0240)
RetBytes: 576 (0x0240)
LastTimeout: 120020
Protocol diagnostic output:
Diagnostic output invalid !
LastJtagApiAddr: 0x00000000
LastJtagApiSpr: 0x00000000
LastJtagApiDcr: 0x00000000
LastJtagApiError: 0x00000000
LastJtagApiStatus: 0x00000000
JtagApiErrorLine: 3913
JtagApiAddInfo0: 0x00000000
JtagApiAddInfo1: 0x00000000
ProtErrorLine: 926

File diff suppressed because one or more lines are too long

View File

@ -1,183 +0,0 @@
[Main]
Signature=UDE_TARGINFO_2.0
Description=STM XPC563M Mini Module with SPC563M64 1.5M (Jtag)
Description1=MMU preinitialized, memory mapping 1:1, VLE enabled for SRAM and Flash
Description2=PLL set for 80MHz
Description3=FLASH programming prepared but not enabled
Description4=Write Filter for BAM Module
MCUs=Controller0
Architecture=PowerPC
Vendor=STM
Board=XPC563M Mini Module
[Controller0]
Family=PowerPC
Type=SPC563M64
Enabled=1
IntClock=80000
MemDevs=BAMWriteFilter
ExtClock=12000
[Controller0.Core]
Protocol=PPCJTAG
Enabled=1
[Controller0.Core.LoadedAddOn]
UDEMemtool=1
[Controller0.Core.PpcJtagTargIntf]
PortType=UAD2
ResetWaitTime=50
MaxJtagClk=1000
DoSramInit=1
UseNexus=1
AdaptiveJtagPhaseShift=1
ConnOption=Reset
ChangeJtagClk=-1
HaltAfterReset=1
SimioAddr=g_JtagSimioAccess
FreezeTimers=1
InvalidTlbOnReset=1
InvalidateCache=0
ForceCacheFlush=0
IgnoreLockedLines=0
ExecInitCmds=1
JtagTapNumber=0
JtagNumOfTaps=1
JtagNumIrBefore=0
JtagNumIrAfter=0
SimioAddr=g_JtagSimioAccess
FlushCache=0
AllowMmuSetup=1
UseExtReset=1
HandleWdtBug=0
ForceEndOfReset=0
CommDevSel=PortType=USB,Type=UAD2
JtagViaPod=1
TargetPort=Default
ChangeMsr=0
ChangeMsrValue=0x0
ExecOnStartCmds=0
ExecOnHaltCmds=0
EnableProgramTimeMeasurement=0
UseHwResetMode=1
HandleNexusAccessBug=0
DoNotEnableTrapSwBrp=0
AllowResetOnCheck=0
BootPasswd0=0xFEEDFACE
BootPasswd1=0xCAFEBEEF
BootPasswd2=0xFFFFFFFF
BootPasswd3=0xFFFFFFFF
BootPasswd4=0xFFFFFFFF
BootPasswd5=0xFFFFFFFF
BootPasswd6=0xFFFFFFFF
BootPasswd7=0xFFFFFFFF
JtagIoType=Jtag
ExecOnHaltCmdsWhileHalted=0
TimerForPTM=Default
AllowBreakOnUpdateBreakpoints=0
ClearDebugStatusOnHalt=1
HwResetMode=Execute
UseMasterNexusIfResetState=1
UseLocalAddressTranslation=1
Use64BitNexus=0
InitSramOnlyWhenNotInitialized=0
DisableE2EECC=0
[Controller0.BAMWriteFilter]
Description=BAM WriteAccess Filter
Range0Start=0xFFFFC000
Range0Size=0x4000
Enabled=1
Handler=AccessFilter
Mode=ReadOnly
[Controller0.PFLASH0]
Enabled=1
EnableMemtoolByDefault=1
[Controller0.PFLASH1]
Enabled=1
EnableMemtoolByDefault=1
[Controller0.PFLASH2]
Enabled=1
EnableMemtoolByDefault=1
[Controller0.Core.PpcJtagTargIntf.InitScript]
// TLB invalidate
SETSPR 0x3F4 0x2 0xFFFFFFFF
// select TLB 1
SETSPR 0x274 0x10000108 0xFFFFFFFF
// programm peripheral B modules
// TLB 1, entry 0
SETSPR 0x270 0x10000000 0xFFFFFFFF
// Valid, protect against invalidation, global entry, size=1MB
SETSPR 0x271 0xC0000500 0xFFFFFFFF
// effective page number FFF00000, I,G
SETSPR 0x272 0xFFF0000A 0xFFFFFFFF
// real page FFF00000, UX,SX,UW,SW,UR,SR
SETSPR 0x273 0xFFF0003F 0xFFFFFFFF
// execute TLB write instruction
EXECOPCODE 0x7C0007A4
// programm internal Flash, no cache because of flash
// TLB 1, entry 1
SETSPR 0x270 0x10010000 0xFFFFFFFF
// Valid, protect against invalidation, global entry, size=16MB
SETSPR 0x271 0xC0000700 0xFFFFFFFF
// effective page number 00000000
SETSPR 0x272 0x28 0xFFFFFFFF
// real page 00000000, UX,SX,UW,SW,UR,SR
SETSPR 0x273 0x3F 0xFFFFFFFF
// execute TLB write instruction
EXECOPCODE 0x7C0007A4
// programm internal SRAM
// TLB 1, entry 2
SETSPR 0x270 0x10020000 0xFFFFFFFF
// Valid, protect against invalidation, global entry, size=256k
SETSPR 0x271 0xC0000400 0xFFFFFFFF
// effective page number 40000000, I
SETSPR 0x272 0x40000028 0xFFFFFFFF
// real page 0x40000028, UX,SX,UW,SW,UR,SR
SETSPR 0x273 0x4000003F 0xFFFFFFFF
// execute TLB write instruction
EXECOPCODE 0x7C0007A4
// programm peripheral A modules
// TLB 1, entry 4
SETSPR 0x270 0x10030000 0xFFFFFFFF
// Valid, protect against invalidation, global entry, size=1MB
SETSPR 0x271 0xC0000500 0xFFFFFFFF
// effective page number C3F00000, I
SETSPR 0x272 0xC3F0000A 0xFFFFFFFF
// real page C3F00000, UX,SX,UW,SW,UR,SR
SETSPR 0x273 0xC3F0003F 0xFFFFFFFF
// execute TLB write instruction
EXECOPCODE 0x7C0007A4
// setup IVOPR
// points to internal memory at 0x40000000
SETSPR 0x3F 0x40000000 0xFFFFFFFF
// MMU data error vector offset
SETSPR 0x19D 0x0 0xFFFFFFFF
// MMU instruction error vector offset
// setup clock to 80MHz
//SET FMPLL_SYNCR 0x28000000 0xFFFFFFFF
//WAIT 0x5
// disable watchdog
SET SWT_CR 0xFF00000A
// set NEXUS priority to above cpu instruction for runtime access
//SET XBAR_MPR3 0x321
[Controller0.Core.PpcJtagTargIntf.OnStartScript]
[Controller0.Core.PpcJtagTargIntf.OnHaltScript]

View File

@ -52,29 +52,31 @@ void hal_lld_init(void) {
extern void _vectors(void);
uint32_t n;
#if 0
/* FLASH wait states and prefetching setup.*/
CFLASH0.BIUCR.R = SPC5_FLASH_BIUCR | SPC5_FLASH_WS;
CFLASH0.BIUCR2.R = 0;
CFLASH0.PFCR3.R = 0;
FLASH_A.BIUCR.R = SPC5_FLASH_BIUCR | SPC5_FLASH_WS;
FLASH_A.BIUCR2.R = 0;
FLASH_B.BIUCR.R = SPC5_FLASH_BIUCR | SPC5_FLASH_WS;
FLASH_B.BIUCR2.R = 0;
/* Optimal crossbar settings. The DMA priority is placed above the CPU
priority in order to not starve I/O activities while the CPU is
executing tight loops (FLASH and SRAM slave ports only).
The SRAM is parked on the load/store port, for some unknown reason it
/* The SRAM is parked on the load/store port, for some unknown reason it
is defaulted on the instructions port and this kills performance.*/
XBAR.SGPCR3.B.PARK = 4; /* RAM slave on load/store port.*/
XBAR.MPR0.R = 0x00030201; /* Flash slave port priorities:
eDMA (1): 0 (highest)
XBAR.SGPCR2.B.PARK = 1; /* RAM slave on load/store port.*/
/* The DMA priority is placed above the CPU priority in order to not
starve I/O activities while the CPU is executing tight loops (FLASH
and SRAM slave ports only).*/
XBAR.MPR0.R = 0x34000021; /* Flash slave port priorities:
eDMA (4): 0 (highest)
Core Instructions (0): 1
Undocumented (2): 2
Core Data (4): 3 */
XBAR.MPR3.R = 0x00030201; /* SRAM slave port priorities:
eDMA (1): 0 (highest)
Core Data (1): 2
EBI (7): 3
Flexray (6): 4 */
XBAR.MPR2.R = 0x34000021; /* SRAM slave port priorities:
eDMA (4): 0 (highest)
Core Instructions (0): 1
Undocumented (2): 2
Core Data (4): 3 */
#endif
Core Data (1): 2
EBI (7): 3
FlexRay (6): 4 */
/* Downcounter timer initialized for system tick use, TB enabled for debug
and measurements.*/