|
[color=inherit !important] 我们这边用的你们的开发板,测试双核功能,目前遇到的问题是:2 z, ]+ b' Y1 u( ^8 H. z# d
[color=inherit !important]1.ARM端Linux 系统正常进入到文件系统中
+ }1 q0 n2 b0 }) r( \; c- i[color=inherit !important]9 n2 L" A; [; c1 V" O {6 G
4 @; N& o/ ]: I+ k: F
[color=inherit !important]2.DSP端运行基于sysbios的工程,在工程中通过如下设置定时器2$ K3 L+ Y3 ?; k' f8 k1 s
[color=inherit !important]
: \8 x2 T! S# v" B. C
* p; M# J( z. k1 d# rtimerParams.period = 500;
. a5 ]+ l" S7 u! L- A: t7 ^timerParams.periodType = Timer_PeriodType_MICROSECS;) ~0 D' I4 ^4 P. i/ ^) q/ m2 x) Y
Timer_create(2, Timer2Proc, &timerParams, &eb);
5 R* d1 o" D+ b3 X
& m9 |8 G/ H8 u3 H" w0 e( A) ^
" I& u# l6 w) j4 j3.然后在定时器Timer2Proc()中断函数中进行翻转GPIO的操作,然后用示波器去看GPIO的波形,发现产生的波形周期为960us(正常应该是1000us);
- L9 x7 ?' J# `. a9 |* I+ H8 W" r产生了定时器定时周期和我预设的周期值不一样。附件是我dsp.cfg文件(只能上传一部分)。请教一下这个问题是什么原因导致的,如何解决,谢谢。& L9 b$ A& u6 u& d' Y4 {
- F: O% V2 ]8 b5 a1 D2 `3 F/ r6 q/ s/ k$ \ `) v# j
" R h- l& z5 D3 b: V7 J
/*
Z6 q) a% @) G/ ?$ s* m * ======== Dsp.cfg ========
; K+ C$ T0 ]2 B I *% `6 c& J! K* ~% ^ }
*/$ I+ X' o* c, ^2 w7 U& W. r
, o, M3 L6 M- M) o. y) N1 q( }, p. e1 F! Y: ]% N1 V
/* root of the configuration object model */
) p7 g0 G0 ]- \7 p& e4 mvar Program = xdc.useModule('xdc.cfg.Program');+ V! p0 w2 C9 P l2 d
/ r# `- C9 N! s9 |1 `$ X% e# ~7 y9 N% t9 G3 @0 R7 b
/* application uses the following modules and packages */. W/ V% q' D3 F
xdc.useModule('xdc.runtime.Assert');
/ U+ M0 D9 B3 t2 ?1 F0 w. Exdc.useModule('xdc.runtime.Diags');
# I4 w9 k4 s. i0 F# j1 {! q6 ]xdc.useModule('xdc.runtime.Error');
) l6 S7 T0 i3 ~- Bxdc.useModule('xdc.runtime.Log');9 E, G+ Z7 L' o n. k# z
xdc.useModule('xdc.runtime.Registry');
2 t2 l3 e8 l# e/ l! x' S
6 b# f7 q& P3 E) o: @$ R
6 D6 r/ S7 X' u# D! zxdc.useModule('ti.sysbios.gates.GateHwi');
m& O6 S9 T( G/ h3 [; rxdc.useModule('ti.sysbios.knl.Semaphore');
% p; q+ a8 N `3 m2 gxdc.useModule('ti.sysbios.knl.Task');( n5 T& I0 U5 Q3 j3 P
! H ^2 O5 h8 ]
2 O7 @3 V5 n" x" h7 N |- }( v8 N/ b* s; V( a8 @/ y$ R
" m/ y2 X8 Q3 F' y8 p$ I, c3 r3 _/ o* I* n0 _
# d5 C6 k5 b1 o9 X7 @0 `
6 W; ]: R( }" F* t z# K
var BIOS = xdc.useModule('ti.sysbios.BIOS');
Z. z. w" b) |. [, [$ q" s. V9 nBIOS.libType = BIOS.LibType_NonInstrumented;8 b2 z- Q/ p6 o/ R* P
6 ?+ r6 [1 Q0 u/ E0 I' ^( `, H+ h/ o7 r3 z% ?8 o, w7 o) M
. z8 p0 _; t$ L! i! x9 Sxdc.useModule('ti.syslink.ipc.rtos.Syslink');
4 v# R* Q/ ^; l- L5 |* ^ h& y
! e0 t% [+ T' j; b8 f% b# r/ z( l7 }: k
/ k7 W; i2 a- u5 {+ ], @/ y
var MultiProc = xdc.useModule('ti.sdo.utils.MultiProc');$ A% r6 e3 Y- w: k
var procNameAry = MultiProc.getDeviceProcNames();
2 u/ R1 ]1 S* q+ S4 P+ @! ^+ X5 ?% iMultiProc.setConfig("DSP", procNameAry);
: e7 h. I" i) g' h0 u1 x6 h- M/ B) G- Q: Z2 c- P+ ]% P$ i. l# G
2 \4 Q+ [% o3 x
) t. k1 D+ [8 Q1 t% b% H' |5 J2 o/ Qvar Ipc = xdc.useModule('ti.sdo.ipc.Ipc');( v7 F, C0 W5 h
) K: t" r1 c9 {
' g6 h6 o! O5 [" n3 }& p( G" h4 Q& }2 b7 ]
Ipc.sr0MemorySetup = false;) T$ v0 a2 A) [* j1 U
' n0 W5 p, g4 _/ k \3 D3 l- `
# R3 b1 s$ Z! r9 o8 G
& t# U2 j2 r, U5 Z
Ipc.procSync = Ipc.ProcSync_PAIR;
( {, M4 j7 c) ~% a/ P8 c; A: ]( A5 b) f; U- Q9 s
+ U$ O0 Y4 I# W0 `% |
/* define host processor */3 M, m7 I( j! t+ o4 p: {
Ipc.hostProcId = MultiProc.getIdMeta("HOST");. C. [( J; S, H4 P2 e# o+ u
( d! P- E( f& S, C4 w3 G O, B
+ R- ~4 D: z. b4 C) t1 P6 t, c/* shared region configuration */9 T. _; @ Y* K( X' \
var SharedRegion = xdc.useModule('ti.sdo.ipc.SharedRegion');
, }* [: \" D, Z5 T1 D U- B4 ]2 ~& l
7 M7 w0 i5 T& r2 }1 N' S/* configure SharedRegion #0 (IPC) */
1 e1 D7 f& @ C8 H/ V6 K+ Y+ B7 g/ Rvar SR0Mem = Program.cpu.memoryMap["SR_0"];
& v4 |9 k& L) h$ E6 R# T" r+ P* W) P( {4 @1 h1 E6 j
3 d7 W" i$ t6 v0 b
SharedRegion.setEntryMeta(0,
5 Y7 n+ z9 ~ \0 E- `# s* c new SharedRegion.Entry({
6 `$ V7 b' K+ b$ Z7 d# V% a4 Y name: "SR0",
1 b2 \& m9 ^- c. X$ \% ~ base: SR0Mem.base,
5 A5 B$ ~( q) c# W len: SR0Mem.len,
: W5 B! Z4 A3 j# F; W ownerProcId: MultiProc.getIdMeta("HOST"),
# Z4 s( `+ \& x8 ?5 y cacheEnable: false,$ M/ q$ ^% B; \ Y/ z2 a# x- _) a' Y" f! T
isValid: true* T) Y! E" ~1 O: P9 v; a
})1 R m2 [$ C# e5 p2 T4 T
);5 s& g& o! r3 @% i% `3 E
$ Q# H, J# w& S! N, I& |
' \2 ?, ]1 q) q( [5 l, j
2 a, O/ }4 _4 a5 I2 w" D9 a1 ]. j, X3 `7 T
" u Q& g+ C. R b- I" `4 }Cache = xdc.useModule('ti.sysbios.family.c64p.Cache');; ]' w- `6 a4 p3 p/ K
Cache.MAR192_223 = 0x00000008; /* xxxx xxxx xxxx xxxx xxxx xxxx xxxx 10xx */
2 P8 |( i5 T" s8 N) t( A& M
4 D1 M! s: u9 z; b$ `+ O7 I
( g" S! D7 d) r2 a1 e9 h5 s
% @; O) j8 c0 R3 V4 s5 r% B, j5 S- z/ g8 {4 w! O9 @7 J
/*
) q m3 p; D$ f, h. o. | * ======== Operating System Configuration ========) B5 n I/ |% C- v# l
*/
4 `/ m6 I m e, X# G
2 _) t8 ~1 `: e( }) \5 X6 c' O( s- F+ O3 ^2 G/ J
/* no rts heap */
! r. [; [! [8 K' lProgram.heap = 0;
) I: ^/ Y2 X; C% JProgram.argSize = 100; /* minimum size */
3 E+ S, I' `9 N+ G2 h: h6 fProgram.stack = 0x1000;7 w' Z+ |! Z' Q' [; e! g; P
0 {: }5 f# K6 S( X, w
6 u6 C: B( y, C7 N' I/* create a default heap */
% N+ X9 `. ^0 `7 J, q6 e( Svar HeapMem = xdc.useModule('ti.sysbios.heaps.HeapMem');
) ]- j. P- x- M" Y6 c* f' w8 Ovar heapMemParams = new HeapMem.Params();
: } N0 j3 |9 qheapMemParams.size = 0x4000;" {6 { N* B' J& ?: I, I B) f
. ~+ ?$ h. E b5 Q T4 ~
7 ]( ^- X% q& \- c, q5 @( {, T1 gvar Memory = xdc.useModule('xdc.runtime.Memory');
0 I: w9 A# d: s9 {Memory.defaultHeapInstance = HeapMem.create(heapMemParams);
8 Q/ t1 I) F& S1 K: |) O3 ~# g& x* u- D% G! p1 L; R; g6 \
/ I! |, e |# ], X+ R2 z/* configure System module */
# a+ a! v% T* F& l9 tvar SysMin = xdc.useModule('xdc.runtime.SysMin');
! j4 U8 a3 u2 v0 X. ?1 {SysMin.bufSize = 0x1000;: H7 z6 h D( y% M$ i' G
SysMin.flushAtExit = false;) Z0 u+ h) @) m# b1 U
; C) I4 J- ^' t' h2 g8 ?/ c3 [* k: m4 t
var System = xdc.useModule('xdc.runtime.System');
8 F8 Z) {3 u8 USystem.SupportProxy = SysMin;
! h6 j- R& h2 J( H( V; T
% s: d* z* B/ Z
8 h. E; G5 T- v$ P8 D0 B' Y2 `5 {/* configure SysBios to use the lower half of Timer 1 */
1 E. c. p2 A% f7 o9 ]var Timer = xdc.useModule('ti.sysbios.timers.timer64.Timer');4 L8 w2 ^ p# p
var Clock = xdc.useModule('ti.sysbios.knl.Clock');
/ T3 | x6 F" r7 p) v; q I# TTimer.timerSettings[1].master = true;
) Z2 [+ X0 X; A" [Timer.defaultHalf = Timer.Half_LOWER;
. W* w0 }8 f; q! JClock.timerId = 1;
) }1 s' H- S1 `) c1 t1 B4 X5 C
+ [( c" z3 E& L5 ^& o
3 u! k. U% N8 ~2 c% T/ Y5 B3 [
: m' M$ i! P9 z; a0 Q* [
+ ^6 U6 h( v/ t, f, d; |6 X! K |
|