|
[color=inherit !important] 我们这边用的你们的开发板,测试双核功能,目前遇到的问题是:( a) n( b5 ^; ?0 V* A* C
[color=inherit !important]1.ARM端Linux 系统正常进入到文件系统中# x& l" R) m( L2 p
[color=inherit !important]; S0 |) }4 ^! Q0 L3 H& s$ d
( h/ ]5 J& w$ Y1 O' f* I[color=inherit !important]2.DSP端运行基于sysbios的工程,在工程中通过如下设置定时器20 W: p% T7 Z/ G- T0 e& q! I/ E
[color=inherit !important]' E9 D7 q7 n+ ]3 s
- a: | e) p% p; _3 h9 [1 A
timerParams.period = 500;
( Z& D" l4 N* b) {5 g0 ^timerParams.periodType = Timer_PeriodType_MICROSECS;
+ P+ \, @! ~7 h5 u, A% `Timer_create(2, Timer2Proc, &timerParams, &eb);6 A: u( G5 f( x
9 S- L2 F: }6 k4 M, c" t) @3 V
9 R5 u' b( x9 V. w: A/ |* d" N
3.然后在定时器Timer2Proc()中断函数中进行翻转GPIO的操作,然后用示波器去看GPIO的波形,发现产生的波形周期为960us(正常应该是1000us);5 g* s) w- @* O* q; x7 e, E0 M7 i; N
产生了定时器定时周期和我预设的周期值不一样。附件是我dsp.cfg文件(只能上传一部分)。请教一下这个问题是什么原因导致的,如何解决,谢谢。
N' I7 g; T- ?. u* E; g
9 {2 f9 v8 s( e+ M$ {4 `1 D; w2 e; i" [# y
$ c+ e: c3 Y M2 o$ I8 h* N5 c
/*
6 K$ b0 Z2 R9 @' m * ======== Dsp.cfg ========
/ l& C2 ]! l/ X *
4 W$ J* \9 A" c */
: m4 I ~- \+ V# j# v% U0 o
! ^) v/ v( V: T3 S7 h. f! \
6 I) n; j$ A0 i" }/* root of the configuration object model */( ]& }$ c1 }1 n# Q% t& g
var Program = xdc.useModule('xdc.cfg.Program');
( F7 ~5 N) a# ~, V9 a3 f: \% f" v K' {+ z: s" c9 v
2 R% ]" F* T! L
/* application uses the following modules and packages */; [' L0 l# e4 r# M1 B8 |8 u. D
xdc.useModule('xdc.runtime.Assert');3 v1 c; ^$ @9 k1 s9 K9 K% t$ V) d# A# A
xdc.useModule('xdc.runtime.Diags');
8 r. C9 T# F6 Y5 M$ H" I' Pxdc.useModule('xdc.runtime.Error');( h, [, A4 @: i7 i( Z9 h1 a8 Z
xdc.useModule('xdc.runtime.Log');7 x& J! U1 V" ~8 r! P7 {
xdc.useModule('xdc.runtime.Registry');; D" q3 L f1 Q" M0 A, C5 _
" Q. \/ u# o% h( z& t
+ f" h$ ~) I/ B( W# L- ]xdc.useModule('ti.sysbios.gates.GateHwi');6 U \" N" A: |, P
xdc.useModule('ti.sysbios.knl.Semaphore');* H( z0 Z d# u
xdc.useModule('ti.sysbios.knl.Task');
* W8 y& M: J, p9 e9 c& G
7 j/ D: U1 J! y( B* b: Q
5 Y6 m" F7 ?' G1 Z7 ]. `. S/ J, Q, w y1 D
- p5 k: v0 s/ @ |, x( |. l) q
) c0 m9 L- }4 G+ Q9 |" [$ U# w# m1 W+ [
" m9 w9 V7 v0 B5 d5 I- Y6 A2 Q- r
var BIOS = xdc.useModule('ti.sysbios.BIOS');
; n0 j+ @# w6 UBIOS.libType = BIOS.LibType_NonInstrumented;
o' @ ~# Y y. N4 {: P7 d' }! o
( u8 U4 O/ c% \' k% b7 ]
3 E, O @. p2 Mxdc.useModule('ti.syslink.ipc.rtos.Syslink');
* M7 u& {* {& c* R+ m
6 O5 H- }; s4 x4 u1 v% w: ]
( p( \! j# i& S% b( @5 n& w( h2 t$ E K" U- o
var MultiProc = xdc.useModule('ti.sdo.utils.MultiProc');
' F* w8 J# e0 {2 G- R& _" K; Zvar procNameAry = MultiProc.getDeviceProcNames();
# A3 J0 A. ~6 m' }, H5 OMultiProc.setConfig("DSP", procNameAry);
, Q+ ]5 x. n& G) X r# I9 \" ^9 A
/ H% h7 Q, y; o9 |. R& f
9 Q: M4 {) V# W
) x: k, y) X, ~. q8 x2 Jvar Ipc = xdc.useModule('ti.sdo.ipc.Ipc');& b6 Z0 v& A& n9 E
3 V; i) t& t, |; f6 d$ P
3 }- |/ p% c9 ~" a/ s, C5 X; [
" I: t* ~7 \3 [ E, N- JIpc.sr0MemorySetup = false;, b5 z/ _6 v; a) W' T7 Z
' E4 U/ h4 K: r# `0 C- d' C
+ v# X8 }7 ]3 q/ l/ n5 E* ?# |- ?
# M! Z- |: M. E# t( n
Ipc.procSync = Ipc.ProcSync_PAIR;+ ?9 m) @4 ]" ?" K
* A, n/ _9 A' u3 J
# h$ h9 ~% [# I3 J/* define host processor */
0 {/ z* b }: w. d, C( AIpc.hostProcId = MultiProc.getIdMeta("HOST");
. o3 @, c4 H+ ^8 K+ f
Z4 m1 ^3 r+ S# o# a/ n4 h7 A8 b5 V/ \' ?2 L! g. T9 Q, F2 F
/* shared region configuration */- h( Z5 r4 n/ l" `& g4 g$ D7 E
var SharedRegion = xdc.useModule('ti.sdo.ipc.SharedRegion');) F3 G- i) V* x
; p# |( s9 T4 j2 n) V% E3 {) B' d
# I" V& j3 N/ l/* configure SharedRegion #0 (IPC) */
6 z4 h4 U: }4 R' H* _var SR0Mem = Program.cpu.memoryMap["SR_0"];& d: L9 L3 m2 ?
. K6 `! d) k) U3 T
w% k" w: L1 i! {* NSharedRegion.setEntryMeta(0,% B6 X- U/ i5 h$ v0 Z! E8 p
new SharedRegion.Entry({
! }, \8 p7 Z: i8 e8 }0 T6 g name: "SR0",+ ?: c V0 L) {7 {; c
base: SR0Mem.base,! W* w' y2 A! U
len: SR0Mem.len,
% q, C* v7 ]0 h y- H: p ownerProcId: MultiProc.getIdMeta("HOST"),
8 c% A, I1 ]/ L: b& z7 Q cacheEnable: false,+ j, `- G# e2 L) J8 j9 z
isValid: true( f, v( |1 Y* G, r
})
6 I0 `( Y( Y" F1 L k3 [7 R);# [9 _% U5 G5 r# H6 y& G6 A5 U# g
; s4 o2 T1 n" ^, ~
# Q9 @% p8 g9 L, W: M+ ^+ ]( W
7 Y* W, Z4 o; o2 J* j, j
5 U" S4 l2 C3 ~- [$ G# o2 q0 z
* c5 G) `, @) k: h( {( b. ECache = xdc.useModule('ti.sysbios.family.c64p.Cache');
: S0 o' u9 n& s) X7 S% yCache.MAR192_223 = 0x00000008; /* xxxx xxxx xxxx xxxx xxxx xxxx xxxx 10xx */; \$ P8 y" t9 e: E2 M1 ^5 W7 z! t
! O' L; A1 f1 }* E6 w4 c3 q
, q4 P& w& p4 R; p
0 r7 V- Q9 O' t: ?7 [
1 @6 a; `9 }0 r/ o" @( W
/*
4 \8 U1 M6 Q) G T3 a; } * ======== Operating System Configuration ========
" N0 X: [5 w q% @. x8 b! i; L */8 E- b1 {/ l- G6 Z& Z
% [9 x' o) H; B. G1 @4 \% w. R. ] b( }( a5 ~" b4 M
/* no rts heap */3 j2 q, u% u- X: B5 u4 G& t9 |2 L
Program.heap = 0;8 Y% I2 ]" X, n( R0 t/ _
Program.argSize = 100; /* minimum size */
_# C# j0 f: ^- B3 \* i+ qProgram.stack = 0x1000;
3 _8 e7 m6 a R( m* j5 n2 Z- X, l: G7 q+ d- F
, z7 ~3 m& L" d2 B5 q7 E
/* create a default heap */- d% \/ `% W) w& Q
var HeapMem = xdc.useModule('ti.sysbios.heaps.HeapMem');) X4 v# g! D0 k% A5 W
var heapMemParams = new HeapMem.Params();
# o: g" P0 C2 k$ GheapMemParams.size = 0x4000;
L; p; _& s4 D/ P! Z, t# f' X& w5 c) D0 f, v0 ^
0 ^/ b% A* @3 D G
var Memory = xdc.useModule('xdc.runtime.Memory');& |6 X6 q! `5 v% R4 `9 Q; H
Memory.defaultHeapInstance = HeapMem.create(heapMemParams);8 y+ \/ w" _6 l
/ Q7 F% g- O6 G; G3 G) @. a' c7 ^! y# r# v0 y
/* configure System module */2 J( m7 b9 H, S9 k
var SysMin = xdc.useModule('xdc.runtime.SysMin');
$ w- P8 P, E( N/ `SysMin.bufSize = 0x1000;
- q( J$ k$ d" I2 N4 F4 ^SysMin.flushAtExit = false;
5 h- l1 Y2 R6 J: L+ a( o/ u
( a9 O. Y" S" T9 z6 s! ?& T8 z# ?
var System = xdc.useModule('xdc.runtime.System');
) R1 E( y' f) N& `8 X+ sSystem.SupportProxy = SysMin;
+ d4 o" q# I, A* y1 _0 h5 j" {; w2 T9 W' C; C
) S/ o8 B( y' s) a" t' q/* configure SysBios to use the lower half of Timer 1 */
5 F" x0 E* V" {8 Q+ W& Ivar Timer = xdc.useModule('ti.sysbios.timers.timer64.Timer'); A7 Y# {* u% w7 ?& s* V4 W
var Clock = xdc.useModule('ti.sysbios.knl.Clock');
7 h! |! X0 _1 c! fTimer.timerSettings[1].master = true;/ U0 l. u! L7 i" [# }4 d% @
Timer.defaultHalf = Timer.Half_LOWER;' m: M; A3 m& o" b3 j# _8 ~8 B+ W
Clock.timerId = 1;' V& `' f- U3 c; v" d
- P. @; f& z" w; \. A1 w, W8 [( b, A
8 S4 |2 E5 ?; ^
* A" p4 N* Z8 ~! |
|
|