|
[color=inherit !important] 我们这边用的你们的开发板,测试双核功能,目前遇到的问题是:2 Z, J) ]! o0 Q8 J* W
[color=inherit !important]1.ARM端Linux 系统正常进入到文件系统中 T* W0 l& F7 |
[color=inherit !important]/ W+ s' Z* M5 a9 u- d5 @' O
/ i/ E6 p! N9 y4 Q, o7 d
[color=inherit !important]2.DSP端运行基于sysbios的工程,在工程中通过如下设置定时器28 n! M# N& G. V: E
[color=inherit !important]' B, h$ R* a/ j7 l" q) _" M
, [" f. ` o q
timerParams.period = 500;2 c" K+ w- K N
timerParams.periodType = Timer_PeriodType_MICROSECS;! X- K. F& s9 i6 l
Timer_create(2, Timer2Proc, &timerParams, &eb);
# ~5 Y7 m" J, p% {4 _" `( E9 G
/ M% ]+ z/ O0 a+ B1 ]
/ o1 B9 e! |( g$ d: x/ B3.然后在定时器Timer2Proc()中断函数中进行翻转GPIO的操作,然后用示波器去看GPIO的波形,发现产生的波形周期为960us(正常应该是1000us);# V5 T9 e- D" E+ v, v+ b
产生了定时器定时周期和我预设的周期值不一样。附件是我dsp.cfg文件(只能上传一部分)。请教一下这个问题是什么原因导致的,如何解决,谢谢。. M) x$ ?' X- l+ U4 c
% B- C2 \) T( m5 |/ w; K1 a; H* _8 w! N/ m3 N
3 ]+ j+ G& O4 Q6 p* ?
/*
1 K3 ?% g7 Q+ W$ N ^6 | * ======== Dsp.cfg ========/ J2 h2 J; O" ?$ m. P% s
*
x! \- w- @7 V# }' K. W */
4 B% d3 N% K" B2 ?$ n* S+ ]" ^( B8 }! d- y
8 a6 X8 t* E. q) ^' c
/* root of the configuration object model */
5 b7 l( K7 ^" i0 Y) V& t* Mvar Program = xdc.useModule('xdc.cfg.Program');
! O7 C/ Q# n, k3 m3 k7 R9 ~
; h9 ^7 @* q/ q# N9 e0 y! J1 D* f: f7 i* s
/* application uses the following modules and packages */
% ~! _$ m H( vxdc.useModule('xdc.runtime.Assert');' v. \' l' U0 ~! I
xdc.useModule('xdc.runtime.Diags');9 n) d! |% B$ D
xdc.useModule('xdc.runtime.Error');
2 T4 z# { L2 n; `xdc.useModule('xdc.runtime.Log');7 ^' A: [" r0 P
xdc.useModule('xdc.runtime.Registry');1 _8 ]5 l2 C/ G; p6 |( U1 r
5 z# h- {: O/ D1 y' m, ?( M0 e7 R" A1 N
xdc.useModule('ti.sysbios.gates.GateHwi');
; v' {: i, b- i Zxdc.useModule('ti.sysbios.knl.Semaphore');. L+ [* H: Q& `: Y, O. ?; I
xdc.useModule('ti.sysbios.knl.Task');1 ]) ]) \% d( r. o
, P& M! t& S& A- X% p9 i, i
$ _& Z& T' y/ A0 k
" T4 b5 k# _' R, t ^" L
* L( o0 x$ e/ N1 G. U& g) {
- b9 W; W" O$ f9 z) t) O; v5 X$ l" e8 {7 t$ J
3 e8 @% z% ] Y* Jvar BIOS = xdc.useModule('ti.sysbios.BIOS');
' D& N/ v6 a9 c' A: Q- ~BIOS.libType = BIOS.LibType_NonInstrumented;$ S$ U, l* ]* M; d
9 Z; v* k" Z f9 i0 S* A( k1 S
& @; ^9 N( h# S! k' l% ]( [' p' i
' r$ @; f5 _$ j# a4 u6 j5 @xdc.useModule('ti.syslink.ipc.rtos.Syslink');( o! h) a9 V% {- m
) ]; e4 y4 m2 R0 z, Y
# v, M$ ~: i0 S( Z4 o
0 \( w1 O3 j j z( S# {var MultiProc = xdc.useModule('ti.sdo.utils.MultiProc');
* @* Z6 |! m- e% H1 j: J. ivar procNameAry = MultiProc.getDeviceProcNames();
3 h5 ], X$ d2 z' oMultiProc.setConfig("DSP", procNameAry);, G q$ Q r; `' s1 q( P5 q
& }+ n* g% P6 M& H
. {4 J, d8 y6 \8 Y8 _; I
$ V0 ~ J% m/ `+ ^. ?5 G" T
var Ipc = xdc.useModule('ti.sdo.ipc.Ipc');
6 v& _) R5 \0 L- i) x$ f7 a! w* m g x$ U- l7 z8 T
0 W0 K ^1 ~- g2 _6 Q( A: \8 |% U4 H& b
Ipc.sr0MemorySetup = false;5 }$ J% y2 R8 r( P6 ]9 V8 c' O
8 u4 S0 z5 m% h( o; \. ]1 O1 `* a) _! S2 z+ D9 M
; \% O- u. z# Z6 ~( v9 c1 X9 p: M
Ipc.procSync = Ipc.ProcSync_PAIR;+ U3 n" K* X1 X1 K( ~
* B/ Y/ s/ c# I3 g, f& s
* N, {+ C3 ~; S& _6 A
/* define host processor */
( m) ?: h6 u" wIpc.hostProcId = MultiProc.getIdMeta("HOST");
9 x: y4 `3 ^% p t
) x) W# i1 b! M' c
+ a5 V5 ^8 ?7 b; G/* shared region configuration */. C2 ^; d" L( @" H4 j! I' p
var SharedRegion = xdc.useModule('ti.sdo.ipc.SharedRegion');
% [" K! c' A/ Y7 ^( \5 I; Z6 v" U
* ?& |& g9 I8 |5 `5 `! F! q/* configure SharedRegion #0 (IPC) */! O" w v$ x+ T
var SR0Mem = Program.cpu.memoryMap["SR_0"];
: K# ^3 p3 \. U( N# h- |, S6 i+ S4 N# x8 i0 ~
& L: j8 U7 K! S @/ C$ [3 d7 G
SharedRegion.setEntryMeta(0,
& E& |8 [* M: a/ P" A# t/ |9 ?5 } new SharedRegion.Entry({$ d9 T& q0 H& |$ e
name: "SR0",/ U, J6 S) f4 f4 @' C
base: SR0Mem.base,1 b% {/ a3 d9 v5 e4 S$ ]& k
len: SR0Mem.len,
# G; C% T% I' s1 e% ~0 C ownerProcId: MultiProc.getIdMeta("HOST"),2 W, l2 J( S& L3 A; f# a
cacheEnable: false,
$ p; s7 Q' P- }( u isValid: true
+ ~; [# |+ K( i N7 i })1 {$ B# r8 a5 @1 L7 | v/ d1 k8 Q P: S# Z
);1 C+ M% V3 D, Y2 b- s9 M! W
6 d& ?; t& H+ T+ P
& t" j$ v9 H7 X5 w% h9 F6 i4 P% v3 g( K0 Y a2 ^
9 I. D! T6 X: v( }( a9 v9 X# B4 B) H% o* p+ u, d1 F2 z- |: }3 Y
Cache = xdc.useModule('ti.sysbios.family.c64p.Cache');
7 W& c8 G9 Z9 l. w3 J( j, YCache.MAR192_223 = 0x00000008; /* xxxx xxxx xxxx xxxx xxxx xxxx xxxx 10xx */
9 q4 K! b i3 r( {6 B: m9 @% B7 V" C& A+ n5 V8 O3 _
2 R, r& Y8 e$ V3 I
) s! @3 [( O# V* h: o/ T
6 l E9 X" r' k4 Y. s: I
/*6 v" ]0 m1 \- w8 r
* ======== Operating System Configuration ========& z) _9 T2 ]8 O
*/
8 {. J# t- p S6 F/ y1 @* Z% A. _1 F* D! \) a# \6 Y
" [) k+ j( ~. `0 i6 z4 |/* no rts heap */
: `+ m! {8 a0 }1 r7 q( KProgram.heap = 0;: b @/ L: X$ d" D5 r% K
Program.argSize = 100; /* minimum size */
/ p$ M& B' g+ |, z' L, b" MProgram.stack = 0x1000;7 v1 b+ E7 N* _& M/ v5 Y
/ \/ K# x, [8 z- a$ t* X
; r$ ~% i, T" A4 N7 R7 p6 W1 O/* create a default heap */
: I# z: s2 U, w' s' Z: Vvar HeapMem = xdc.useModule('ti.sysbios.heaps.HeapMem');( ]' y z" m2 q: r- C2 {4 [
var heapMemParams = new HeapMem.Params();# n) y4 p0 T" s6 z3 f
heapMemParams.size = 0x4000;8 a. |) O5 q9 |( ~( L; t
. }/ ], E! t% C4 s+ i( O, Y) P; D
* B5 G/ `1 m8 Avar Memory = xdc.useModule('xdc.runtime.Memory');
% z9 g. k& L& d, oMemory.defaultHeapInstance = HeapMem.create(heapMemParams);
3 w6 A# T7 s% n" z
6 ?0 ~. g; F$ {- v: u# [# S4 K
* {7 o' \4 N$ h _* m" L/* configure System module */
& f: ?2 a. ~& N8 Z/ f4 |7 Mvar SysMin = xdc.useModule('xdc.runtime.SysMin');
" g6 F( A. X+ o2 Q' z& U( I) `; OSysMin.bufSize = 0x1000;
" V$ w) Z( q5 ?( F5 pSysMin.flushAtExit = false;7 c: C* ]+ f! r" m, ]5 n$ Y% i! E
" T% u, A+ n$ e/ d& |
+ {+ ^# I1 h s6 G' j" evar System = xdc.useModule('xdc.runtime.System');
; `0 m) Q+ I. ^& T( s, S4 e2 ISystem.SupportProxy = SysMin;0 m( y8 }* v2 K
% V- m9 Z# d! U; v, O1 c
& a! X$ r! i) `: r/* configure SysBios to use the lower half of Timer 1 */4 V0 `* v8 `$ O1 Q5 H
var Timer = xdc.useModule('ti.sysbios.timers.timer64.Timer');
" g, m# o5 Y2 R. z: r. |var Clock = xdc.useModule('ti.sysbios.knl.Clock');
4 K+ F0 l. ?) ~4 J7 RTimer.timerSettings[1].master = true;: p! c0 _: k4 V- w% }# k; h$ S7 L
Timer.defaultHalf = Timer.Half_LOWER;
* o) g0 E% \9 i, R7 N% jClock.timerId = 1;8 j' z+ n( N( A( ^6 f1 p) t
6 `3 M4 _6 S9 o W
+ Y) _" N5 u; d
* I9 W+ B5 V8 k( T, a+ _ p
+ x& H, w7 V- b, E- }" Z/ L
|
|