|
[color=inherit !important] 我们这边用的你们的开发板,测试双核功能,目前遇到的问题是:
x x8 Z. y4 f2 Q" C[color=inherit !important]1.ARM端Linux 系统正常进入到文件系统中
+ B, e7 O+ r' U[color=inherit !important]
3 b/ H- }4 P' |4 [
! S" q3 ]# _4 L9 _8 A[color=inherit !important]2.DSP端运行基于sysbios的工程,在工程中通过如下设置定时器2
+ g: O1 k/ h; U1 |- W7 }[color=inherit !important]
p ?& v% H( w" p* f0 [5 W8 o1 K( J9 p
timerParams.period = 500;
4 r+ Q% O, A, c# G) k/ l" U- ^timerParams.periodType = Timer_PeriodType_MICROSECS;
/ V0 G& f7 ^5 fTimer_create(2, Timer2Proc, &timerParams, &eb);% m. S) G3 n( R, G
6 |: t) m% [- J: O5 g9 y+ k3 P6 o! ?! u
3.然后在定时器Timer2Proc()中断函数中进行翻转GPIO的操作,然后用示波器去看GPIO的波形,发现产生的波形周期为960us(正常应该是1000us);
, E7 F+ T( [# U3 Y! Q6 |: G* ^$ W产生了定时器定时周期和我预设的周期值不一样。附件是我dsp.cfg文件(只能上传一部分)。请教一下这个问题是什么原因导致的,如何解决,谢谢。6 u& N/ w( N6 L$ [8 @/ P$ f
' ^% N3 Q" ]2 Q
9 L& M( @; Y7 p1 n% ^+ A- |; v- Y |
0 i J3 @; N0 H5 o3 D, m% ?: ^6 p* g
/** o7 W+ x8 I K8 E4 _
* ======== Dsp.cfg ========" a- h! m9 Z+ l' y7 a" \
*4 C4 u# L; C0 S/ \
*/" b% e4 z* M j1 i) O
, d; B" X$ q( n; |
) E" V, s5 K4 I( M0 R" n2 p/* root of the configuration object model */
+ t- W! L; c- u4 [) E/ G8 p0 O' Nvar Program = xdc.useModule('xdc.cfg.Program');
) n" |5 {' e8 G% A z5 _ [2 ?' f7 M6 n: T+ C' b; }, ^7 b- A
$ m) E' e {1 H4 n- W/ ?$ [, g" u/* application uses the following modules and packages */9 d$ |: ]$ T* O0 W ~2 |, z/ I
xdc.useModule('xdc.runtime.Assert');
6 ~+ l# O( `. b4 z' e2 ?xdc.useModule('xdc.runtime.Diags');+ k" I; O: N2 t1 z2 q
xdc.useModule('xdc.runtime.Error');: H7 {1 y3 j$ T/ }
xdc.useModule('xdc.runtime.Log');$ r5 i' S5 ?7 q$ |/ m( A
xdc.useModule('xdc.runtime.Registry');6 S/ y+ I9 U& [: `) A9 A
9 n3 [+ r5 [. e8 V' L- W1 b" W
- w/ d; h( T3 ?5 d( `# R# yxdc.useModule('ti.sysbios.gates.GateHwi');
1 m) g5 S" u8 vxdc.useModule('ti.sysbios.knl.Semaphore');
1 T0 k1 e' P H, Xxdc.useModule('ti.sysbios.knl.Task'); m- R9 {; I7 ]$ a
! z# z& r1 G/ v* Y, J B; @
6 X I, k2 U9 Z0 d, u
% n E2 L2 j. n) O F
8 k5 q- S1 c4 t7 a/ @% h7 U3 c
: b# x% {$ F, U7 A- H9 I, p- N# ], Z% c/ a* W' C
+ k1 q1 E. L- p* t7 svar BIOS = xdc.useModule('ti.sysbios.BIOS');# M$ Q5 u# d6 y8 `
BIOS.libType = BIOS.LibType_NonInstrumented;
7 E- T: x9 d2 C. m
0 e' Z! w9 _) w8 ?' m G( p
* v. r. b1 G7 [! _3 t
5 j, W5 i! R, x" }2 Exdc.useModule('ti.syslink.ipc.rtos.Syslink');
! n" u0 R6 o, ^8 D+ c- |. V1 ]( d: T
# i) X' d! F7 ]1 O% k4 l( _
+ D( d! \* `& ?3 F
var MultiProc = xdc.useModule('ti.sdo.utils.MultiProc');
0 o# F# r" s( G( X" Z$ G( ~var procNameAry = MultiProc.getDeviceProcNames();6 g" Y1 ?4 K6 |, b: Q* d2 V
MultiProc.setConfig("DSP", procNameAry);! M; |3 |+ S/ `
' _) _' D z! R: c
' Y9 ~9 T. ~* k& T6 @+ `! g
- p) ]+ E- [4 D& O% p* [ a+ Qvar Ipc = xdc.useModule('ti.sdo.ipc.Ipc');
% a3 u; n! o- |' D( }" H/ O" G) [& f& t5 R$ u% F( s: M
2 }; C/ K; i n; b
) H! c, P* q0 o8 w" HIpc.sr0MemorySetup = false;2 M3 z8 E7 I5 e2 x: p
; ]9 F2 M* r# k1 K c+ W- g6 v% g4 g
. l' I+ x+ X8 a# P8 G
) G& \9 T' ?5 fIpc.procSync = Ipc.ProcSync_PAIR; j4 g$ @* w7 b, g
! x% a" m% \( h/ P+ X% A# W/ U+ f3 w W2 h# W4 \1 E6 @
/* define host processor */' |( R/ \2 I/ M& B1 ]' v W
Ipc.hostProcId = MultiProc.getIdMeta("HOST");
7 F, i2 ~* ]" y) |$ C$ h! C& h' V I7 _# H/ @* i6 B7 c
|* l/ v+ W1 t7 z0 O/* shared region configuration */8 d' q; u* L$ b+ \
var SharedRegion = xdc.useModule('ti.sdo.ipc.SharedRegion');
n* `- [/ \( Z' S: g1 ^% i; i& B' G/ ?1 Z0 w" u; V M: d
. Z* V8 o V$ W. {. W- H8 u
/* configure SharedRegion #0 (IPC) *// o6 a6 |& ~1 n0 `3 J# p
var SR0Mem = Program.cpu.memoryMap["SR_0"];0 s) d# A* ?6 }3 s% b
3 ^3 u# t* k N5 A) z
7 n9 o) Y! E7 x. t2 w3 m6 L7 VSharedRegion.setEntryMeta(0,: j1 c( b0 H, Y. v" X
new SharedRegion.Entry({
" T0 H0 |- W6 C1 x8 T# E5 }% M) f7 j name: "SR0",) k9 U" q* O- {$ r8 l
base: SR0Mem.base,' |3 k7 N$ P$ L0 n: u D
len: SR0Mem.len,
! c q9 @' ?3 b5 X$ p0 \ ownerProcId: MultiProc.getIdMeta("HOST"),
* Z0 u, V/ h; y/ \- t6 m- J cacheEnable: false,- C8 s9 ?2 a3 m
isValid: true
% c& p6 {0 n2 {- y })
7 t( D. d- h! Z) ^# A, n" V! y8 ?- t% C);% p2 H3 g; O3 g n
, }2 l4 n/ ~& Q, {
' Y- L e) O+ P6 w& t& }3 {# w
0 ^: u* [- c5 t- q! x
% k) a' _# S9 W, Z3 I% r& D0 Q# J! B
Cache = xdc.useModule('ti.sysbios.family.c64p.Cache');8 r- m) b: x* \: M' F. B
Cache.MAR192_223 = 0x00000008; /* xxxx xxxx xxxx xxxx xxxx xxxx xxxx 10xx */
8 a( O1 `! P# Z& h( d# E
9 Z: `) ]9 i( Z& g6 D
/ e, V: o, B! \ \
, a5 K( G$ H1 X0 x2 |4 n2 Y3 F* j3 b( f3 o
/*
8 h; m( q2 ~1 s- F3 h1 E * ======== Operating System Configuration ========) @$ ^9 ~8 o# r1 q! E' L
*/
) [$ a6 _; t- Y9 N) ?/ A1 P, R6 M+ h c5 z, ?" _. \6 S7 r
9 @+ s+ z* E r) ]; U# j* y
/* no rts heap */
/ p. u0 K6 u* Z/ @Program.heap = 0;
( I3 v% k8 I) ?1 h) H- WProgram.argSize = 100; /* minimum size */
2 M+ ~" ~7 G# h! i6 k0 cProgram.stack = 0x1000;
" z* R4 h7 P% g1 h" \0 z# ~ A
\. f% Y! Q5 ?; p) U e3 X! c/ R- H( X8 o8 k9 I
/* create a default heap */
8 k* {: h0 a* ] T% Fvar HeapMem = xdc.useModule('ti.sysbios.heaps.HeapMem');
1 F% v# _" Y- q, Z/ xvar heapMemParams = new HeapMem.Params();3 B: P: b9 k5 a5 n& N5 ~
heapMemParams.size = 0x4000;
y+ m/ }2 C+ @+ h5 a
* Q# ~+ W5 I; C- V6 {. T, g* A
5 F' b( @+ G7 y( n/ Uvar Memory = xdc.useModule('xdc.runtime.Memory');
5 l5 X" ^0 b/ o- r6 {( UMemory.defaultHeapInstance = HeapMem.create(heapMemParams);
2 h4 K( x+ n- [) @. H& H& K2 c9 D) `; p+ i( ]
6 b4 S$ B7 f/ ~/ q/* configure System module */. N7 t5 N4 C$ A4 s' L
var SysMin = xdc.useModule('xdc.runtime.SysMin');9 a G! U( \6 W9 V/ p7 L
SysMin.bufSize = 0x1000;6 t& ^/ R/ m3 w" D1 f
SysMin.flushAtExit = false;
" |" e2 v/ G8 M" @. \: ~9 U ~- k. l$ ^, v
! M1 J8 u+ M( c1 L& L1 s4 a" n5 Ivar System = xdc.useModule('xdc.runtime.System');. y& A3 @$ I Z" r9 D
System.SupportProxy = SysMin;/ J- K! l: f' z. r1 ]/ b
* {! R3 D% {) v! d% H M
' a& c, [0 s% J$ k" m& r
/* configure SysBios to use the lower half of Timer 1 */; y( s- z; [0 q. F
var Timer = xdc.useModule('ti.sysbios.timers.timer64.Timer');
" u- E# @) F2 f! P3 C% O" Nvar Clock = xdc.useModule('ti.sysbios.knl.Clock');% C- }3 M& ]' j
Timer.timerSettings[1].master = true;$ I$ E" X. m7 _! ]/ G. L& E/ G( n* t! k
Timer.defaultHalf = Timer.Half_LOWER;" b; c; _5 @6 R/ d& q1 P2 O x
Clock.timerId = 1;
% |( x( F) Y8 M, O; Y7 A9 c% Q% _% Z6 y# W3 H" d, p
* E7 b& G- k( m1 r* C
; Y; L! e, \# k) j+ |
, E+ L) U1 L+ c6 Z
|
|