|
|
[color=inherit !important] 我们这边用的你们的开发板,测试双核功能,目前遇到的问题是:
9 s% v5 V ^( k1 z* a[color=inherit !important]1.ARM端Linux 系统正常进入到文件系统中
+ t( @) _) c6 k/ J. t[color=inherit !important]& `9 t o+ i0 H/ _4 B" V
$ G7 L' y/ V" O5 U2 y$ ]9 L0 w6 @3 f[color=inherit !important]2.DSP端运行基于sysbios的工程,在工程中通过如下设置定时器28 U% k, B# ?) f% p
[color=inherit !important]
; S- v8 ^: D( |3 F" M9 d& ?6 T' }+ g0 }/ Z1 h& Y+ g& g
timerParams.period = 500;
" E+ U3 }4 i( R7 Q4 c; r8 {timerParams.periodType = Timer_PeriodType_MICROSECS;# U6 J4 s. E2 w1 Q1 p/ Q' R
Timer_create(2, Timer2Proc, &timerParams, &eb);1 A; k! `$ g& [2 `( }9 \3 U
6 `+ r/ c2 z# \, s9 I' y* K
% f; l: |" s) L( ]( B* ^3.然后在定时器Timer2Proc()中断函数中进行翻转GPIO的操作,然后用示波器去看GPIO的波形,发现产生的波形周期为960us(正常应该是1000us);
9 i) P- p( }* @" L- M3 E6 L产生了定时器定时周期和我预设的周期值不一样。附件是我dsp.cfg文件(只能上传一部分)。请教一下这个问题是什么原因导致的,如何解决,谢谢。
0 S- n7 K1 J" p" y
9 b$ s; g9 [: z; f7 A9 e& Y6 I5 J3 W6 q
! u& U& [6 O$ Z, q. j/*
3 q' ?. y# h4 ^( n/ w8 d6 _ * ======== Dsp.cfg ========
& t/ ^* X* P9 k- c+ K/ [; r *9 \; k3 i: F3 M% ~
*/
- F2 a" q( L4 z9 `" P& t
& H9 B8 K; m7 [- o7 N. y4 i/ t& R$ r5 {1 d! B8 \
/* root of the configuration object model */
, f( x+ j0 W( i8 V: m5 qvar Program = xdc.useModule('xdc.cfg.Program');7 c' Z- |$ H- }" D A( K% q$ M
# K- R4 B0 q$ X# Q; p+ a8 S7 x7 [; L6 @9 j
/* application uses the following modules and packages */; U1 R7 _0 C' a6 b( o5 P- \- M6 j/ T
xdc.useModule('xdc.runtime.Assert');: g% Z6 T4 G/ h8 Z! k
xdc.useModule('xdc.runtime.Diags');# ]" R1 g3 y1 Z( Y
xdc.useModule('xdc.runtime.Error');' x: Q7 u. ~! ?2 H+ O
xdc.useModule('xdc.runtime.Log');2 z, I# M+ ?- D; H
xdc.useModule('xdc.runtime.Registry');3 J" R8 `2 ]* c
% F; Z! ?! H3 Z( m& |( e+ I5 B
$ F4 z; k" T0 E- V9 s2 g! B+ z( Pxdc.useModule('ti.sysbios.gates.GateHwi');
* D" ?- m+ x1 e4 D# ]# o0 b9 fxdc.useModule('ti.sysbios.knl.Semaphore');
" H, I4 y7 D* Zxdc.useModule('ti.sysbios.knl.Task');
7 d1 x$ y0 s: G! M2 h, f* s
0 v+ I, o/ [! M/ f5 b0 O6 Q1 N6 \2 s5 u8 r6 s
- z! D9 h5 D4 `0 n G. [' y4 B
( K4 `9 x/ }) \8 z/ m& b( O
0 [0 b B, r) T t( h: `3 Y5 r0 C. g# t' Y
* n5 S* i& ?3 hvar BIOS = xdc.useModule('ti.sysbios.BIOS');
, S- Z# z( r" l6 f5 j) l- ^& NBIOS.libType = BIOS.LibType_NonInstrumented;( K, g& r3 J# X0 o' i' i9 G! j
5 x$ J$ y D. B# r& p" j
$ x* f. o' u! a" g! l6 U8 ]" n6 L
+ W4 S0 k1 I9 Y- Y) ?& B+ u0 L
xdc.useModule('ti.syslink.ipc.rtos.Syslink');' \6 p+ }# S/ ~: M1 m( W
7 t; x, _( {9 e; n" t) t& `$ X% S# q. I! I" r8 e5 F( I' Y+ N
+ d) o9 A( w" U' P) Z1 s# R
var MultiProc = xdc.useModule('ti.sdo.utils.MultiProc');6 c$ }; r2 f* @; U
var procNameAry = MultiProc.getDeviceProcNames();" _1 I- ]. L/ c7 \0 d9 Z! j
MultiProc.setConfig("DSP", procNameAry);0 h% i, N! l& D# f! C1 H( e
" E) q6 S# k4 j# @& V5 J% }% o* O0 L# d+ u
/ j2 w1 z$ |" u% y+ T& d4 H& ^var Ipc = xdc.useModule('ti.sdo.ipc.Ipc');
: T; ~; W6 @" v6 D1 z
/ q* w8 l4 f3 {8 L" }8 h( b! U( D
: @4 @- }4 g8 C4 \3 R3 b! p, qIpc.sr0MemorySetup = false;
% p+ T; K: u1 I2 T' N* ^) x8 B3 t. R9 b/ m$ m
N- I9 l, e" H' s C8 t; s
( j6 B# F# r' g1 BIpc.procSync = Ipc.ProcSync_PAIR;1 o2 O2 j. V6 o$ l
0 K5 T a1 h4 f/ s* U
' G$ N- P% x, i v* ?3 B" ]
/* define host processor */" x) m7 ^$ b: g% t+ _: T8 a3 Q* `
Ipc.hostProcId = MultiProc.getIdMeta("HOST");
- v' u6 N3 J# y* q( A: X
. B9 c. H6 T0 }1 U# R# k- L& G% E1 j; S/ t8 Y. F2 g
/* shared region configuration */. v! ~7 F# G9 z3 I V! X) e
var SharedRegion = xdc.useModule('ti.sdo.ipc.SharedRegion');3 a0 r+ O1 q9 e3 S. o6 n P4 l
, O+ L/ N/ y3 _2 ~$ G! x9 a
' I) s h- c/ `9 ?/* configure SharedRegion #0 (IPC) */
# N- B1 |9 p8 m7 m$ J8 o/ }) q' q4 yvar SR0Mem = Program.cpu.memoryMap["SR_0"];
, f4 p# O! Y6 M( k& z" R9 N9 B6 Z2 B; d0 a- v
, k1 c: B, K0 p+ S9 N/ X( \SharedRegion.setEntryMeta(0,0 ^1 M; J+ v/ T4 c
new SharedRegion.Entry({
, v: j- ^! q2 H" y1 j name: "SR0",/ l* j" y/ p" ~& g; `
base: SR0Mem.base,& R. E, ?1 a2 n' a
len: SR0Mem.len,
X: |( B" h$ |" | ownerProcId: MultiProc.getIdMeta("HOST"),4 R- s u! X; F' t( ?& W
cacheEnable: false,+ ~3 D$ Y o" k. d. ~; B" b
isValid: true2 L0 c8 V% Y4 s @5 z- `. j
})
1 K! N4 p: @: c4 C);
, S$ @6 u. n5 A0 ~
# _8 ^; u! _; }/ b/ o. Y1 N& g8 x' ]$ V" C y2 S/ K
6 S$ y1 V4 }- K, L" u% v
1 ~, p5 P: l% C* u* P5 P3 H6 n
7 E0 o/ P- q W( c& ZCache = xdc.useModule('ti.sysbios.family.c64p.Cache');* q! y+ F; p4 G) ~" F) d6 d
Cache.MAR192_223 = 0x00000008; /* xxxx xxxx xxxx xxxx xxxx xxxx xxxx 10xx */
" @* b. \1 v/ {6 K( W f5 o8 {& p/ M5 J9 y+ P1 m0 k* o
" G4 m3 {& G( p) P- e& R
0 u! n; V! Y" Y- n& F
5 k" [+ S3 b. \/*
0 o7 {, r; {( d; k4 c9 e * ======== Operating System Configuration ========
% X+ ?4 [1 R. K; D */
( ?3 e# L* x0 L* Z5 ?0 ]. [- n; A W9 n
. N! x4 H$ Y- t, l$ u/* no rts heap */0 x+ M2 P, V* _0 Q2 @. K
Program.heap = 0;
) ^# J9 }( m0 \Program.argSize = 100; /* minimum size */. ~. t3 \. r( S! G( g$ y
Program.stack = 0x1000;! o: Y3 ^# o( g5 e: B8 l/ N
% b+ N/ `1 h, a v) U! s8 U) p3 [1 { K' A' Y+ x# P. A
/* create a default heap */
2 p$ n0 X* h0 x& A$ D2 G# E( zvar HeapMem = xdc.useModule('ti.sysbios.heaps.HeapMem');3 `3 u$ Q3 V4 `1 @ _( W
var heapMemParams = new HeapMem.Params();
]( Z6 I* d5 g) T8 bheapMemParams.size = 0x4000;
- U; Q2 h8 p% Q" O! ^/ P
4 j. W0 K( r8 P2 E7 j7 m- T; a5 e% J
var Memory = xdc.useModule('xdc.runtime.Memory');
+ b2 P3 E6 ?, h0 G7 {) LMemory.defaultHeapInstance = HeapMem.create(heapMemParams);2 y" f: J/ `, }9 L
+ ?+ ]! v6 I2 p; i& l, R4 {
* ^+ P2 k; v9 d5 s/* configure System module */
, @! H2 I) Y# z( P2 v. `var SysMin = xdc.useModule('xdc.runtime.SysMin');
9 L( y6 {% N' w" M. w HSysMin.bufSize = 0x1000;
- L! @, W) B+ \ i2 |SysMin.flushAtExit = false;' }( e3 e1 d+ d& Q. c7 v
# W+ s( j9 }1 F) W6 h; u+ z
+ Z+ i B. `" i! |) ^* ]0 ^var System = xdc.useModule('xdc.runtime.System');+ a: w+ S" ~- c. t- c
System.SupportProxy = SysMin;
& S1 `6 R; g; _2 b
- ?! x# w1 Z! v9 H0 _0 A' Q. l& ~& \0 F2 y& z
/* configure SysBios to use the lower half of Timer 1 *// K+ K( G; C3 p5 H1 i+ W
var Timer = xdc.useModule('ti.sysbios.timers.timer64.Timer');- l! C' k8 \: ?: `+ j
var Clock = xdc.useModule('ti.sysbios.knl.Clock');- i |2 _, [ ^, R
Timer.timerSettings[1].master = true;
2 j! I0 ^- ]. V6 WTimer.defaultHalf = Timer.Half_LOWER;* y5 E. K6 D, {: e/ s9 F1 z
Clock.timerId = 1;
: |; I2 W, d" e, l2 d2 f! x% D9 L0 H& @/ {
/ x7 h4 t0 h1 i
1 v' x l9 k0 l$ q& I
5 V. W7 M L$ b' B1 m) ]& c3 s1 c) k |
|