|
|
[color=inherit !important] 我们这边用的你们的开发板,测试双核功能,目前遇到的问题是:
6 i8 t5 D$ S& h( R' X[color=inherit !important]1.ARM端Linux 系统正常进入到文件系统中
/ \1 i" M5 N7 X9 ?/ M[color=inherit !important]
, o% A: A! A' {6 d/ x
; E, X& J2 f! e+ P8 l( O[color=inherit !important]2.DSP端运行基于sysbios的工程,在工程中通过如下设置定时器2
; v. y, ^: o x4 V7 L. c @[color=inherit !important]
: ], a# w& Q) i$ f
7 S ?! M& Y' U; [timerParams.period = 500;
! s( R$ A5 c* K% _3 I0 K8 rtimerParams.periodType = Timer_PeriodType_MICROSECS;
) m- _0 t! w- V3 h8 n+ w' v# j6 _Timer_create(2, Timer2Proc, &timerParams, &eb);
. V) ~4 V4 ^# E
- }! I4 J- I# M
! q; E: n4 s% ~* J+ ]2 P2 L3.然后在定时器Timer2Proc()中断函数中进行翻转GPIO的操作,然后用示波器去看GPIO的波形,发现产生的波形周期为960us(正常应该是1000us);8 |; W, `3 l: {3 O4 i
产生了定时器定时周期和我预设的周期值不一样。附件是我dsp.cfg文件(只能上传一部分)。请教一下这个问题是什么原因导致的,如何解决,谢谢。
9 y, s5 h# D4 q+ @ p6 U$ {5 `* d5 ~7 j' ]* ~3 _; t6 E' C
2 R# f. o# j& n( k% y' h
8 v. V- {2 L- R/*
2 X2 p( G# W% J1 P! h0 ~4 r/ p * ======== Dsp.cfg ========/ v2 b, `* J! K
*
* M7 o0 B7 u2 U2 ~; Z( l */$ L5 H" w2 i# E/ r' P
8 n0 y. |* f, e- F' w
9 h, d- \) C w* l
/* root of the configuration object model */. b0 k3 x8 Q4 k6 V; y
var Program = xdc.useModule('xdc.cfg.Program');
* p" j, N, }, o0 F
$ I9 o }2 {8 p1 H4 S# v
) t- V' ]" V' o/* application uses the following modules and packages */+ i8 t9 G0 p& o( c( Y" W! g1 d
xdc.useModule('xdc.runtime.Assert');, [( t" B/ A! V0 p) [# _: I1 i
xdc.useModule('xdc.runtime.Diags');
7 A% \8 b9 u& T9 L) B2 Bxdc.useModule('xdc.runtime.Error');. l4 q6 o* [. i/ a$ t
xdc.useModule('xdc.runtime.Log');
1 x$ C+ k1 w1 m& jxdc.useModule('xdc.runtime.Registry');+ ^2 @+ j' s% {' p
, Z+ y% c9 [% v; @
! Q# k' N; J/ J# u: r& [xdc.useModule('ti.sysbios.gates.GateHwi');
/ d, u0 j7 h |0 v2 Ixdc.useModule('ti.sysbios.knl.Semaphore'); Q$ ]4 W+ g* }4 g9 I, O
xdc.useModule('ti.sysbios.knl.Task');
- r) u9 G" X$ T
; E/ T3 \0 }3 W4 v7 R4 p0 G) b0 }. D& d
- h) C5 Q" s2 [ I( \& G% o2 \* {$ X! W
- f3 X3 m5 x; F
# S" ?) g' O# K! E. E4 B
; s1 @/ P1 P F r: @# X& Z8 lvar BIOS = xdc.useModule('ti.sysbios.BIOS');7 k; J0 C% a- I+ Q: ?8 D, U9 g
BIOS.libType = BIOS.LibType_NonInstrumented;
* T N9 C% O0 ^! D! c, B5 ?" ?9 p6 L2 C. S; Z
, S( S3 ^+ v7 \- T, x
8 t8 X2 ?1 l! {% k* }xdc.useModule('ti.syslink.ipc.rtos.Syslink');0 Z' e3 M% L" O; t) `6 Z3 K2 S
, z, r, L4 ~5 }; V4 g$ g, L
' S2 @. K7 L: }. h% j% n
2 v: N8 k+ _6 A( G4 A" B2 n+ R# pvar MultiProc = xdc.useModule('ti.sdo.utils.MultiProc');- D2 I! L; l# U3 I
var procNameAry = MultiProc.getDeviceProcNames();( \& n ?7 h6 H# a }
MultiProc.setConfig("DSP", procNameAry);
) f8 Z' l* M) C2 M7 c7 `/ P3 O) {4 T. r+ a% ?/ y( J
: Y0 z! M$ A# ]3 C0 ~1 k5 ]# p# g7 Q, U/ i1 e. q( h
var Ipc = xdc.useModule('ti.sdo.ipc.Ipc');# X* a; s K! J8 |
& J) `* q0 A& i7 p: A5 |2 a
! v6 n) {, y6 a$ z) B1 V3 {0 Z) z) b/ I$ O+ ]/ o/ ~
Ipc.sr0MemorySetup = false;
& g0 E. W" f0 K- [% w/ L
8 Y" U- z4 w% v% v/ y, P8 T
, V! s! q: ?* W9 u& B+ Q* @6 M% @& D+ Z' c
Ipc.procSync = Ipc.ProcSync_PAIR;
0 J2 @, R% s$ a6 }7 |
]! H3 N1 C1 q' n! ]. z3 z7 |& Q7 X' |; |6 K4 d
/* define host processor */0 |- G7 h1 u- k2 [3 \) A
Ipc.hostProcId = MultiProc.getIdMeta("HOST");, A, Y$ h0 M# ^5 O/ T
' d7 i& e7 d w8 H9 G1 G! ~ m1 G
' ^+ I( @6 u" `6 v0 U* U/* shared region configuration */) V; C. \# A2 W5 L5 U; d. E
var SharedRegion = xdc.useModule('ti.sdo.ipc.SharedRegion');) x6 T. k2 C' X1 ~: Z0 q
g7 p5 u2 o5 x- Y
+ p. r( I& W1 u- P! _" V6 U/* configure SharedRegion #0 (IPC) */
% _3 y- |# I) ?) ? Bvar SR0Mem = Program.cpu.memoryMap["SR_0"];
; {( m1 {2 [) u+ b S- @7 G6 X; |* a3 B. R# l0 c
# t& T& S7 U, K- O- `! n; I/ V! v% j8 H
SharedRegion.setEntryMeta(0,; |1 H+ C$ D7 u S
new SharedRegion.Entry({, b5 e- K+ j2 o* R, Q. W6 e
name: "SR0",
# z, h8 `8 E% _* ~) h1 ~7 L& c base: SR0Mem.base,
6 g$ J8 V) B& ~, F/ H len: SR0Mem.len,
" o$ @! S8 j9 H- l ownerProcId: MultiProc.getIdMeta("HOST"),' A8 r5 |6 a' j% j9 ~
cacheEnable: false,
; H2 E0 m ~; ? isValid: true1 g" J- M, `: s0 s( r
})
: F7 C& y. X' W);9 j5 F2 \# |7 f- D2 \4 `% K8 } G8 E; _
& `& N4 V+ w2 a, w7 i* C* i- v
& [3 i. v" R- k- ]' Z6 e/ X5 H3 t6 Z7 A5 d' e R+ a) Q
6 H% M( q$ L6 {6 |
* O4 l& M7 ?# G E2 X# LCache = xdc.useModule('ti.sysbios.family.c64p.Cache');
" n @; P) L- h& f+ b, xCache.MAR192_223 = 0x00000008; /* xxxx xxxx xxxx xxxx xxxx xxxx xxxx 10xx */4 o8 G& l6 r6 m" V' ]" t% Q0 ?
) @& D5 u1 C+ N6 q5 }0 P" x8 s0 C \8 Z
) `, P0 p: A1 U" y$ i, N g: Z
2 x" w( q: \9 q4 E8 J. s2 `/*
* w1 q/ U: H# a, k$ J0 c * ======== Operating System Configuration ========
% A7 a9 c0 Y6 t9 r */
. y: s# Y2 Q+ ]; W# _3 ` M. Z% w6 g7 z& \6 i( D& m
- w# b, N+ u: k, g& o5 \" y/* no rts heap */
2 a8 Q1 Z' ]" D# n) CProgram.heap = 0;" j7 I9 N4 q F
Program.argSize = 100; /* minimum size */
+ p2 p d: w/ g3 Y. eProgram.stack = 0x1000;0 f' G6 g. D* M/ |' n( ~
/ C' D, H, X& k" i$ ^& f
9 ^# _! _4 H8 c, R/* create a default heap *// o+ z V* X$ e
var HeapMem = xdc.useModule('ti.sysbios.heaps.HeapMem');' |, A/ w: C7 `0 Z: F# ~/ `7 @
var heapMemParams = new HeapMem.Params();( W& S9 i% S, z* |; o( C6 p7 M& w" j( ?
heapMemParams.size = 0x4000;* j& t4 c9 s9 b }# E+ q+ z
/ a0 j2 i& t4 e5 @/ I1 ^' _# v$ F, f3 }$ f! B0 T# W$ R
var Memory = xdc.useModule('xdc.runtime.Memory');
7 w/ `* \5 l6 ?0 O+ eMemory.defaultHeapInstance = HeapMem.create(heapMemParams);
9 O# p, |+ Z) G5 `0 u4 R* V% {% L3 h" w0 N5 }8 r
" q* l3 q$ O+ V) q" x# `1 ] [6 J# z/* configure System module */2 k$ e. c! N) n3 ^$ G
var SysMin = xdc.useModule('xdc.runtime.SysMin');
5 z: i0 ^4 z5 [7 l3 y' VSysMin.bufSize = 0x1000;
F, Q( ^" A9 ^/ l; qSysMin.flushAtExit = false;% _0 \6 a8 v0 V: i' g9 \* q
w# s; T! ?. w$ i
/ M! C% w/ A6 T) m/ tvar System = xdc.useModule('xdc.runtime.System');
2 \" Z2 A* y, pSystem.SupportProxy = SysMin;9 Z5 s" j+ H6 g3 q) A
: ?* g8 q. \0 U
8 Q$ q$ @! T. @. p, W7 d/* configure SysBios to use the lower half of Timer 1 */5 K1 x, J4 l: X$ ]
var Timer = xdc.useModule('ti.sysbios.timers.timer64.Timer');
3 D. v. a! W" ^, y9 pvar Clock = xdc.useModule('ti.sysbios.knl.Clock');9 k- S0 e* b/ t' f2 B o
Timer.timerSettings[1].master = true;
- ~- \; _/ e) o9 A; ^% C7 h5 qTimer.defaultHalf = Timer.Half_LOWER;7 X7 I) z: M9 C" c7 M' [; J1 L/ D
Clock.timerId = 1; d) P3 j B1 q$ m' I
g/ @6 v' g% L8 U/ X
1 N# U* }, I( G; A5 k6 { K! ^+ T
4 R+ E' W+ l9 D H6 ^# |( f/ ]. J+ J3 U
|
|