|
[color=inherit !important] 我们这边用的你们的开发板,测试双核功能,目前遇到的问题是:0 q5 R# [! Y3 O- k
[color=inherit !important]1.ARM端Linux 系统正常进入到文件系统中, W1 k% G. i( z' \3 c! B
[color=inherit !important]/ ~) w$ v+ e% _' w1 L
) T |* @+ _; F& \* E$ ^; D$ n
[color=inherit !important]2.DSP端运行基于sysbios的工程,在工程中通过如下设置定时器2- F! W0 M5 i1 z5 {4 W
[color=inherit !important]
7 }( @6 l! \0 G u7 ~. q. D0 Z: f
6 E% f4 M! O0 Q1 ttimerParams.period = 500;
% c# B% b$ b3 S" T. ctimerParams.periodType = Timer_PeriodType_MICROSECS;! f0 ]4 |( e; ?- a6 @
Timer_create(2, Timer2Proc, &timerParams, &eb);" p: B& K4 G8 x" [/ n
# v+ ?2 G( J' u) Y" s- }
! U7 s @' Y9 g' [: _3 f. p: ?6 D6 U3.然后在定时器Timer2Proc()中断函数中进行翻转GPIO的操作,然后用示波器去看GPIO的波形,发现产生的波形周期为960us(正常应该是1000us);
. [* k$ w) K9 f. B; k" |/ F, R, X产生了定时器定时周期和我预设的周期值不一样。附件是我dsp.cfg文件(只能上传一部分)。请教一下这个问题是什么原因导致的,如何解决,谢谢。8 A+ \& c0 N* @7 r0 o% B% o
6 x" V+ P; ?6 W0 H! U
' m# z' [7 R0 q" c+ m5 b3 X5 u
2 `* y( C. v! `! T1 C# G/*
6 \ ?3 ]6 r u8 x$ M1 X * ======== Dsp.cfg ========
+ q8 S7 s7 V- i9 u1 P *
- g6 G" Z d5 C3 y0 x5 q5 [ */2 z. f7 S3 d; _5 `
# k4 z/ L1 p2 s: I/ v
! u- ~, H$ M, z( E2 t/* root of the configuration object model */. o; M2 W k& [# |
var Program = xdc.useModule('xdc.cfg.Program');
/ K& \: b. m' x% Q
3 e! G8 u) l: ~/ @+ J" h
+ U3 r G7 v! b0 B9 k9 [/* application uses the following modules and packages */: ?% w" P8 ^3 h
xdc.useModule('xdc.runtime.Assert');
" C/ p+ Y% h' F$ a+ D/ oxdc.useModule('xdc.runtime.Diags');/ i- ?! F8 v6 Z0 ]( `
xdc.useModule('xdc.runtime.Error');
4 A' L% s% R& _/ e. r w6 h; dxdc.useModule('xdc.runtime.Log');
, e$ i9 y6 U6 @6 Z: ^xdc.useModule('xdc.runtime.Registry');
# @$ D& Y: `! D4 P3 J* L: }! H% d& }% x' w% H7 @9 R2 S
: r7 O9 I: M; pxdc.useModule('ti.sysbios.gates.GateHwi');) t* ~; y5 n- v* l# n$ V6 e
xdc.useModule('ti.sysbios.knl.Semaphore');
; J2 `% F! y0 D3 \; M8 @- w4 Axdc.useModule('ti.sysbios.knl.Task');
2 W: _4 a( z4 |6 g1 Z- \' C# H# X( m
; Y- D! e4 A0 B" I( I% o
' @0 O l4 _1 f% e/ t/ V! L1 C7 r0 I: ?- v! H8 n! {3 N8 J
; T+ k5 k+ L7 U1 h
" j& s) T* Y; ?: Y# \8 |( A6 N
" h+ r' I: r1 g1 ^8 v& |var BIOS = xdc.useModule('ti.sysbios.BIOS');
$ v ]; f; T" M, `$ T: eBIOS.libType = BIOS.LibType_NonInstrumented;
6 c: n$ J/ _2 I
* g! o) G, d4 \9 K9 F7 W
# {1 x' H' R/ N$ f( ]" I- T/ {' ~. s# _; w
xdc.useModule('ti.syslink.ipc.rtos.Syslink');
* K& P& j; z9 H7 U) {
0 ]0 f' ^# G4 G+ s5 n3 I1 Z* t' H M+ Y( L, {. ]) P
: S C. y$ o0 h* M% ^& n
var MultiProc = xdc.useModule('ti.sdo.utils.MultiProc');
0 o8 S1 a5 M$ R4 G3 o, x/ P* {* ^0 Fvar procNameAry = MultiProc.getDeviceProcNames();( J, N4 w4 ^' M! L3 p2 p& G: I( K
MultiProc.setConfig("DSP", procNameAry);
9 A' N- z9 i3 I& _) H1 R, Q6 @9 C$ ~3 K) P
8 V$ |3 [' t$ t
; w! g, G4 m1 w6 p2 Vvar Ipc = xdc.useModule('ti.sdo.ipc.Ipc');! |- P. N8 L j: e7 b& [
7 _3 a* }5 T/ Z( g0 w) r& q5 X! G& t4 C [; C6 {' U
. j3 Z3 P0 T7 M: WIpc.sr0MemorySetup = false;
1 A2 {2 M/ b1 l, A8 \: R- y& H7 s5 q+ }% _" c6 K, A2 ?% S
5 r/ J% ?' M' {7 L5 N( D0 X
' A# V( \, S/ ?4 S+ Y! WIpc.procSync = Ipc.ProcSync_PAIR;# ~6 {* @* \# p( @' g
. ]7 ?' E- i9 f' r3 d' b3 y
* a8 U2 ?0 f; V3 |7 W% H
/* define host processor */
; m, O: U/ y1 s: s: M# YIpc.hostProcId = MultiProc.getIdMeta("HOST"); i3 o, n' c6 ]! r( C3 i ?) T" N c
" y8 Z; ~% P6 k$ }3 [7 C8 P
( y0 v9 J- `. u2 \" k/ \/ \8 T
/* shared region configuration */
* E. h' U7 G. u. }. Z/ Y; V& ivar SharedRegion = xdc.useModule('ti.sdo.ipc.SharedRegion');+ d# G6 k* M; N" W, O! S* {& [
1 g$ _9 b q0 ^6 J+ i4 {8 u1 \6 Y" r
% q& C! q- A/ X3 p m( S/* configure SharedRegion #0 (IPC) */, o, w+ J e0 z) w5 C- E; m H" |
var SR0Mem = Program.cpu.memoryMap["SR_0"]; o6 F1 X5 @+ q2 a4 D7 d
; f o R. S( N" |
$ I& F+ H m, VSharedRegion.setEntryMeta(0,
# q! }5 J4 [& V8 {( U4 Q2 \ new SharedRegion.Entry({
$ j% F4 N9 q+ [6 D3 Q/ {9 e. ?: n name: "SR0",
% d0 t0 y8 |7 w) s base: SR0Mem.base,
) o8 O3 J& Y" Y len: SR0Mem.len,
: ^$ T1 H) _) Y4 [" a5 X ownerProcId: MultiProc.getIdMeta("HOST"),) l3 V/ F/ P+ R' t4 ~" o1 d0 L* O
cacheEnable: false,1 |# r( Q5 H" A: q9 a
isValid: true
J3 K6 r1 [3 L4 E8 ?" R })- O' P; k& {- Q' c9 b/ {
);; _% F2 u" L G! c; ]% U' a
) b- R, a6 M- `4 J! s* Q7 ^4 ?7 M( R
! E: n2 d: K. b7 w& z8 O8 v
& R/ ~( e' P/ x
0 C3 Y( M9 J1 X3 ICache = xdc.useModule('ti.sysbios.family.c64p.Cache');* Y- V/ u% ^: w- u4 B$ x6 i9 o
Cache.MAR192_223 = 0x00000008; /* xxxx xxxx xxxx xxxx xxxx xxxx xxxx 10xx */" `+ }9 e5 R! K/ W: a: ?
6 j+ C- x7 f" F+ e B9 b9 O0 ^1 p, T/ ~; B& o
0 e* k: v/ j/ S& I3 u2 w) s/ A$ I& A# _. Q9 L
/*
* h9 I8 m, c7 P * ======== Operating System Configuration ========
6 K3 j" G0 e9 h4 n */
( k2 }2 G* z, l4 L' o# L
2 @4 a# W: s y. e' k. L
( n( i" h5 S( S/ f: E) [. E+ }6 s. _/* no rts heap */
% X1 W* K5 r7 {/ G% gProgram.heap = 0;
: o$ Z3 U: m1 R1 q( A6 }7 y6 F nProgram.argSize = 100; /* minimum size */6 l% `! ?6 q( O3 m5 A
Program.stack = 0x1000;
. t6 v7 k$ A6 g4 ~; H) J' d2 @" y) P3 _/ z9 a u
& v1 X N; E% `" L/* create a default heap */$ r6 l9 K8 p3 z' x* N# i
var HeapMem = xdc.useModule('ti.sysbios.heaps.HeapMem');+ ]& w( {" g1 j! j f
var heapMemParams = new HeapMem.Params();
! [7 x9 \# z1 b1 o; V8 dheapMemParams.size = 0x4000;
" w9 ~% [: z5 X! @0 c5 M) a& R$ D# q5 z: ~
X, ^( R% r8 x. J" d" Fvar Memory = xdc.useModule('xdc.runtime.Memory');
3 [$ W- W1 O; I% vMemory.defaultHeapInstance = HeapMem.create(heapMemParams);" H3 P8 w" B, @8 N0 n
3 A- v) z( y6 M
$ h" {# _6 |. y, Z9 J* s/* configure System module */5 n- s- M0 e+ o# G( f
var SysMin = xdc.useModule('xdc.runtime.SysMin');
( `/ \' m' w. n: |: `7 K4 ~SysMin.bufSize = 0x1000;8 x) X# g, S/ L$ l
SysMin.flushAtExit = false;
) k! M0 b6 V6 Z5 Q" R
+ F' a2 R: c: `* h9 f0 [$ X3 _# E! m; M( a. P& u
var System = xdc.useModule('xdc.runtime.System');
5 h1 U; I0 s6 s2 L, f/ n& ESystem.SupportProxy = SysMin;- j* h1 n" @# `' |& {2 B6 s
: a, T, }0 H# v: E7 b, A. ^* [8 G3 B" w9 ]' Y
/* configure SysBios to use the lower half of Timer 1 */
) r% ~9 |+ m" G& M2 i5 _$ z5 fvar Timer = xdc.useModule('ti.sysbios.timers.timer64.Timer');) [1 b& K% d2 b$ V
var Clock = xdc.useModule('ti.sysbios.knl.Clock');
5 p% H! ^. O: r8 e8 B9 C" Q( bTimer.timerSettings[1].master = true;
$ d( d1 U$ I! G4 C/ d/ LTimer.defaultHalf = Timer.Half_LOWER;+ ]$ Q2 o8 [2 Q3 L! e) l% @0 v
Clock.timerId = 1;
7 K! N; v" W. t, h. c/ H. h! K. w4 O( R; `2 G
7 M+ y! ]) L! O8 D# h0 Y
2 E6 G i* ~6 u; ^
; H: n/ n9 B1 c9 x6 E7 s
|
|