|
[color=inherit !important] 我们这边用的你们的开发板,测试双核功能,目前遇到的问题是:6 c2 z4 z c* h7 n. @5 x
[color=inherit !important]1.ARM端Linux 系统正常进入到文件系统中
! u% G8 t( Q6 z+ T+ k[color=inherit !important]
( E$ T& y# S* A4 K' f' z* |) U7 a% l+ s
[color=inherit !important]2.DSP端运行基于sysbios的工程,在工程中通过如下设置定时器2* A6 J. ~+ B5 b6 L. o
[color=inherit !important]
; O9 b/ i# _; @5 W6 {2 o, z2 u7 D( N0 }5 d* @
timerParams.period = 500;
+ d8 G% G( s3 PtimerParams.periodType = Timer_PeriodType_MICROSECS;1 X6 G- u5 g2 w
Timer_create(2, Timer2Proc, &timerParams, &eb);2 p* U k) n% g2 @3 ?; ^9 I$ Z
# B. [6 T8 `' M- X$ J$ J
/ n: F% z3 A# A$ l* v# ?# Y$ O8 `3.然后在定时器Timer2Proc()中断函数中进行翻转GPIO的操作,然后用示波器去看GPIO的波形,发现产生的波形周期为960us(正常应该是1000us);
- P& e, c$ x( V# m8 Y产生了定时器定时周期和我预设的周期值不一样。附件是我dsp.cfg文件(只能上传一部分)。请教一下这个问题是什么原因导致的,如何解决,谢谢。
' z' R0 ~1 P% z r
- a- [; X. c: r \! T# K
0 \9 b2 j4 ]1 X' D/ x% \: v" ~" T) H( e* y
/*
) |& p- O" F5 q9 i% w * ======== Dsp.cfg ========1 ~0 ~) c& g8 a9 w9 d: I3 f
*3 R1 H; E# m* i
*/
8 b2 v ~9 A4 u$ C7 M: q( U
[7 @" A! c& n" x: O
- \4 d# W/ P& e$ a/ R/* root of the configuration object model */2 F* k2 z5 y. e: y6 S) G
var Program = xdc.useModule('xdc.cfg.Program');$ f, y* g; U, u
( }# R8 o, l3 j/ Z1 ~
4 Y0 F* l$ t3 p. f4 [3 `) ]/* application uses the following modules and packages */* k2 ]2 G. z6 p7 U0 P4 B& U J
xdc.useModule('xdc.runtime.Assert');
5 @3 T6 _! A( t, i/ M5 cxdc.useModule('xdc.runtime.Diags');
& C( ?. f2 J3 @* |) O4 ]. T( @xdc.useModule('xdc.runtime.Error');
+ Q$ j9 y% k7 r0 @' `" f' j2 Hxdc.useModule('xdc.runtime.Log');6 }1 P3 L1 |0 K, ]! ~2 f6 |
xdc.useModule('xdc.runtime.Registry');
. B4 _/ ~- K& U3 H O% W/ d- ^
! `& ~3 G* ~. w" ~! ]/ j
/ j2 ^# W0 x1 O% pxdc.useModule('ti.sysbios.gates.GateHwi');6 M5 t& t. m" {( W8 B
xdc.useModule('ti.sysbios.knl.Semaphore');
( k6 y" O, v+ s9 fxdc.useModule('ti.sysbios.knl.Task');1 D: C3 }: f% A# f
& I+ ]# J1 O# c: m9 c. k
. o9 _7 B8 h. }' p: A* o
+ g/ b9 j- J, b( ?4 b; y
' `& T0 [! c0 g1 i
* c- D/ t" J6 I9 c! S8 t# n
7 u& P/ H1 `6 b% m7 B" p3 V
- |% ^& |- N$ A5 C9 |var BIOS = xdc.useModule('ti.sysbios.BIOS');
0 }- C- F1 g( [6 tBIOS.libType = BIOS.LibType_NonInstrumented;
9 c3 {, R+ q0 b2 O" z7 E# b5 O
& i" r: f7 ^( J8 Y. `* s" k
/ d% q) }* Q8 S5 F* n! d6 ?( O) \! m7 g3 B
xdc.useModule('ti.syslink.ipc.rtos.Syslink');
0 O5 R2 f. W$ x& a j3 h7 U0 w# o# a4 I6 v
" b E# Z. O) D, o, M1 G: ?; h* J* P( p; H
var MultiProc = xdc.useModule('ti.sdo.utils.MultiProc');
: A9 d! n' Z# svar procNameAry = MultiProc.getDeviceProcNames();
, k" a+ K" R A I, w+ `MultiProc.setConfig("DSP", procNameAry);5 r: G, O) t8 n9 s# X$ E1 f+ b
" [0 R H4 I" W! l4 y$ I( F8 Z
5 v4 X2 i' N* D! L o* E( A, v- `& n6 I7 X! ~2 K
var Ipc = xdc.useModule('ti.sdo.ipc.Ipc');' g( i# V( F; K; g# ?
. L0 U* O6 D5 Y8 B* G2 \3 _( L9 ]7 \( H2 m- H1 ?% ]: j
- k' B( T; ?; y# O1 ^) R
Ipc.sr0MemorySetup = false;* r- Z; G' \2 l8 ?
, w% V5 u( e$ k+ l5 T3 x, i0 L% _- }8 f* D
1 l) Z/ X1 o( @0 d
Ipc.procSync = Ipc.ProcSync_PAIR;
( t7 l* L0 ]5 ` f& g3 ?5 S; k/ R
/ Y# E0 H6 f' |0 u, P: H& Y4 q e( T$ Z- I* _
/* define host processor */7 j! X: z" \- \% w( s8 }
Ipc.hostProcId = MultiProc.getIdMeta("HOST");2 R+ z. R3 K+ W$ V
$ O0 P% ]$ [% P2 i
; E1 s G7 T* H- n" r/* shared region configuration */
! i" o% ]( ]- o0 }3 Ovar SharedRegion = xdc.useModule('ti.sdo.ipc.SharedRegion');
: m) `2 G/ P: M' k9 [7 ^" r/ l4 C4 n: E9 ^
" D% g: S+ l: l4 N' w
/* configure SharedRegion #0 (IPC) */
$ i; y- _5 A% ^( l; x6 tvar SR0Mem = Program.cpu.memoryMap["SR_0"];
4 c U) Y( H( w1 W5 @8 X t4 V* K# T* b& i) n
% P* C, N3 V. c5 j+ FSharedRegion.setEntryMeta(0," u- e/ O* _$ p- U# k$ \3 r3 v
new SharedRegion.Entry({
' |7 { R8 L" N) Y7 P( I3 ? name: "SR0",
! P( |2 z0 j2 E4 G9 T) q q3 I7 W base: SR0Mem.base,8 i/ H3 p- f! J$ R) h* D
len: SR0Mem.len,2 m; Y( W% x/ N) Y) z8 u8 N
ownerProcId: MultiProc.getIdMeta("HOST"),* P& i( r9 e- U# s$ I
cacheEnable: false,
6 \ `0 S9 S N( e isValid: true
0 V0 L* l Y& [1 `# d })
. Q1 c; J3 b9 c1 m: a- k* D);
1 y: n5 Y1 M5 F! B9 d" Q- H3 _! i* k7 x# o
2 {5 O( c E7 @% R5 R; U, x. L
; m) @# e" W* ~
- ^6 e9 ~6 { k2 ?. F: K# j) Y. C1 v* A" f/ |
Cache = xdc.useModule('ti.sysbios.family.c64p.Cache');
* U4 s& f- g( ?+ l* @; fCache.MAR192_223 = 0x00000008; /* xxxx xxxx xxxx xxxx xxxx xxxx xxxx 10xx */
1 G' K8 U6 o5 L, e' |
' Q+ C4 I0 @: J: {5 J T9 I# Y& u
8 P; K' w0 [# P) V' {, m s. W% Z* _5 E
! j3 N, }1 l! }8 A/ t% w/*
$ i$ h ?7 r; R& x/ l. o+ | * ======== Operating System Configuration ========
" z5 K( j. t3 z6 {/ H- e */, ~. h9 ]9 ]0 p8 r2 i& d
5 Y( q ?1 V$ G0 K' y2 z( c# U0 m' O, l" o
/* no rts heap */2 Q3 @. g/ Q9 f* L2 i8 M4 ^
Program.heap = 0;4 T6 N+ u0 G: y0 p, d/ m3 Q g6 K
Program.argSize = 100; /* minimum size */
# e3 h, q; y+ v) B0 WProgram.stack = 0x1000; A& _7 H5 p) M8 ]2 _/ Q1 N
) A3 b3 J6 G$ E7 f8 n1 e$ x: _
, z5 U L# D! u5 _6 `9 ^4 f$ a/* create a default heap */: V' v# l9 ]3 g5 o, \3 i
var HeapMem = xdc.useModule('ti.sysbios.heaps.HeapMem');
3 Y0 ?$ k6 D# l$ V( T W, `' Mvar heapMemParams = new HeapMem.Params();
9 [! m/ _9 B! X6 A1 x* I ZheapMemParams.size = 0x4000;
' v# ]: P6 x! _+ T4 c1 W) r- F
* T) O: |: E1 l
! H- s1 I9 ]4 w* G& t5 k! I. z9 rvar Memory = xdc.useModule('xdc.runtime.Memory');
% {/ O' E4 |. KMemory.defaultHeapInstance = HeapMem.create(heapMemParams);7 l5 U4 `0 L$ C8 f" ~! P6 N6 J% a
* c0 D5 N* U( U5 B2 h5 }
' V$ \$ C1 \1 G' q) t* a
/* configure System module */' t: X4 f- W! T2 y* a
var SysMin = xdc.useModule('xdc.runtime.SysMin');' G6 C" z9 b7 X) b. V3 f, m! i
SysMin.bufSize = 0x1000;- {2 k4 @# @/ `% l( M' Q1 s0 i' b
SysMin.flushAtExit = false;. m2 J& r2 ?7 f* I' d. a' R
& M l' m0 [( y7 d. W# I0 l1 [$ f; f' V
y' |0 r' S8 p/ S) m( @& gvar System = xdc.useModule('xdc.runtime.System');
4 U" y; ]% T. \! C6 u/ T1 wSystem.SupportProxy = SysMin;
) _' _. o. K* F+ e1 q$ ^& J
. T# F0 j0 w) T
+ K$ }' L! _8 j: f8 K6 H( M/* configure SysBios to use the lower half of Timer 1 */
! b- q$ G) n* c5 [; d% K% A$ n6 V- Uvar Timer = xdc.useModule('ti.sysbios.timers.timer64.Timer'); X7 ^! v* @! k6 D+ S, b. t
var Clock = xdc.useModule('ti.sysbios.knl.Clock');8 N( ] l9 ^/ R5 Y3 u
Timer.timerSettings[1].master = true;& K4 Q# s& n2 N4 Y9 e U
Timer.defaultHalf = Timer.Half_LOWER;
/ m% N- c+ U4 C& c0 RClock.timerId = 1;2 Y3 k. U' C& v8 u, y: z
' m+ X) |# {3 X" e* U* Y0 Z- v
p' V5 X- ]# k, P
2 b; y* F# J7 o0 \
1 p, C) ]) d3 Q |
|