|
[color=inherit !important] 我们这边用的你们的开发板,测试双核功能,目前遇到的问题是:6 v: J+ h0 v# m
[color=inherit !important]1.ARM端Linux 系统正常进入到文件系统中; E7 R) ?8 s3 A: s5 j
[color=inherit !important]" H0 E! F$ a2 T( D
% R6 g: S" m3 G; [7 K2 r& R: N# Z
[color=inherit !important]2.DSP端运行基于sysbios的工程,在工程中通过如下设置定时器2
2 ~; {2 }( V& Z! m( Z/ F' y. Z[color=inherit !important]8 {- H. A4 J3 {
; H1 x1 {& q# V* K+ h
timerParams.period = 500;& Q1 m- y+ ?+ r3 N3 Q
timerParams.periodType = Timer_PeriodType_MICROSECS;
: Q. V$ M& s0 `Timer_create(2, Timer2Proc, &timerParams, &eb);
* I7 t* G& _: J. _. P k5 X0 Q- R- {3 f3 C) @
' D. B& r; G# Q3.然后在定时器Timer2Proc()中断函数中进行翻转GPIO的操作,然后用示波器去看GPIO的波形,发现产生的波形周期为960us(正常应该是1000us);
8 w$ Z4 \3 h+ ]( Y& d) V$ x产生了定时器定时周期和我预设的周期值不一样。附件是我dsp.cfg文件(只能上传一部分)。请教一下这个问题是什么原因导致的,如何解决,谢谢。8 O4 d/ h1 b6 n. c" T, f4 ?
9 A# [" L( C; Y0 J3 t( ~
' ]9 ~' c8 T- N% q$ T! n2 Q' e5 {; t/ O
- Q$ R/ M3 r+ t5 |) v/*
8 N: a8 {+ l, Y * ======== Dsp.cfg ========
* ]8 e0 K9 _, J M; g. \ *
& ?' j$ B5 V4 a# H { */
' t& r- v9 R, e6 a7 d+ H4 q
0 u& k9 \2 |% n. W% F7 y8 ]) t/ a' w3 m {$ r7 e5 Q8 i2 w; ~
/* root of the configuration object model */( _$ g+ f$ r+ d: J: Y+ i
var Program = xdc.useModule('xdc.cfg.Program');
$ n1 ]" ?& u s5 L; h; e: q5 f2 Z
4 H/ j$ t. L Y3 y
' J1 j1 S G& r+ W" h/* application uses the following modules and packages */1 {. p5 F, j6 H% M. W
xdc.useModule('xdc.runtime.Assert');
% k1 e8 c. l6 q9 [1 A$ A! H" \xdc.useModule('xdc.runtime.Diags');
9 x9 B- Y- J0 Uxdc.useModule('xdc.runtime.Error');
0 a# L; D$ P* G. dxdc.useModule('xdc.runtime.Log');5 I) ~+ U" R* z# R a" |
xdc.useModule('xdc.runtime.Registry');/ p" \ D3 i2 [ p
! o# L# f4 z- A/ |) b0 p l
8 ~+ m; g* \( a( @( H6 [7 d
xdc.useModule('ti.sysbios.gates.GateHwi');
& Q; i9 h" `* z6 G8 G J+ rxdc.useModule('ti.sysbios.knl.Semaphore');
- A$ @2 a: k1 Hxdc.useModule('ti.sysbios.knl.Task');
2 }9 w! l; Q, s1 r( x' ~ l+ {1 \/ s# B) z
6 j: E. }: r: z7 x. p0 |# }, c0 n- X
( ?; W7 i; s; A% E$ {, t# p# q+ i
* J- {! Y, n4 G8 @, z% s8 E$ \! A3 t# `! ]3 B
2 X& _7 ]5 Q9 P: h5 F$ Q2 Dvar BIOS = xdc.useModule('ti.sysbios.BIOS');
( A9 j' L4 z" n2 |, F7 J6 f0 WBIOS.libType = BIOS.LibType_NonInstrumented;, e! k0 B" }4 ~% n/ o
' P( ?# Q' T x0 `0 a! u. o1 x
4 B: P+ c h' Q6 A2 k5 `1 d
; z E7 K+ I8 l8 v O7 b7 F; i3 [1 Qxdc.useModule('ti.syslink.ipc.rtos.Syslink');& n6 O* n8 F; B1 w5 j" a+ v( f
* N T! A! w' N w
8 G$ E/ z: p9 t9 Z% E
4 ^' C N1 M& C5 {" R9 Y% I
var MultiProc = xdc.useModule('ti.sdo.utils.MultiProc');4 _6 P8 J7 d3 e2 [
var procNameAry = MultiProc.getDeviceProcNames();
7 {& k9 i) b* ^/ i7 N5 XMultiProc.setConfig("DSP", procNameAry);: J3 T! g. Q1 b4 C9 Q. m4 S8 N* ~5 `/ V* K
9 t8 x) W# T( s+ K& b: i2 L) C
/ W1 [. h8 x2 \ x2 C1 t1 X& @% K; r$ s0 r. h0 a( A
var Ipc = xdc.useModule('ti.sdo.ipc.Ipc');2 \/ V& S j# h7 q
9 p% [8 P6 Q y' u$ u& A$ B
# d3 Q; V! B8 @% `
8 M" x7 H, | I3 R8 j. ~Ipc.sr0MemorySetup = false;
8 t- p# V4 d) q3 d( H9 F
/ h3 S c( A$ E# C k
0 i+ a5 |* k6 e: E8 {) Y- w) P" R& `6 L0 W' r& g5 C
Ipc.procSync = Ipc.ProcSync_PAIR;
- a8 z: K) N: {% G7 X) D& _
# e9 \( m: k3 f
; E# r7 l% l% I8 y' x; M/* define host processor */6 x" {; S( E3 N& N& z
Ipc.hostProcId = MultiProc.getIdMeta("HOST");
0 a* ?; {4 n5 @( Q1 @1 x# S% n; U, z1 a+ P( a
X( _, l1 \/ Z, q6 y3 U6 M
/* shared region configuration */
& A1 J/ {. O: l8 g! w" lvar SharedRegion = xdc.useModule('ti.sdo.ipc.SharedRegion');
4 w: _& P9 j5 ^( f/ n Y* m1 i# X; s* f8 d5 Q! g
; h' ]2 u/ n: A5 E8 Z5 t" {& M
/* configure SharedRegion #0 (IPC) */
3 @# V: H1 y& J. S4 Y' Ivar SR0Mem = Program.cpu.memoryMap["SR_0"];2 w* g# x) x* T4 }
8 B3 m$ D0 L! H f* \% O- S
+ m9 a1 h4 n2 Y3 _+ BSharedRegion.setEntryMeta(0,( Y" m5 x7 y7 V. T, O+ F
new SharedRegion.Entry({. A* Y7 d4 O& B
name: "SR0", q4 q! v) q9 ~9 E) }
base: SR0Mem.base,
4 `. x y. h: u len: SR0Mem.len,% A4 P4 W- l- ]' l$ J
ownerProcId: MultiProc.getIdMeta("HOST"),6 }: u) e" [. e" I v
cacheEnable: false,
+ T7 }0 S+ {" F7 X; w; p isValid: true* @! r, k& d2 U( p# M1 d2 ^6 H
})
( C! H/ \* W6 o% d- D);
4 Y; G0 O* L9 p5 H9 o* `( |5 }: s6 s1 ?$ I) A1 y" L
/ @! t! J+ [& ? ^
: R, j! u9 S5 S$ n/ w6 c
J3 m" r9 i4 o" ^% x4 l7 M+ B
! c0 X M' V" c& M. TCache = xdc.useModule('ti.sysbios.family.c64p.Cache');
- u1 x( }- ]9 u& E0 MCache.MAR192_223 = 0x00000008; /* xxxx xxxx xxxx xxxx xxxx xxxx xxxx 10xx */, G1 p) Y$ i- l
2 `8 }# ^" h& }3 A; U1 l
: i. l( P* i2 }. q w* W" U' e
5 D) S- j/ d" J! D6 W% p# v2 i y0 Z0 v. s
/*; D- H& X$ K: b6 l: x7 x
* ======== Operating System Configuration ========) j) @, l a8 h$ T7 g
*/
4 \" F J: q% ]& `6 ?1 [( k, `8 P. @) W
]6 u+ Z- X' Q+ `7 G' f/* no rts heap */9 c; x/ Z* p0 x2 J
Program.heap = 0;
: W. c1 j& V, |( d; h/ lProgram.argSize = 100; /* minimum size */
; ^8 D/ B$ P" N! q: b3 [Program.stack = 0x1000;
/ q3 d( Y; [6 U: Y k2 n& A R& J7 P. [# f6 I
; E u' C V( }% Z Z+ r/* create a default heap */
! h& w( Q- X2 z6 i! Z+ x! {; Mvar HeapMem = xdc.useModule('ti.sysbios.heaps.HeapMem');
5 i4 l# V' ?) L& I- Hvar heapMemParams = new HeapMem.Params();2 \: P, x7 x; ^
heapMemParams.size = 0x4000;
1 ]; Q1 E: T- f8 b9 l0 R" L9 L; n+ s: l5 s9 e# t2 f
m6 d9 S5 _: Hvar Memory = xdc.useModule('xdc.runtime.Memory');' U/ ~" m. c$ n/ V& ]
Memory.defaultHeapInstance = HeapMem.create(heapMemParams);% @8 p4 n% \3 K+ R5 }' w
% H* d: W2 Z$ O: \# x% f/ g3 r- r* _7 ~* J
/* configure System module */% x& ]. _7 `: G- W/ V9 S
var SysMin = xdc.useModule('xdc.runtime.SysMin');
( ^) \5 Y2 J9 H' CSysMin.bufSize = 0x1000;
4 c' d& [3 i) I: eSysMin.flushAtExit = false;3 U. w( l' a3 E" O
/ c& X" `. j0 A- F" c
, p( F U9 p# u6 _$ B# Fvar System = xdc.useModule('xdc.runtime.System');6 r2 [" F. v5 S3 r z3 r) s/ y& {: `" c
System.SupportProxy = SysMin;
6 e9 c" |7 `: \2 U7 W9 O# l. A4 V
8 v5 o$ W9 e8 b( U
) v! t2 \* S* K. q: y2 E/* configure SysBios to use the lower half of Timer 1 */1 E8 t( F3 S. z- r
var Timer = xdc.useModule('ti.sysbios.timers.timer64.Timer');
# a) [2 W- z. l( W \9 \9 Uvar Clock = xdc.useModule('ti.sysbios.knl.Clock');- ]: I1 Y5 W0 R4 F; i
Timer.timerSettings[1].master = true;
. S6 z) _0 ] V+ QTimer.defaultHalf = Timer.Half_LOWER;
g$ D+ o- o4 j9 w( I! zClock.timerId = 1;
# @5 l! f. ~+ k' Y- M
* A1 Y4 ^$ i: Q- R1 ]4 ~+ _1 t9 K4 e9 |* ?( ]3 h
) A% b- o$ z9 p. a' Y1 `: L, A @& B
|
|