|
|
[color=inherit !important] 我们这边用的你们的开发板,测试双核功能,目前遇到的问题是:
9 J/ l& T" O1 L: x% w. c- `[color=inherit !important]1.ARM端Linux 系统正常进入到文件系统中
! M8 I! w8 d/ X. C: r[color=inherit !important]
/ k+ j( l4 w* c( H4 l2 G) x/ S1 P
+ n# G4 \& b' \: T4 I1 ][color=inherit !important]2.DSP端运行基于sysbios的工程,在工程中通过如下设置定时器2) u# d- I0 F% \6 H0 k8 n
[color=inherit !important]
( t, w+ L5 \% c1 P" N
9 G+ r. z5 m5 p) H8 htimerParams.period = 500;
- ~( P( E# v2 M, FtimerParams.periodType = Timer_PeriodType_MICROSECS;
$ Y8 Z" I n1 [! z6 |# A1 y; aTimer_create(2, Timer2Proc, &timerParams, &eb);5 T6 s! E( M/ E+ z& m4 k8 W( ~
5 @: _7 ?5 ~; c* L
+ C, z/ O t- c& [+ U/ ?) f
3.然后在定时器Timer2Proc()中断函数中进行翻转GPIO的操作,然后用示波器去看GPIO的波形,发现产生的波形周期为960us(正常应该是1000us);
9 E2 K6 q) o$ ^2 x8 c* _( |: H# r产生了定时器定时周期和我预设的周期值不一样。附件是我dsp.cfg文件(只能上传一部分)。请教一下这个问题是什么原因导致的,如何解决,谢谢。+ S! [ b9 g5 z& D9 V2 x
2 u/ g3 b, T& U* a( R5 M9 V& I! Q! N/ \' ]# U
C8 \9 d: g# A8 ?* d$ O! ~ I# M
/*9 l7 m* j m' S) Y4 U- s. E9 _
* ======== Dsp.cfg ========6 `7 |# j% k. H
*8 f; w/ X$ P7 C, Z$ [
*/6 B; {3 k# W: T. _: ~
! k; n4 k5 u6 k, F3 q( x
, ^; n+ Y4 D) g) q: N& O/* root of the configuration object model */
, l* G/ n4 Q. lvar Program = xdc.useModule('xdc.cfg.Program');
/ R8 A0 `. y6 ^2 x7 `' G. J. m: r9 P7 s' }) w! n/ A2 \
6 i1 w" G2 ]; |0 Z$ ?/* application uses the following modules and packages */# l) c! E) M; x; i) B4 X" T2 j/ _6 v
xdc.useModule('xdc.runtime.Assert');
" |# y# X" q5 O1 W$ P/ l( a" P9 L4 D) txdc.useModule('xdc.runtime.Diags');
+ s' f" e; k3 o( lxdc.useModule('xdc.runtime.Error');! l3 A5 a3 f0 c3 M4 R7 x
xdc.useModule('xdc.runtime.Log');
6 l* j- z0 U, X0 U2 `xdc.useModule('xdc.runtime.Registry');2 ^6 j6 C- e0 G. y
7 q) t- h* e; I, c4 M S1 s( p4 y D/ r4 X7 R4 h
xdc.useModule('ti.sysbios.gates.GateHwi');
& u: R( Y+ |, M& E6 E0 X* }xdc.useModule('ti.sysbios.knl.Semaphore');
1 d( j; D3 |2 S' ?- h+ r4 ~! Q8 hxdc.useModule('ti.sysbios.knl.Task');! n* g. B' E) _, `: K
4 r' i) ~9 V( z) C* {% U
+ C, E E7 X/ X
1 X4 ? z- W8 ]+ O
2 h* r9 L5 M5 B1 Y* d. p% c7 t% l9 x- W1 s* ~ }/ V
: o l0 D7 F/ D U. p& m/ U( w
' @$ ^: @9 R5 [/ \- ]
var BIOS = xdc.useModule('ti.sysbios.BIOS');) r( {$ V$ F9 I2 U9 a% i
BIOS.libType = BIOS.LibType_NonInstrumented;: K9 h+ p; G* u2 |
\* U9 L9 {% c/ t% `# p
3 n3 F p, L A' x; ]8 r
$ G% K, N, F$ o# K! y6 O5 }) W6 exdc.useModule('ti.syslink.ipc.rtos.Syslink');
$ _5 t/ E4 v6 i% r
, e* h- B" O8 q; m
/ a7 w* q1 e6 w* X! P8 w8 \) ~$ ]: K. ^7 @, X8 k
var MultiProc = xdc.useModule('ti.sdo.utils.MultiProc');0 L# w8 w5 u+ O D7 F2 X
var procNameAry = MultiProc.getDeviceProcNames();
" g$ {4 [* H1 u4 A& n+ s" s- ]1 eMultiProc.setConfig("DSP", procNameAry);( V- g' ]# ~9 L$ q
f% Z: H) u( f8 c# Q; W! w
2 x8 F8 ~( P6 ?. [3 P1 E/ B9 }8 E6 H
var Ipc = xdc.useModule('ti.sdo.ipc.Ipc');' B$ i- S4 L. J- R: s
+ c. I) }) N& S W. L9 E2 b7 S! Z; F8 l9 `
a. L% X- z& F! ^* x7 L7 p. P: R
Ipc.sr0MemorySetup = false;
# D+ m6 q6 r# _
) k6 a2 Y9 }" m! R& e8 W5 I+ e; h; }9 t9 ]; j2 u
- g5 ~3 w: R! V6 o) [' UIpc.procSync = Ipc.ProcSync_PAIR;9 x! U y1 h8 g/ t, M% R4 g
, X+ k. ^4 X0 [- v
" X3 |: \# D( X6 I/* define host processor */
5 J# ]1 U: Z9 KIpc.hostProcId = MultiProc.getIdMeta("HOST");3 E/ l( R6 z8 d5 N6 U
- s/ l {: f/ e
3 I/ I% n! k1 P5 f/* shared region configuration */4 o0 @/ k; x/ N
var SharedRegion = xdc.useModule('ti.sdo.ipc.SharedRegion');
0 J) }& B- @- t8 d: ~) s
. ?% k& n0 I6 V( \2 R( d3 ]$ y8 U) D
' n% C, c. M$ ^4 a$ E0 K F& N/* configure SharedRegion #0 (IPC) */
5 ^! s6 ]) z$ n4 o6 a! g( C6 vvar SR0Mem = Program.cpu.memoryMap["SR_0"];
% Z* @* z1 s* e: k/ r% e$ v! _# G& x% k+ S9 t3 d! O
5 n. c% |4 O+ U7 R# }& N: tSharedRegion.setEntryMeta(0,/ G c, K+ r% p. m$ g
new SharedRegion.Entry({
$ ]. v( x7 v4 z. t+ I& z. f: p: W name: "SR0",
" c6 A5 H2 o$ Z+ w6 w base: SR0Mem.base,
. o9 D% Y- V& s: O% H- v k len: SR0Mem.len," v. N$ s5 Y% i- R0 r9 P% O
ownerProcId: MultiProc.getIdMeta("HOST"),+ E8 T2 n0 d4 o/ b; h6 Y/ I" ?. u
cacheEnable: false,2 u' y5 I! o: | ^) J
isValid: true5 u- J, G' D2 k! Z* m" F
})
6 z. I/ a2 \* c2 B4 J$ Y);) e* y1 D1 I4 Q" n6 @
, |& d; \7 I8 T2 R. ?
* o( h. L+ r) }' z
4 W p9 P! }% l; S3 n# [3 H3 ~- A5 L5 T/ N! [) G5 i
# c) H: h# I; c, _' [
Cache = xdc.useModule('ti.sysbios.family.c64p.Cache');( K& T( ]! e$ d
Cache.MAR192_223 = 0x00000008; /* xxxx xxxx xxxx xxxx xxxx xxxx xxxx 10xx */1 n+ c: q' [9 q& a- r9 W
; `( c. H; }( f: E6 f
" D0 B. E: J7 B0 U& h& z$ A+ t' Y. M2 i& x- Y+ Y7 `) P$ h4 Y& W
A5 k a* c: s1 `9 w4 L
/*
8 m8 ^& k0 g+ @& q# n7 s2 r * ======== Operating System Configuration ========
0 O$ J3 u. y$ I$ K3 D5 Z */9 F, ?( v# l. T
3 @2 e D% m$ w" e1 Q0 N
; y, p' [1 T6 f9 A! l [) t
/* no rts heap */" U0 ~0 H( Z" o% V$ ]
Program.heap = 0;: \6 [2 V& _1 g: P
Program.argSize = 100; /* minimum size */: l, d. _# e7 p
Program.stack = 0x1000;
/ C0 I2 k7 `0 Q8 I# q" Z# L: M* b1 a, y/ ]# d
|8 F- k' F( ?, T
/* create a default heap */0 `. x3 q5 B# W. Y9 h+ P" B
var HeapMem = xdc.useModule('ti.sysbios.heaps.HeapMem');
$ | X s* Q* Z# O) o8 gvar heapMemParams = new HeapMem.Params();+ i. N: s& P' u/ v6 N- k
heapMemParams.size = 0x4000;
3 K# T% _# G; f. z1 O3 b1 R8 [. t3 `, f3 {' x
! j! R: U) h2 o: l9 g2 ~
var Memory = xdc.useModule('xdc.runtime.Memory');, m# w8 \* O$ u" J/ F
Memory.defaultHeapInstance = HeapMem.create(heapMemParams);
/ z9 ^" V4 e4 t; g6 \ O# r. h
$ g/ d: \1 Q0 \ H8 `$ h; e0 ~# }0 u7 M! `& z
/* configure System module */
5 X8 J$ ?9 q' Z$ V' `var SysMin = xdc.useModule('xdc.runtime.SysMin');
+ N9 r/ Z; w, a' u) sSysMin.bufSize = 0x1000;9 R2 b: n5 v5 f8 E# V3 P
SysMin.flushAtExit = false;3 o' q9 g% Q9 l7 Z4 |! A! {
* n$ S$ ^( ~. T
0 c" ]9 L$ }' ^var System = xdc.useModule('xdc.runtime.System');
+ i6 f( H+ _4 ]( K5 q' cSystem.SupportProxy = SysMin;
% K& P) n& B/ M; N: G, b) }3 X6 |0 R. u9 l3 w: N# Q
& U% b8 P( b) l4 t2 W8 }. `
/* configure SysBios to use the lower half of Timer 1 */
1 @: ~3 b! u! D4 v) cvar Timer = xdc.useModule('ti.sysbios.timers.timer64.Timer');9 ]! s' w% D+ @ \# L- H
var Clock = xdc.useModule('ti.sysbios.knl.Clock');) k; C8 n a/ P% |" u7 F6 q8 o
Timer.timerSettings[1].master = true;
. ^ _2 G$ p% Z8 r- iTimer.defaultHalf = Timer.Half_LOWER;2 L; s! d7 |) \, R D
Clock.timerId = 1;4 J2 f2 V" F! h# w' v5 [2 A1 l, f% Z
8 h% w* @2 u% s3 M! e. ?
0 G, S7 r# t5 D% J/ d
/ `( {! o- I% t( C, J6 X8 W' `* U4 n2 y3 r( z& n# f
|
|