|
[color=inherit !important] 我们这边用的你们的开发板,测试双核功能,目前遇到的问题是:, m* x4 r" }! b0 R1 a' @
[color=inherit !important]1.ARM端Linux 系统正常进入到文件系统中
. f M$ O& q L% D) m$ S( Q2 c[color=inherit !important]5 R. _$ ]5 V3 I6 Y
4 U' g6 W$ B) i0 r
[color=inherit !important]2.DSP端运行基于sysbios的工程,在工程中通过如下设置定时器22 z: p; P# N& X# ]0 Q( S) D- ?
[color=inherit !important]# R, i, f, B# _4 }7 h* p
- b) }* m) Z* p2 utimerParams.period = 500;
1 I( a4 Z6 {: YtimerParams.periodType = Timer_PeriodType_MICROSECS;0 w; J, B: V1 n- {
Timer_create(2, Timer2Proc, &timerParams, &eb);
, I5 R6 l8 R/ E1 h" M- x# d% }# u; |' w5 p( A# S
' ]4 g/ O, s, ] c. X2 N9 Q3.然后在定时器Timer2Proc()中断函数中进行翻转GPIO的操作,然后用示波器去看GPIO的波形,发现产生的波形周期为960us(正常应该是1000us);
" f# V1 o" ^+ M) N( s$ q% G' k- h产生了定时器定时周期和我预设的周期值不一样。附件是我dsp.cfg文件(只能上传一部分)。请教一下这个问题是什么原因导致的,如何解决,谢谢。
& o0 U* F3 ?! u! }- A" l5 `+ S% D3 Q/ r7 y9 Y
& u. r0 t- D' K* a; U% R
- T# [( @3 d0 W+ j; U3 s/*
6 U R- \' P8 ~ * ======== Dsp.cfg ========
: `$ i- b7 f; ]3 O! u6 C7 b *; N* ~2 R" I6 y- h0 j9 g
*/
5 C& ]% C) R: M+ I4 D/ T3 N
; ]4 S: M6 a) C) M6 D# ^# q3 Z8 H0 t) U6 Z
/* root of the configuration object model */
! F: n% ~6 C3 m/ o3 W' M: Evar Program = xdc.useModule('xdc.cfg.Program');
5 H1 p( E/ s/ W/ [0 Y8 e% f! @3 W: Z
) ]/ d% S. l# c& [, @) }/* application uses the following modules and packages */
8 M0 x$ n# s8 k9 F+ dxdc.useModule('xdc.runtime.Assert');1 D: C5 p0 X' I' s. G% g% R2 o
xdc.useModule('xdc.runtime.Diags');
: C/ C! s1 s$ p4 k" o! `7 U- exdc.useModule('xdc.runtime.Error');
- Y' t, ^& y$ p1 `# p4 Q/ u/ bxdc.useModule('xdc.runtime.Log');
5 r z. L. u3 H3 zxdc.useModule('xdc.runtime.Registry');9 C5 W4 P2 h6 R9 b- \, Z
$ \8 A6 Y- ^$ F8 n' j" E1 {+ C8 V9 a) f( } U6 T
xdc.useModule('ti.sysbios.gates.GateHwi');* }( n0 q( ^9 w4 J$ z, C/ k
xdc.useModule('ti.sysbios.knl.Semaphore');
2 {; Y# j: a( J3 Hxdc.useModule('ti.sysbios.knl.Task');
3 }7 P( k- O, c) I. _# Z2 W# H7 H ` p! T0 V( p$ Y& j# D
; ~; u) [3 H, ?( k* n0 B, E/ k1 d; W, B# E8 \- I
\1 ^# s W! l2 ]7 Y7 }
Y A0 ]7 B, X1 x- }
6 ]2 L" s) l( A1 u X
" x& U' x2 f6 N9 ]var BIOS = xdc.useModule('ti.sysbios.BIOS');! e1 M8 R" Z/ U3 O
BIOS.libType = BIOS.LibType_NonInstrumented;
- @+ |4 h4 ^" ~/ ?4 N1 z& n% B* J$ k7 ] _1 |/ w
7 u2 d# h: B3 g: N! `; w
* u# Z L9 c' I7 ]1 b6 d
xdc.useModule('ti.syslink.ipc.rtos.Syslink');. ]/ y7 [+ l P
: z) x/ k4 x4 F+ C
6 K; Z4 Z5 k7 z+ H+ T u# E6 _5 V% B+ o
var MultiProc = xdc.useModule('ti.sdo.utils.MultiProc');8 y9 G/ g6 I) H( z
var procNameAry = MultiProc.getDeviceProcNames();$ I+ Y- O; Z# H( v' M3 ^
MultiProc.setConfig("DSP", procNameAry);! p1 m/ M5 E8 N6 `
5 H6 R; F% \. @9 H- W* e! a1 m% n1 ]/ T; r/ u
; M8 h- ]$ L+ Kvar Ipc = xdc.useModule('ti.sdo.ipc.Ipc');/ O0 c$ M! U' [- ^ @3 T
1 X' N6 V9 _3 g% ~
7 A; x& {) q' C$ K: W
) j# W# k0 j% m# P( z0 I' l
Ipc.sr0MemorySetup = false;
* e' @ B1 E2 A" _& w8 H) h
& Y; F, x3 s: n/ r: Q) r- E5 T& r6 a
& S( Q0 |( w$ P3 _! l( B& I2 q* _8 ^
Ipc.procSync = Ipc.ProcSync_PAIR;* m. F6 a8 `9 m9 Q) E1 E
7 q8 P5 ]( p( G7 O
9 c! W2 ^+ v" m+ T: J, F
/* define host processor */
9 k3 |" O7 D1 B8 M2 v* \Ipc.hostProcId = MultiProc.getIdMeta("HOST");
3 E3 X9 {- w# y, r" s" m7 ~; H- I7 S8 o1 w
" b! O+ n8 X9 \% X" f! L
/* shared region configuration */4 A$ r5 T8 U$ I- y
var SharedRegion = xdc.useModule('ti.sdo.ipc.SharedRegion');
; X# R7 j, f1 ?1 j
' f( S$ z* T4 {5 |* K( L4 o) h2 V* S$ X7 o# R$ c# h
/* configure SharedRegion #0 (IPC) */! R, C1 |0 ?7 w1 C* u. Y
var SR0Mem = Program.cpu.memoryMap["SR_0"];1 G* F8 r! E' S& J, z# w
/ Y; p# J* N7 w9 E
+ _* G" Y% o+ |, n. n- ZSharedRegion.setEntryMeta(0,, m# N. ]- H+ M1 D X
new SharedRegion.Entry({
b4 z6 l+ J$ z' E name: "SR0", P; |1 n1 n% o" G) [1 M) o
base: SR0Mem.base,: W- u8 r" [9 h
len: SR0Mem.len,; p8 V# e& y2 u, e
ownerProcId: MultiProc.getIdMeta("HOST"),, `2 i# I4 p/ V/ d) J
cacheEnable: false,$ b5 o- ]7 Q1 C2 R: L
isValid: true
$ n; C0 G7 \, K/ w* F/ v })( l0 X% a8 E2 A e! x6 O8 o- n
);' u' m- }, v& U3 Y, N, g6 k
0 v( C* b, j- `9 K! F! ~& [2 g/ F- @! ]
" v! U6 l" Y J- Z: @$ m+ e& M2 A2 A# t+ V( \; Z/ D
& F7 e! K/ \/ L! B; Y4 K4 Q
Cache = xdc.useModule('ti.sysbios.family.c64p.Cache');
5 m& L9 X: Z" ]/ m! k. ICache.MAR192_223 = 0x00000008; /* xxxx xxxx xxxx xxxx xxxx xxxx xxxx 10xx */$ V" Y, U% q Y4 g- `
- a/ w7 |2 w) w$ b4 b% Z
6 ^" @& D, f0 M w( `; d& h, g3 l! `9 Y n; s! T2 _" k2 z7 b' `
3 s) ^+ K/ l2 A& G# Y9 s, c- e- h9 P
/*: L5 V- F5 C4 m2 J1 i7 s0 R
* ======== Operating System Configuration ========
8 d2 w; \9 I0 x. _' ` */
& _ ^" R0 n' M6 J2 b
+ }! Q6 k4 ]; D( G, f! E$ X0 P0 ]9 G/ t2 l+ o z( g1 ^
/* no rts heap */, h) [, H. ]( {# c* A1 V& ?
Program.heap = 0;
% u( B. w( ]9 aProgram.argSize = 100; /* minimum size */0 v! [: g6 Y: W( X7 P
Program.stack = 0x1000;
6 ?# |9 {9 P/ q. T, p4 S, ?
$ F% i8 ]8 [; t
" L& X' E9 C$ A! c2 L9 I/* create a default heap */
3 b6 S, H! c, p. w" X2 nvar HeapMem = xdc.useModule('ti.sysbios.heaps.HeapMem');
" e" B k8 @1 z! Z, m+ N3 ?) `var heapMemParams = new HeapMem.Params();
9 }' C- b# O7 N! FheapMemParams.size = 0x4000;' W- \% o! `: m4 h7 c+ }
, s' u! ]+ Q4 Y7 m3 k! E
4 o( S: P5 M0 g3 R
var Memory = xdc.useModule('xdc.runtime.Memory');3 [( `# U4 t: p" D. ` p
Memory.defaultHeapInstance = HeapMem.create(heapMemParams);
3 I! n6 U# c* x( O" Q
9 a& ]4 w( C# l, E+ M/ P1 ?; {. N) x9 ^# r8 l& R0 [/ b% |
/* configure System module */3 b9 `% R- |" ?% s \
var SysMin = xdc.useModule('xdc.runtime.SysMin');+ a) B3 C$ j( c3 S4 _2 r- {$ l( i
SysMin.bufSize = 0x1000;
N' X3 E0 l4 f$ r( v1 z0 @SysMin.flushAtExit = false;
: i8 u: A" }. M4 c
$ J' u. e( O, P6 Q4 X, }6 Q. G% w' Z& `
var System = xdc.useModule('xdc.runtime.System');
0 j v4 k) m) W, _ L$ l% a/ MSystem.SupportProxy = SysMin;
6 s+ r: g9 ~2 \# r$ N, v6 O3 M* I5 F
& Y6 c, ?- n) {/ x+ F, y8 n3 J
/* configure SysBios to use the lower half of Timer 1 *// T- ~- ]) m# v# q" Z+ E6 E t3 y, f
var Timer = xdc.useModule('ti.sysbios.timers.timer64.Timer');- c2 E3 X+ b2 x! {' T- v: U$ q" Y
var Clock = xdc.useModule('ti.sysbios.knl.Clock');
3 ]1 |7 M- \: a5 q; hTimer.timerSettings[1].master = true;
7 Q. a0 L9 y: b9 q& l/ gTimer.defaultHalf = Timer.Half_LOWER;
& C; K5 |2 d+ EClock.timerId = 1;
# i6 m4 Q; [5 U2 f
3 F0 Q, z& ^0 |1 m) I l! ^' Z/ f" A0 ?
% I; x) t; b5 H% D8 j; R6 h+ D' W, C. \; Y
|
|