|
|
[color=inherit !important] 我们这边用的你们的开发板,测试双核功能,目前遇到的问题是:+ Q; j& |8 \$ A+ X$ G$ w
[color=inherit !important]1.ARM端Linux 系统正常进入到文件系统中% U2 y9 j! b @1 z* p: n1 L
[color=inherit !important]' @ T$ w4 s, e% k* h) p/ h7 A
* U! s. ~0 T! e y$ J+ [: G[color=inherit !important]2.DSP端运行基于sysbios的工程,在工程中通过如下设置定时器2
: g6 q( O2 E; K; }" O2 u[color=inherit !important]
/ M) J& _1 n- T y5 p' A
3 V0 y0 ]; g* `! KtimerParams.period = 500;! v! I4 f4 I" t6 m/ _9 o& H
timerParams.periodType = Timer_PeriodType_MICROSECS;
4 I+ X# J6 i% OTimer_create(2, Timer2Proc, &timerParams, &eb);
$ j( i# I+ n E) W
4 o3 @- K8 A! x7 X1 S; a* u+ e- r7 F/ n
3.然后在定时器Timer2Proc()中断函数中进行翻转GPIO的操作,然后用示波器去看GPIO的波形,发现产生的波形周期为960us(正常应该是1000us);
6 H, b% Y6 }8 K0 U产生了定时器定时周期和我预设的周期值不一样。附件是我dsp.cfg文件(只能上传一部分)。请教一下这个问题是什么原因导致的,如何解决,谢谢。* B( Z3 \, Q3 R( b
6 u+ ?" w& l4 {% T5 n* t+ X( J. K& |0 ?' x
; V+ N, n3 \# g/ |/ F# o1 c. Q/*5 F2 c; d+ r2 X. @/ Z4 x. `6 b
* ======== Dsp.cfg ========4 I9 l8 P( `/ `. A I. ?5 z
*
/ w0 l1 ~9 w" c4 O V */
$ T' y. P5 g0 B. r" l4 c" v: l: G2 N. |' V5 Z; u
6 k `* R' B1 X7 d8 w! i9 Z
/* root of the configuration object model */
2 S7 G& F+ U$ S8 L% m3 zvar Program = xdc.useModule('xdc.cfg.Program');# A. ~, K- X% F8 H/ u
' X8 L, c, \. {( B' _' Z0 P$ s3 f6 q7 B, B- ^- Z* I* O f
/* application uses the following modules and packages */! _$ A0 k$ M+ m+ _3 h
xdc.useModule('xdc.runtime.Assert');, z& a9 d% y3 B7 J% m$ B
xdc.useModule('xdc.runtime.Diags');
* q/ j( \( t" o' k% kxdc.useModule('xdc.runtime.Error');
7 c2 ]5 ^. H# ~/ l: Bxdc.useModule('xdc.runtime.Log');! s S3 S9 [2 B/ N, F0 B# U/ I
xdc.useModule('xdc.runtime.Registry');
& Q! X+ g, H' |7 D* l# v, L8 b n1 Q8 S/ ?: H+ S: C A
+ }2 R- U a0 h3 e& S0 L, r/ j* z
xdc.useModule('ti.sysbios.gates.GateHwi');
/ n) g, E6 G! {* ^6 D; `$ rxdc.useModule('ti.sysbios.knl.Semaphore');
2 [$ M) ]/ X) ?6 {xdc.useModule('ti.sysbios.knl.Task');
1 W0 J; P% q5 t3 k, s
& r$ i* ]% _; [$ L* M* \
! d/ i! ?' }6 z/ x8 _ a$ x4 q6 V6 u* M7 T0 M( k8 F
, j/ O) l8 z5 }4 d9 ]5 I/ n. |- Z! T& R: U# C$ G
) T% s4 a+ {/ R2 j. U9 n; _6 z4 z* `( I1 d- Y. C
var BIOS = xdc.useModule('ti.sysbios.BIOS');2 n; p% A2 s8 c
BIOS.libType = BIOS.LibType_NonInstrumented;; ~! s% s7 o# w+ y {
0 ]( o' U) h0 i+ S$ D7 d9 m+ v' P$ g2 W3 a
2 H4 d% c6 D+ x! o1 ^
xdc.useModule('ti.syslink.ipc.rtos.Syslink');
p9 a5 ^+ t0 L+ w
) R7 Z9 M$ b% _8 x: P
! p( V+ ~; [' z6 T0 a
- k0 c4 H [1 b6 M; \6 Q5 {var MultiProc = xdc.useModule('ti.sdo.utils.MultiProc'); l3 v* c+ K6 T5 Y8 v& Y5 u
var procNameAry = MultiProc.getDeviceProcNames();+ Z, v, m. t8 v H
MultiProc.setConfig("DSP", procNameAry);
) v$ e& N% Y) X1 e1 L2 X+ u& K
/ l3 c7 ?( K; q0 W3 l, a& |; R3 E" A( _$ O c7 M3 N; O; o' L
var Ipc = xdc.useModule('ti.sdo.ipc.Ipc');
" g8 |1 T1 w( c; R! F; [" G
; @1 r8 d; w3 \0 i1 _, C0 O& A& z5 j/ l1 R/ s
' R$ e( C8 ^ t: k8 XIpc.sr0MemorySetup = false;
9 [/ i0 q; x& w. s2 x
" \1 }; O$ n: O* \, O/ O
B3 E; f9 W$ [, D' `2 K0 Y& A( o9 L
Ipc.procSync = Ipc.ProcSync_PAIR;& I7 G# G" X" R5 y; [
( \/ R- e( D h; o: N) r- q# p# }0 k, O* ?
/* define host processor */
; o3 D3 J" n% i* mIpc.hostProcId = MultiProc.getIdMeta("HOST");
3 \2 d1 m! a* ?$ [$ S
" e; c% q; c# Y& @5 c' u
! w! Z" u* D$ m' ^/* shared region configuration */
" k$ h- ]2 `2 H& u- ^' W/ U' T/ gvar SharedRegion = xdc.useModule('ti.sdo.ipc.SharedRegion');
# a2 _: ]0 ?' Y7 N0 `' Y- c# m& n( `8 V; Z x1 l1 L) t. W; H: ]2 W
% G7 z+ G$ B2 e% N* o) {+ c+ }# f* T
/* configure SharedRegion #0 (IPC) */( E# C) u# t% x' ]9 I
var SR0Mem = Program.cpu.memoryMap["SR_0"];
q9 C0 \- |' ^7 v5 d4 t# A% ?- f3 z; }( T7 K+ r) ?
; X/ X* f/ U4 s0 D0 B* Q
SharedRegion.setEntryMeta(0,0 v( Q6 A4 E/ S8 ?* `0 b% p7 ?2 I
new SharedRegion.Entry({
- M6 K4 ^$ F( t8 R. O" d; B' t name: "SR0",
) K- V9 [, P+ }# T! ?- G, D base: SR0Mem.base,
6 m& l0 C9 C1 Z len: SR0Mem.len,
. T0 f& v+ U) @/ l$ O! s ownerProcId: MultiProc.getIdMeta("HOST"),
H' h( U/ H2 P5 ]- }: Q- T+ o cacheEnable: false,, s. c& U# i0 A; h( j& F2 T
isValid: true, L N' @- O @$ o' U: ~
})
; e j. G! w; F);9 D3 A' E$ L. s8 G1 h+ j& Z( G
* J) T# {2 A" g9 h
: L) ~( c+ P6 b$ E" H2 E. o! `4 z! r
, t; j. o" c: @3 B+ u% e, Y4 w2 G0 h- W) i- [
4 T! e; E0 E$ H YCache = xdc.useModule('ti.sysbios.family.c64p.Cache');
+ j& p# i) n; d! WCache.MAR192_223 = 0x00000008; /* xxxx xxxx xxxx xxxx xxxx xxxx xxxx 10xx */8 q5 Y/ n$ ]& K2 F( Z. D0 r+ [6 u
2 L! Q. z. X% c' Y. W6 T! I6 a0 e2 K" I z
6 I5 \( `. Z7 H+ n2 O$ i
, w7 j9 q' ]- a% P' d/*
6 n$ W2 H6 S3 B" r * ======== Operating System Configuration ========9 R- R' c1 P5 ^3 s2 Y8 J
*/& x9 u. \3 o6 P( }! _
, Z {0 F) h F) w- h# @ E
9 v5 I; `$ p* b& V7 F+ f( V. {# V t/* no rts heap */
* `0 J6 ~! G8 n+ j3 xProgram.heap = 0;
/ q4 B& b/ {+ C* eProgram.argSize = 100; /* minimum size */( j( C& [6 D! I& P! O; q
Program.stack = 0x1000;
1 _( A/ T/ Q$ K G" o! C2 Y1 L9 Z& R; v- L
1 [9 v7 x/ u8 E/* create a default heap */' R5 N4 l$ j& f: S$ [
var HeapMem = xdc.useModule('ti.sysbios.heaps.HeapMem');+ C& d2 S5 T( e: ^$ j
var heapMemParams = new HeapMem.Params();
9 I$ L9 q2 |4 a8 pheapMemParams.size = 0x4000;
) U/ J& b4 z+ g/ W6 `( _
) o' N$ B/ p a2 e- b5 w: W* ]
, n7 S" Z! p$ R; H+ }5 hvar Memory = xdc.useModule('xdc.runtime.Memory');# P% M8 B) j9 V0 c# {' V
Memory.defaultHeapInstance = HeapMem.create(heapMemParams); v2 H* n2 a$ {1 N1 Y
, U3 ]% \' l* }, Q* M# m `( @8 @+ G! ?) _& X0 I2 ^9 R6 g: P8 g
/* configure System module */
% J$ Q6 Y0 Q' O* U- `- j5 k: Tvar SysMin = xdc.useModule('xdc.runtime.SysMin');
7 T; ~* f& H+ R# y9 U2 KSysMin.bufSize = 0x1000;
. @" k8 j+ `. b$ GSysMin.flushAtExit = false;! z" \( N* h) g6 x) t2 Z1 y, Z
0 w, z4 j- ?, B8 Q8 [2 G
4 v2 v9 B; w: ]0 M5 [var System = xdc.useModule('xdc.runtime.System');. p( V& F; _: V! [. x4 @( T+ J! E
System.SupportProxy = SysMin;
7 L* z6 a5 J+ A1 M2 \
{: V8 I* j- r4 t7 t3 b6 y5 q* Y& i1 b/ D) t/ X v2 c- Z! I
/* configure SysBios to use the lower half of Timer 1 */8 i+ {+ p/ h1 a3 R, W
var Timer = xdc.useModule('ti.sysbios.timers.timer64.Timer');
% \/ y' A' R$ K5 c% Zvar Clock = xdc.useModule('ti.sysbios.knl.Clock');1 z9 d8 t: _/ I0 Z
Timer.timerSettings[1].master = true;
& T1 l, \% N6 ~$ I! GTimer.defaultHalf = Timer.Half_LOWER;
9 k. @$ r: M7 {2 @/ y3 YClock.timerId = 1;& J1 [( k4 G% {
! E+ ]. A' d" U/ [0 x
c# w9 V# L3 C! i0 i7 T
& k6 O9 \) k# b5 D$ s+ k, h8 d2 L
3 N5 r0 z9 m0 Z" I/ b/ i |
|