|
[color=inherit !important] 我们这边用的你们的开发板,测试双核功能,目前遇到的问题是:
$ j" f& p9 S) G9 V; T# |[color=inherit !important]1.ARM端Linux 系统正常进入到文件系统中
0 ^ q) E3 s* }8 _( q[color=inherit !important]: g" t3 H! g5 u: B5 ?
$ K' C( B; _1 R* L- l; @2 {+ A$ g[color=inherit !important]2.DSP端运行基于sysbios的工程,在工程中通过如下设置定时器2- [% V1 _! ]5 S# R2 k
[color=inherit !important]
; V+ p9 ?1 p! m" H( | Z/ X1 C0 j7 P* }- g) v; C6 p8 U5 f
timerParams.period = 500;
8 ]& n. D: t% n6 r1 G* [timerParams.periodType = Timer_PeriodType_MICROSECS; [( C. b7 q( t4 X
Timer_create(2, Timer2Proc, &timerParams, &eb);( p9 `4 }. H) s9 M; ^: R
7 k( }. n0 ]$ @# B1 ~# Q: i* J) [7 J& e7 b ?+ j: e1 H
3.然后在定时器Timer2Proc()中断函数中进行翻转GPIO的操作,然后用示波器去看GPIO的波形,发现产生的波形周期为960us(正常应该是1000us);7 S! T( Y5 q; x. G b
产生了定时器定时周期和我预设的周期值不一样。附件是我dsp.cfg文件(只能上传一部分)。请教一下这个问题是什么原因导致的,如何解决,谢谢。, |. i- o( K0 N8 |
K+ a* x8 `7 y b/ R/ }
) J- k W8 |* l: g) B |7 c8 d, [ ]
/*, e* }& D1 n! ~4 l
* ======== Dsp.cfg ========. V9 [( H# i3 C
*$ o0 P" O3 k n! N
*/
3 V, V. T/ [1 b" T: P7 Z: r
9 Z+ i$ H+ o% Y* ?, n1 y
) D2 l! U5 N* |& B- @% E/* root of the configuration object model */
8 F. u/ M# Q) O( Dvar Program = xdc.useModule('xdc.cfg.Program');& W* M2 k/ b. x4 ^6 m# ~
~. I: e3 K9 \8 z3 u4 f5 M1 Q& S' Z5 [
/* application uses the following modules and packages */
' _5 g! `. c5 P' n- F& Wxdc.useModule('xdc.runtime.Assert');
0 [' P4 U5 K- F6 N* oxdc.useModule('xdc.runtime.Diags');) t4 L! F, n, s! Z, Y
xdc.useModule('xdc.runtime.Error');
4 G3 U1 y; ~4 c1 B+ t2 rxdc.useModule('xdc.runtime.Log');
$ K2 N$ w1 @% }* c1 }xdc.useModule('xdc.runtime.Registry');
/ n3 h$ O! e% d5 C; i6 e6 Z8 v0 W7 d# ]3 K
# P$ ^, E o: F' _/ u
xdc.useModule('ti.sysbios.gates.GateHwi');
0 \* r# @; w$ E g, txdc.useModule('ti.sysbios.knl.Semaphore');
$ Q, G( I* C9 k$ H4 _( v1 Axdc.useModule('ti.sysbios.knl.Task');) p! {+ d! W) n' o8 v- W) d
1 u3 }! x: e0 ^7 |9 N+ j% M* a
$ D9 h% k" w6 Z7 |6 Q' f7 n& m. f: W$ D4 g' O! j
+ r6 v$ {% j* F5 G3 z0 O) U9 I$ N$ l9 L# O
$ e) \+ U% G* @2 L
5 [! o# ?% f+ G6 I. ?7 m& t" \
var BIOS = xdc.useModule('ti.sysbios.BIOS');
3 G0 B! N( W( t: t' X& x! f CBIOS.libType = BIOS.LibType_NonInstrumented;
9 e' D0 I, |5 v) P: ?9 Z" o: z& k# [3 m. {+ R
: {. ?+ @$ C; u# f% \" L, q! y! `( |1 U2 m. ^! V& e, I2 Z$ R& F
xdc.useModule('ti.syslink.ipc.rtos.Syslink');
& l4 @( B) M" J* k
( \2 T( V+ j0 @' U2 Z
& a5 O9 \" i! |* x$ ` d5 i! ~9 v! c" W5 A4 j' O- c* y# r
var MultiProc = xdc.useModule('ti.sdo.utils.MultiProc');
) d7 z) |0 M1 ?2 O% ]. qvar procNameAry = MultiProc.getDeviceProcNames();
( K t1 t0 |" W; C# q* s) rMultiProc.setConfig("DSP", procNameAry);
9 H# Q/ {" O% `% h- ^5 X) O9 D8 S
' K* `0 N; z& I6 w, K) R1 R% m1 z4 a' K& M7 R
var Ipc = xdc.useModule('ti.sdo.ipc.Ipc');
) ?' h# q' _: ?: V) A) b
* y: I% N8 t6 Y7 h3 l5 N! v4 \; h- g% ^4 }7 X. R- }( h/ ~
4 G2 |& M4 k' w% l' l
Ipc.sr0MemorySetup = false; _1 s& b9 \9 _6 T/ K% w; d# p
! z# T0 n( s# G* |
- v8 v7 _- o8 s- N
7 K8 f( c5 i8 n. a, [; xIpc.procSync = Ipc.ProcSync_PAIR;
! U) p/ F8 Q# x# Y% J) P9 _+ K
$ ?5 g M f9 S. S# R% y z) t5 O1 e$ T F) r! D
/* define host processor */
2 H r- T2 }1 R lIpc.hostProcId = MultiProc.getIdMeta("HOST");
6 J d# O4 J- k4 M! ^* K7 k& c0 a$ {/ I
; c' U* C0 d* w- v i' v+ T
/* shared region configuration */
( ~2 g& z7 l& a- }+ S+ Lvar SharedRegion = xdc.useModule('ti.sdo.ipc.SharedRegion');
/ e$ C X- U* p1 u. t9 I1 p: \6 Z6 M3 R4 {( K) H$ ]
P9 V2 V0 {7 ]7 \/* configure SharedRegion #0 (IPC) */
. ]0 V0 N1 \. ]0 Xvar SR0Mem = Program.cpu.memoryMap["SR_0"];0 `1 Y$ d3 B! `
% q# s/ v, H4 C" \6 E; g0 P
1 ?4 g' `/ e# j: L- P
SharedRegion.setEntryMeta(0,
( d; ]) ]& r: t( R. d* f1 r. Y new SharedRegion.Entry({
7 @3 T: m2 p; h5 O, d# Z& w name: "SR0",/ {3 I- _; j. ~% M' u
base: SR0Mem.base,( Y& r0 A0 ]: ]. S; b9 F5 t
len: SR0Mem.len,9 U2 h( Q- L: T' P% j
ownerProcId: MultiProc.getIdMeta("HOST"),9 V4 x: C! Y0 @ s+ P' V
cacheEnable: false,
1 G7 C8 V# M. `+ ]3 F isValid: true
& ?6 @. S4 D! q4 O: J* F5 T })) o4 u+ k/ t2 i- f5 m
);# L0 y4 u- t- v2 o
4 g% z/ q' {! s" \/ c; x3 ?9 m) ]# x& |) z S
( w9 A, H N0 M% o2 V8 W Q7 f7 \& ~4 _+ K5 r7 m
1 \# X+ U9 D1 S* B; |* [
Cache = xdc.useModule('ti.sysbios.family.c64p.Cache');3 A! E. `, p5 f3 h8 `. p9 z0 }
Cache.MAR192_223 = 0x00000008; /* xxxx xxxx xxxx xxxx xxxx xxxx xxxx 10xx */, j) b: N/ B2 U, R4 V d
0 |) E6 e6 L3 R5 I/ k2 q- u
1 N* [/ q6 d" {. N7 r7 Y& Z" L2 d
4 O x8 T6 g0 H, _9 {: I8 R1 D# R3 O6 S0 }* V9 i
/*
* S& Z* H: l: F# Y0 i! P. X7 C$ V * ======== Operating System Configuration ========: D$ I" P* r1 J8 x" Y! O
*/$ q7 G6 Q% }1 s! A$ R' p# f
6 g. D0 W; [* n# w
$ P4 A* G8 P( z' a
/* no rts heap */
& C2 g& d, m- x: J8 TProgram.heap = 0;
, j' X4 I! V% h ^( B f3 rProgram.argSize = 100; /* minimum size */9 s5 k( y1 ^4 y
Program.stack = 0x1000;# I# \/ c2 i) N
3 E! T" E* Q8 l
" A: F9 l. ~5 O" y' l/* create a default heap */
; E6 o! g1 i8 |2 L3 I, hvar HeapMem = xdc.useModule('ti.sysbios.heaps.HeapMem');% f% U/ \" @$ a+ y% ?
var heapMemParams = new HeapMem.Params();
% w, b, f. X- _" kheapMemParams.size = 0x4000;0 S% V& P7 T8 d- t9 I, p
6 b) b9 }- A5 a, T
4 I! n" `: ^0 r$ f. B7 L0 ~var Memory = xdc.useModule('xdc.runtime.Memory');
2 s0 t2 A- T# S- jMemory.defaultHeapInstance = HeapMem.create(heapMemParams);+ [( r8 B. @2 T8 c q& E
9 h' x0 S. s; q4 n; q: Z# E, ~1 b# N/ `. r- s7 @7 ?
/* configure System module */
" E5 b5 N% j. b3 P$ @' Wvar SysMin = xdc.useModule('xdc.runtime.SysMin');1 y# C W, {+ y9 h
SysMin.bufSize = 0x1000;, P! x# ~( s# b: M* K2 w2 u0 D
SysMin.flushAtExit = false;
* g" m" F7 B( A
0 e2 p7 I, |' n5 Y2 i. M3 C6 ?% [8 j7 U) H7 @
var System = xdc.useModule('xdc.runtime.System');7 v- C" L4 \- V$ V* A- m' Z: ^
System.SupportProxy = SysMin;
1 e& ^1 ~" C% h7 N+ v. e! B% j5 S& l D
+ I0 {; i& O, G$ {, M5 H# m2 T1 Q/* configure SysBios to use the lower half of Timer 1 */2 H. T: r- k: q" n
var Timer = xdc.useModule('ti.sysbios.timers.timer64.Timer');- X: i9 @7 B3 H' \) K; K0 C
var Clock = xdc.useModule('ti.sysbios.knl.Clock');! X; e( a: a+ G) S
Timer.timerSettings[1].master = true;- b! [ b/ E0 ]; T% Y" p
Timer.defaultHalf = Timer.Half_LOWER;) T* D. k7 i$ b, v! S; ~# u; K
Clock.timerId = 1;
& Q& n% v5 N9 v" O
- c% [% x7 Y9 u3 [0 A( x; m
: ?+ G) l6 c9 T8 i" t1 C9 o0 D$ i3 {8 g% t! k; n1 ]
" U6 q! e; _6 R, e |
|