|
|
[color=inherit !important] 我们这边用的你们的开发板,测试双核功能,目前遇到的问题是:
" c$ a4 ]9 _/ _5 \+ I1 b[color=inherit !important]1.ARM端Linux 系统正常进入到文件系统中: G$ D7 L1 ` j' d" L
[color=inherit !important]5 G( S5 s- S. }3 ]
/ h' K) t2 t# Y& n0 v* a5 w7 n
[color=inherit !important]2.DSP端运行基于sysbios的工程,在工程中通过如下设置定时器2
) e9 K1 S7 ?# P. M3 h! o* l[color=inherit !important]0 {& w1 S, A1 C! c& p% N6 _
7 ^. r, U. R1 {* j, r' ]7 |2 r
timerParams.period = 500;0 W+ Z2 r" N' E2 O& y# R
timerParams.periodType = Timer_PeriodType_MICROSECS;, F* E# v+ i; g1 L# l* g; C
Timer_create(2, Timer2Proc, &timerParams, &eb);- I' [ ^ F# G
4 z) }: z" q1 a$ a N1 \! O1 N. t+ ?
9 t- w6 o( k c2 p* L" J% ?5 n
3.然后在定时器Timer2Proc()中断函数中进行翻转GPIO的操作,然后用示波器去看GPIO的波形,发现产生的波形周期为960us(正常应该是1000us);% W: J8 m+ U# b) D- R$ _0 B& m
产生了定时器定时周期和我预设的周期值不一样。附件是我dsp.cfg文件(只能上传一部分)。请教一下这个问题是什么原因导致的,如何解决,谢谢。
' @5 o0 h: ?8 Y% x8 S* U" `/ M: Z k5 a
+ G) L( t( ~9 p
6 b9 V* P8 r" K, p/*
3 l- s2 y9 h' o8 B" H * ======== Dsp.cfg ========
& b) o1 r2 X2 g7 l *" B3 E0 t2 M* L
*/
* s, V- E& N6 w
4 x5 f b( h- g8 ?+ O3 ] A& g" ~5 S- Q9 d
/* root of the configuration object model */
' x ^1 ^9 H) d7 L4 x% H1 L" Rvar Program = xdc.useModule('xdc.cfg.Program');
8 g7 Q; E6 A' [( v+ u3 J
/ M( Q% K& g* _$ ]' X+ P" y1 U& J H- |* V
/* application uses the following modules and packages */9 Y6 u) L; H2 K9 B9 Z* T
xdc.useModule('xdc.runtime.Assert');
7 H9 v/ }9 F! B' }% z" lxdc.useModule('xdc.runtime.Diags');) @9 f ]( n! ^( ~# G+ b3 P) ?) D
xdc.useModule('xdc.runtime.Error');/ }2 t) {6 o* w. s9 ]/ `; W6 p
xdc.useModule('xdc.runtime.Log');% k, c* ~" z" _
xdc.useModule('xdc.runtime.Registry');- t1 }; ]& @ D; i( ?2 Z
. l5 H* a4 q) K* C4 V7 O/ w+ j5 _2 I: _
xdc.useModule('ti.sysbios.gates.GateHwi');" c9 |, w$ a8 r2 G0 {
xdc.useModule('ti.sysbios.knl.Semaphore');
. R* f/ g( E% p5 kxdc.useModule('ti.sysbios.knl.Task');
2 K4 t& d+ V1 v+ F) }% K$ n( \
' f5 s) [2 \3 T4 t! U& Z! T8 U: G2 d- f+ f) p
- L0 S' Q) R& d+ ]
1 c& K f3 [. M( Z0 b/ I7 U
& M" B/ C% v4 A! s. K. p
j9 | g6 w k, |
$ q+ C* G: K5 o! {$ T" `( cvar BIOS = xdc.useModule('ti.sysbios.BIOS');2 g. k; a0 d. U4 u- k
BIOS.libType = BIOS.LibType_NonInstrumented;) d" B/ | a" H. U4 {2 {. y
! O& I6 A! a4 o! e1 g# y4 Q! J. d0 h+ S- w4 {% v3 e7 _
# Y0 W7 e3 ?8 S# p( Dxdc.useModule('ti.syslink.ipc.rtos.Syslink');
9 b4 G+ q2 \& u6 V3 e# e& @# D* o% v! _
: ^9 D. R. `2 u4 F7 U9 Z3 p8 j1 `, c x) \! d* t$ f
var MultiProc = xdc.useModule('ti.sdo.utils.MultiProc');3 I, P0 X7 ^+ c4 ^; G( T1 ~
var procNameAry = MultiProc.getDeviceProcNames();% V2 F4 f: _. G9 h* T
MultiProc.setConfig("DSP", procNameAry);
7 u6 R. h- N7 R$ H; @! C$ L* O, T7 D/ P( [5 j- A# U
5 f' I$ C" J0 k1 Q1 F+ B! {8 N1 \7 m* p! A7 q, s/ h
var Ipc = xdc.useModule('ti.sdo.ipc.Ipc');
/ Z4 b9 ^6 u# G" V" N9 T6 w6 P
+ S$ g' {4 I8 y7 A5 x" D7 @9 {' e# h% t
" }: h# u6 Z& [" @
Ipc.sr0MemorySetup = false;
! B r# k' S8 q3 A4 e9 h% g$ r; ]. S
( D9 j" t9 Z0 U- i) A2 M3 Q! s1 ^& I9 S2 F. P ^6 ]. h) ?; [' J
Ipc.procSync = Ipc.ProcSync_PAIR;
( ?2 [3 D7 o% z0 `% G7 C
! E. r5 q5 p$ j8 e& }9 e% s5 l6 X- H. o T; f4 d0 G, g" l2 ^9 j
/* define host processor */6 G2 u( K3 D6 c! T. |+ |
Ipc.hostProcId = MultiProc.getIdMeta("HOST");/ s9 k& r3 w& F
- z$ y* c8 D; i2 q, v+ c- j& H
* {. P+ ?; a8 F/* shared region configuration */* T) p, R5 F6 R6 K( G
var SharedRegion = xdc.useModule('ti.sdo.ipc.SharedRegion');+ \% |, k, }% Q/ @6 r* y7 }- ~# T1 `- x
8 H1 c- S/ J8 _ j( V/ V
* a! ~" v: }8 G5 s1 h! {/* configure SharedRegion #0 (IPC) */
5 m# J! m; ~7 jvar SR0Mem = Program.cpu.memoryMap["SR_0"];
, D; p3 _6 |- O z% Y* f6 e- o: m% ^
" @0 q ~: L* m/ M* B, pSharedRegion.setEntryMeta(0,) R) e5 y9 k( N& |- L
new SharedRegion.Entry({
- I. o' o$ _$ D- W8 A& a name: "SR0",
* B! W4 I; f9 s* s0 C base: SR0Mem.base,2 j7 |/ d1 x# M4 A: m. i
len: SR0Mem.len,
* s7 \: Z) k2 d$ j& t7 g2 o ownerProcId: MultiProc.getIdMeta("HOST"),2 S% T7 C9 A, ]: T* _1 e2 ~5 B$ W
cacheEnable: false,
! }# E* D }6 G& ? isValid: true
/ C; B( c( p1 Y8 k. q" b* K1 e }), ?7 t9 S% S& X( @ B. d1 ?
);
+ N2 g, ^0 |% w6 x- _5 p7 P' e j- I6 F
8 B& i9 U: ]9 E& x7 y' @/ P$ c. U* i/ M3 q
/ n; f0 Q# K. S
/ }: `3 }0 Z) v3 @( R! LCache = xdc.useModule('ti.sysbios.family.c64p.Cache');
3 N( j7 @3 c9 ?: Z% q$ fCache.MAR192_223 = 0x00000008; /* xxxx xxxx xxxx xxxx xxxx xxxx xxxx 10xx */
# f; S) F8 Y. X I* y! a, B7 E' r4 p7 [$ g9 H4 @, H. E' `; O
$ g' C0 i- ?* \
! S# i3 z0 [1 _0 {9 o) _; N$ {+ V! k' l. q' e1 K
/*( [; Y# [3 V7 S& g7 g2 F
* ======== Operating System Configuration ========
# f* s. _9 T9 `- q4 r; c: ` */
5 a) n5 }* V2 q6 u/ l S8 r \$ S9 a5 Y8 z: }1 ` U
' ^% y" R' O* V
/* no rts heap */0 F: m& q& s U
Program.heap = 0;& ~ o& _) i7 ~! i% \ I( |
Program.argSize = 100; /* minimum size */4 ]5 S* z" a- o+ h. @$ f
Program.stack = 0x1000;8 l3 c E0 W K" \+ U
3 `9 h. P" F- _+ v9 i1 T
- P0 z, _9 r+ z& v
/* create a default heap */, A% t( T1 ]& @, N% @) {/ P
var HeapMem = xdc.useModule('ti.sysbios.heaps.HeapMem');
\& M8 K. Y: {5 rvar heapMemParams = new HeapMem.Params();
0 q) |" e9 A4 R* D9 ?heapMemParams.size = 0x4000;2 L0 N6 l% e0 s" b- h
# Z$ k9 A$ Q9 \3 @& V) X8 o
- j6 Q& H3 T5 p2 t# xvar Memory = xdc.useModule('xdc.runtime.Memory');: ~4 U3 t$ h/ J2 A Q; V7 {3 X y
Memory.defaultHeapInstance = HeapMem.create(heapMemParams); J; d) A6 E% a, b* u
& Y% [/ N! h F J) g7 M% v
2 z7 ~9 m: v/ t- {/* configure System module */
: R$ ?5 M) C" k4 ~$ @var SysMin = xdc.useModule('xdc.runtime.SysMin');9 o, W" Y( D# w6 D
SysMin.bufSize = 0x1000;4 F; ^* }4 ]) G- n) q- l' A
SysMin.flushAtExit = false;
& ?: K- g: p' Q% f
" G$ F7 K3 E. m3 e; H
0 E7 k4 y& w" m2 ^0 a* ?! qvar System = xdc.useModule('xdc.runtime.System');0 V. Y* z1 A# j' _! ]
System.SupportProxy = SysMin;
' J5 P6 _% R% d& _8 Y, d3 N* h8 j& a1 b
@8 H8 p8 g* R0 ^# F% ~
/* configure SysBios to use the lower half of Timer 1 */
5 I) B* P5 w9 D5 R. ~var Timer = xdc.useModule('ti.sysbios.timers.timer64.Timer');. Z q* c# }% n! t+ T# C
var Clock = xdc.useModule('ti.sysbios.knl.Clock');) E: q4 R( k1 |! ~6 P& _
Timer.timerSettings[1].master = true;9 y/ h" b% y1 y' V6 `! l
Timer.defaultHalf = Timer.Half_LOWER;" `, h6 O! {) n
Clock.timerId = 1;
; G* p- p9 k/ A& P9 Y( t! [7 i7 W" f/ E( J
* w# U3 f1 ~* P3 J
$ w8 g" o4 r+ Z
# k0 p4 t& D# l- Y7 g2 y |
|