|
[color=inherit !important] 我们这边用的你们的开发板,测试双核功能,目前遇到的问题是:
S3 z0 k1 I+ h# f+ @* M[color=inherit !important]1.ARM端Linux 系统正常进入到文件系统中- o+ O3 G3 }! y3 ^- N2 ~- _
[color=inherit !important]# _" d9 c( \9 V& T- u0 @$ i
" c. x, d, j v7 M5 d; O; C[color=inherit !important]2.DSP端运行基于sysbios的工程,在工程中通过如下设置定时器25 b% F4 E# L: `" \( Y+ z: I
[color=inherit !important]# x* ~ V) b/ M! ]
" v" t b* v8 g6 a4 m
timerParams.period = 500;) I! j/ _# w) c7 k; g7 s- b: Z2 ]
timerParams.periodType = Timer_PeriodType_MICROSECS;2 d* p$ A1 A' k8 d5 N
Timer_create(2, Timer2Proc, &timerParams, &eb);
4 r" u& }0 b( ~" K# D7 v. u& L) @- |2 S; `
7 y* t$ y `0 K$ x! F3 O8 G7 j) Q3.然后在定时器Timer2Proc()中断函数中进行翻转GPIO的操作,然后用示波器去看GPIO的波形,发现产生的波形周期为960us(正常应该是1000us);
- s4 f! v) @! G. B" r产生了定时器定时周期和我预设的周期值不一样。附件是我dsp.cfg文件(只能上传一部分)。请教一下这个问题是什么原因导致的,如何解决,谢谢。
( f, j7 q4 ` P: ]/ [+ d$ o2 O
) T2 ^* w: a- Q/ _' I; v6 R3 Q$ j" k9 _, b
6 D4 O$ g$ D$ D# x4 c/*
' C" ]5 K1 q" n6 ?2 Y3 i * ======== Dsp.cfg ========9 v- |8 x8 \, h0 f$ u u: d
*) h# ]: l; s- w* S) |: X
*/
' D' D7 { V- n& E2 m0 h8 \
, V$ H' B0 S. L% K; Z" N6 x8 f/ }, [* S
/* root of the configuration object model */! K$ i; }1 m9 W3 x) B
var Program = xdc.useModule('xdc.cfg.Program');% H% I0 o0 J1 J2 Z" F+ J& |
" x/ }. C0 \7 H7 D/ Z- D
* ]. D) F& [: }& ]" j1 [: |2 j/* application uses the following modules and packages */
+ J8 ?; u9 `3 Exdc.useModule('xdc.runtime.Assert');
8 \# v( Q8 V+ P/ Z" n' Fxdc.useModule('xdc.runtime.Diags');
0 p4 D$ t7 \( C& Y: Z5 z+ p; W" d. X; wxdc.useModule('xdc.runtime.Error');- N: z+ }6 k# [6 d& l
xdc.useModule('xdc.runtime.Log');/ f* h1 l+ |# `8 E
xdc.useModule('xdc.runtime.Registry');6 F1 q3 C1 q1 C5 e+ ^ T! w
4 @7 x m1 ]$ y5 Q- ?' S5 W" b; J( k0 x. ?
xdc.useModule('ti.sysbios.gates.GateHwi');5 P* `. W7 Z9 N# ?; `. J0 ]
xdc.useModule('ti.sysbios.knl.Semaphore');
9 q& ^& E; |2 G/ H/ t8 g& _ `xdc.useModule('ti.sysbios.knl.Task');/ A/ E8 N( a* R; x
* `5 E( W) e& R3 v C- \- z% b& u& [
$ ?5 n% x9 z1 ]/ ]4 t1 w/ Z5 {% o
3 Y# X8 A4 t/ l# W
/ Q; w; M# N! T j; l9 t7 ~5 }1 G
4 `6 E& R% u) F9 r9 \
var BIOS = xdc.useModule('ti.sysbios.BIOS');$ F) g/ k3 e- c- {+ s
BIOS.libType = BIOS.LibType_NonInstrumented;
) r8 ^! J( S6 F0 ~ D1 C, Y% G+ [4 c2 J( @! K' R
, H& G3 h/ W1 a6 l
9 C6 r R' X/ F( j) Bxdc.useModule('ti.syslink.ipc.rtos.Syslink');
# I2 N& B& P9 J Z! R5 U
+ C$ ^2 X3 @; A8 T6 M
+ U7 u8 H: `% {6 q
0 C$ s9 v" X; Q; }var MultiProc = xdc.useModule('ti.sdo.utils.MultiProc');
) n( V2 k8 N5 {1 Vvar procNameAry = MultiProc.getDeviceProcNames();/ {% G1 c1 [7 R' i+ Y1 `' B) M9 E
MultiProc.setConfig("DSP", procNameAry);
( r" e% k; {0 ]8 I5 W' N" t, ]' T( M/ I5 ~ h
! m2 f! t ~; z, g5 V
' f; I6 k+ i1 U( B' P1 j% Ovar Ipc = xdc.useModule('ti.sdo.ipc.Ipc');5 o! H7 j4 Y) J4 m1 @% Q) E
4 w. D) ^+ k* b6 o& P$ E2 v
7 {0 V, R9 K, F! l) O# V
9 F/ L' a6 P% G4 `. f# x2 dIpc.sr0MemorySetup = false;) S- }% O) l. E/ I
* U7 x* b7 h0 i9 f1 i# {) c
0 o2 X( A8 |) S/ y; D1 l
2 Y: l( b8 o4 y: s4 S' l2 C/ N
Ipc.procSync = Ipc.ProcSync_PAIR;3 f' i+ ~+ t; ], S
* H( M- S e6 k+ o, n: n" N* g
: l: Q, ?. t8 @* m$ n
/* define host processor */7 d4 {# a8 t& |/ ?7 }4 l# |8 A9 ^9 B
Ipc.hostProcId = MultiProc.getIdMeta("HOST");+ B& q* }- I( {* X, U C
+ l d/ X' `; ~+ b) p
O% X5 F& Z, n8 R! F" o6 }3 J" u
/* shared region configuration */
$ p3 h8 s/ G9 b" Wvar SharedRegion = xdc.useModule('ti.sdo.ipc.SharedRegion');
4 M% c" j+ c8 ~/ `+ ~0 T0 R
! w2 X( f \2 V' C; d8 F; l" f0 {/ [! r, R, n
/* configure SharedRegion #0 (IPC) */; w. Z0 ?4 @* K3 B
var SR0Mem = Program.cpu.memoryMap["SR_0"];
H; X3 \3 L) b. s% x
- A5 {; X5 j- h& F+ ^
9 k; \* b, W( C1 W& M6 W1 XSharedRegion.setEntryMeta(0,( f$ M: b: e {" v* g' V
new SharedRegion.Entry({
, H" L7 Q B4 K g/ D* m name: "SR0",: V" P. ^; C; s
base: SR0Mem.base,
0 ^1 l# E f1 X; ]: J: }6 N len: SR0Mem.len,
+ q6 r" o; f2 S+ b6 W ownerProcId: MultiProc.getIdMeta("HOST"),) s- \) j* Y' U9 ^% n; u: ^
cacheEnable: false,
, @5 e; P2 ^1 p5 R9 z isValid: true9 ~0 b0 Z( l' D e0 x/ J: q
})
1 ?% L. E0 ]& t: X- i! u. \);$ G/ b' l2 Y8 w0 s w9 O
% _ M* }+ c$ h! E
$ m8 [, a' `. Y+ I
0 f4 k& U- i) ^) j/ T, b9 k4 w$ s& n4 j
- E, V1 k0 I& { S" c* |! R, A% y
Cache = xdc.useModule('ti.sysbios.family.c64p.Cache');
7 B/ Y. ~& ?3 S. |$ o% Q0 GCache.MAR192_223 = 0x00000008; /* xxxx xxxx xxxx xxxx xxxx xxxx xxxx 10xx */
- Z& Z {* G" L/ Z- L2 ?
4 a0 [/ K8 y, Q7 T
" z& w" M. f; e) F3 F4 `! H0 g
9 V+ k+ p/ e6 x, ?6 ^* U4 R) p0 U) x' R' n& _2 h
/*
2 {6 [: u. @8 m6 J4 i. L7 a3 v7 ~ * ======== Operating System Configuration ========
. m8 ~. a/ j8 W) Q+ {) ~ */
0 [5 s+ O: y% ]" g$ c+ C/ v! R' N( s& Y/ ]4 E# h. q+ A8 @
9 `$ Z4 q) s0 Y
/* no rts heap */6 W- E! C. a/ m2 k% v/ }! b3 [
Program.heap = 0;9 r) g: H( a& D& D& r( K0 z
Program.argSize = 100; /* minimum size */# i, I# w) B; X' U) W( H5 d' O
Program.stack = 0x1000;- d. W5 V% d# ~% N1 y$ ~
' _& D2 |; {# @: z% j5 G' o8 m+ K# p: Y( v
/* create a default heap */4 R+ K* f* |' }2 U+ f
var HeapMem = xdc.useModule('ti.sysbios.heaps.HeapMem');5 d9 d" S( E# E% Q
var heapMemParams = new HeapMem.Params();- O8 i& y/ h# O$ Z$ g( A: o; C
heapMemParams.size = 0x4000;; M% g; N7 q: Q f
v# q4 L9 K0 m# @( G" V. E6 j, { f) J
var Memory = xdc.useModule('xdc.runtime.Memory');
9 M3 B9 y( C9 x4 a! }# l% ]0 o0 hMemory.defaultHeapInstance = HeapMem.create(heapMemParams);
$ g! ~9 q% s! x" w6 _9 }, b) J) y; H
) o O. C0 A. S5 l) u& e/* configure System module */. e y5 Z, Z( y8 n+ `: [
var SysMin = xdc.useModule('xdc.runtime.SysMin'); h" k/ E6 z. f% x9 T! k
SysMin.bufSize = 0x1000;1 }& t$ o5 Y$ d0 o" |
SysMin.flushAtExit = false;- P6 B( {& G3 g1 O; d
; j% B1 h3 V, p6 o3 p( b" `) t) H2 C2 p
var System = xdc.useModule('xdc.runtime.System');* H* u. n* |3 Z5 ^1 x; c( Q
System.SupportProxy = SysMin;+ R) I( {4 Y, H3 l
) ~" W: V0 K5 b+ }8 ?& y9 `
[' G* K( a4 B" X2 j7 O/* configure SysBios to use the lower half of Timer 1 */
& d, n) t. g. a* Fvar Timer = xdc.useModule('ti.sysbios.timers.timer64.Timer');
! c+ E+ G: I4 K4 N& l- _var Clock = xdc.useModule('ti.sysbios.knl.Clock');
# V* B5 N1 S* g) Z F, L) r& nTimer.timerSettings[1].master = true; q0 r3 ]' V2 |2 B
Timer.defaultHalf = Timer.Half_LOWER;
, t* X, A$ }9 M* \2 WClock.timerId = 1;. j9 ?( o8 f9 q. a- \1 ]
, f. H7 E4 i3 o$ s/ G
9 t4 z6 [0 p+ h, W. b- }4 K1 R% G- k! n9 k
/ I- F; g3 l3 L |
|