|
|
[color=inherit !important] 我们这边用的你们的开发板,测试双核功能,目前遇到的问题是:
; {) G% ?4 @: G[color=inherit !important]1.ARM端Linux 系统正常进入到文件系统中
M$ P: n' Y0 p4 n[color=inherit !important]
) }# Y8 ?6 S2 g
: a* P' z4 V) z[color=inherit !important]2.DSP端运行基于sysbios的工程,在工程中通过如下设置定时器2
% M2 W' V$ A1 s[color=inherit !important]: \! {4 S! |2 [' `* P) I
% H% d7 o& e% V$ q5 Q( ^( V* ~$ PtimerParams.period = 500;, u5 ~3 [/ S2 n. x: G6 ^: R
timerParams.periodType = Timer_PeriodType_MICROSECS;
4 [5 o8 X5 w& Q3 @Timer_create(2, Timer2Proc, &timerParams, &eb);
9 O0 `- q* t' m9 I. a9 s9 M; }% p4 T( G, @4 e( K+ ]+ e5 d3 w
1 o. }& K. p3 e% f. ~& {. v
3.然后在定时器Timer2Proc()中断函数中进行翻转GPIO的操作,然后用示波器去看GPIO的波形,发现产生的波形周期为960us(正常应该是1000us); x7 {* `0 M. O3 [' u# k: {, a
产生了定时器定时周期和我预设的周期值不一样。附件是我dsp.cfg文件(只能上传一部分)。请教一下这个问题是什么原因导致的,如何解决,谢谢。
! x% N7 x0 Z& W5 F
- d* B& C) Q% `% e3 ?
4 w2 R8 S5 C8 c/ V* U& R0 ^" Z2 a7 c F9 Q( J
/*
6 k* t! R1 j+ B" }+ C * ======== Dsp.cfg ========2 a4 G/ L" T( W/ y
*
2 j! @# |( u& `3 @3 Y, a; e5 u9 K */8 x( ~- n8 e8 N l" `0 y* @
* _. t# m9 Q4 B2 `) ~- ^4 i
% v, k$ V3 L) q
/* root of the configuration object model */+ E1 w0 B1 v) n7 x1 Y0 i8 i
var Program = xdc.useModule('xdc.cfg.Program');% Z" K# Z$ \6 |8 w# ^
% x2 Y- F1 ^. W% Y
& P- j7 n: M$ B# \( b2 `/* application uses the following modules and packages */8 J5 E& m/ O2 [& h" ^9 H8 Q
xdc.useModule('xdc.runtime.Assert');
6 A0 F' D: L" ^$ T; Z6 g7 X; s9 Xxdc.useModule('xdc.runtime.Diags');
4 I" }/ _; z3 A: c1 T9 Lxdc.useModule('xdc.runtime.Error');" t( U. ? s$ g& Z. x5 X" \: P, k
xdc.useModule('xdc.runtime.Log');
: g$ ^6 `9 j1 w4 K$ K# b# txdc.useModule('xdc.runtime.Registry');: `( K& b/ ^) s' P O- s
+ P7 A3 p- T! d$ b% B# h: z$ y+ d0 F3 }) O9 Q1 f
xdc.useModule('ti.sysbios.gates.GateHwi');
; [9 c9 p+ H/ j* P( Q) `3 w2 A6 a: x7 cxdc.useModule('ti.sysbios.knl.Semaphore');
7 f/ d* e, c7 V! T' k. ?xdc.useModule('ti.sysbios.knl.Task');5 I5 J* f5 l, D2 z0 ^4 L- [; `
. X7 U4 r0 O: u- | C5 s
' N7 w6 W/ D0 C. {6 V- B7 O
# K1 f* ?* i3 {; V: P1 D) N5 a7 p
; n3 R. T2 a# O0 E3 \
; m6 u' |- O! x a
3 P6 V5 i* t1 [& Y8 @# p2 v: s3 @: E: |- d" d$ D; Q% E) [
var BIOS = xdc.useModule('ti.sysbios.BIOS');
' m* ]- G' b3 I" M( b- y1 }5 H' xBIOS.libType = BIOS.LibType_NonInstrumented;
7 T& V S% E1 n" V: p, N3 }9 n; J" x4 N% L I4 s/ l: `# N% b
" u* P% O: S) u$ e, z" F& Q( ]+ p& p4 z+ E/ I* c! {
xdc.useModule('ti.syslink.ipc.rtos.Syslink');: Q7 R k8 x) G# f0 f9 `! y1 V9 c
- }1 p) I2 c# s |6 @0 A
! t$ W, V/ k3 m: A- O* W) O% m7 z/ Z4 f) M& k
var MultiProc = xdc.useModule('ti.sdo.utils.MultiProc');
( v- _* |+ `/ f/ Ovar procNameAry = MultiProc.getDeviceProcNames();
$ i$ h& g8 f$ V$ j! P# sMultiProc.setConfig("DSP", procNameAry);
; h" h$ O% S9 o8 h
. q! f t' S$ D4 N$ P- R+ L9 f u# c% A+ m5 v8 n S
8 M: C2 a2 e# O
var Ipc = xdc.useModule('ti.sdo.ipc.Ipc');
' w' L T6 a$ C! L0 d N) ^5 i4 {+ U. [
* s% }% N2 V9 b' F
! T5 ]& L; Q# W7 ~# p5 sIpc.sr0MemorySetup = false;! N* Y# j4 n5 b; w7 {; W% [& G3 [
# A# M! o9 y8 X4 g8 a: b$ N+ y5 O+ g4 p8 D+ \) b
& d4 _% L6 Z" |& CIpc.procSync = Ipc.ProcSync_PAIR;& A, y/ o6 s, x, k/ e0 |
" M- w S A' f* z% C0 i; [
5 k$ X3 e: C( T" J9 X! i/* define host processor */
, s9 G+ r9 c) B" m# c) ~Ipc.hostProcId = MultiProc.getIdMeta("HOST");
! r. g" W- N5 s+ } d8 F1 c* h/ h1 [) N% [( h) k
, ?% @, P a' i/ e
/* shared region configuration */
' ?9 r3 ~1 Z' `* Gvar SharedRegion = xdc.useModule('ti.sdo.ipc.SharedRegion');
^+ m; [/ s. M4 B7 v2 R) ~8 g6 }" q$ O5 h g& N
3 C) z' J1 ]% c5 K# c! F/* configure SharedRegion #0 (IPC) */: M. D2 T/ h3 B% G8 a
var SR0Mem = Program.cpu.memoryMap["SR_0"];8 n6 r4 c' j" q4 O% a- ]
1 _7 b# p: I- I9 B" s* z3 h) r
+ X' N( [, [8 y0 tSharedRegion.setEntryMeta(0, `* \5 R1 K# |( T" ]6 c: I8 p
new SharedRegion.Entry({$ Y. E1 Z, M" R4 j
name: "SR0",0 ?+ Q. _: }) C3 l* N% w
base: SR0Mem.base,7 y6 T! }, F ?: B
len: SR0Mem.len,
$ s3 o5 `7 M5 b ownerProcId: MultiProc.getIdMeta("HOST"),
) Y6 d5 @; o; N cacheEnable: false,
9 T. S0 @) i1 e2 O. l) Y0 h isValid: true
9 ^0 Z( D1 V% ?, I$ l1 u* N }): j; j" O e- c+ T
); e }& b! C& j( ?2 t
3 T! C! d9 b+ e) @8 x% K; ?
, k3 |! i- |4 Q+ _, r& B
! ?' S0 \2 m- D4 j0 e
% c/ R. \: W' K/ a' F! l2 p
4 b9 ^* V5 i f8 G% B+ [Cache = xdc.useModule('ti.sysbios.family.c64p.Cache');. t7 J) }# P% f1 I/ w
Cache.MAR192_223 = 0x00000008; /* xxxx xxxx xxxx xxxx xxxx xxxx xxxx 10xx */
9 a v5 q! H2 }/ H8 C* e% u
. i; b! t0 Z- o% U
! ^$ @+ k1 e, ^/ o$ j, y" J' X9 G/ V& s8 g: Q7 v
0 m& y1 v/ \5 o# N+ L
/*9 D; U2 w3 V. O& C
* ======== Operating System Configuration ========
+ ~( {+ ~; h) V* B1 `3 D */& g. f6 `, W8 b# Q, f
: X3 V# S7 v0 u! s7 p' b, I2 P* c
P) H9 V* ]% ?2 D [3 }) G/* no rts heap */
1 J9 w. U3 c: R% m H, |+ n6 J6 ^0 bProgram.heap = 0;
2 k' @# D4 R! h' ZProgram.argSize = 100; /* minimum size */+ _2 t x! i9 A: {. \
Program.stack = 0x1000;3 B9 E$ E+ H/ E) Y$ V# s+ `. |
6 m/ {0 u6 [* B9 r) Y
# s( \- S2 I* [* X/* create a default heap */$ S. D% m) _, M4 L( m5 O" {0 T- k
var HeapMem = xdc.useModule('ti.sysbios.heaps.HeapMem');. G0 x# \6 N! P; p* D6 v& R4 G; ]
var heapMemParams = new HeapMem.Params();" L K2 j+ F% p2 D- O9 Y& J
heapMemParams.size = 0x4000;5 e$ P+ h6 X3 ]7 a
9 c# c: p: x/ Q6 M
8 H) z9 L; z0 S. Bvar Memory = xdc.useModule('xdc.runtime.Memory');
: p& Z2 }4 @' F. L" Z1 KMemory.defaultHeapInstance = HeapMem.create(heapMemParams);' b6 z- r* B' W& @& G5 V
% q' v2 v6 [0 N4 G+ q; i* j, }! v- {1 C, `% H8 ~
/* configure System module */" r8 y2 B! s8 Z, _" @3 `1 ?
var SysMin = xdc.useModule('xdc.runtime.SysMin');0 _. G( _, W U& o) z
SysMin.bufSize = 0x1000;, W6 x. R1 i- W2 k) a
SysMin.flushAtExit = false;
' S3 K9 @; M$ A' G6 J# j- |7 s- k7 C; F7 Y8 K5 ]" H J9 n% U
$ }, d) M% w$ i- w- W) F4 L/ L5 j
var System = xdc.useModule('xdc.runtime.System');3 L2 _; F; I" @" t
System.SupportProxy = SysMin;
; x9 [0 k+ f- h8 s2 }1 o
9 Q% `0 @. j5 Z U# } B- [7 {6 {( ]/ x6 e1 Z5 j) _& X( Q
/* configure SysBios to use the lower half of Timer 1 */$ u+ P+ s; O' x2 ]# u
var Timer = xdc.useModule('ti.sysbios.timers.timer64.Timer');
8 I2 C D3 I, [var Clock = xdc.useModule('ti.sysbios.knl.Clock');
& p% d, R7 r% n3 i6 w, BTimer.timerSettings[1].master = true;
0 f" G8 W% d' q, C( bTimer.defaultHalf = Timer.Half_LOWER;9 H$ k7 ?: {8 a6 u
Clock.timerId = 1;$ O) [( ~4 M: b8 R4 p
3 Y$ ~3 L: Z* |5 j) e/ W+ D# C9 z5 f+ {: S
! Q4 Q0 `) a3 t& D5 O
6 H3 D" j5 e" L, t |
|