|
|
[color=inherit !important] 我们这边用的你们的开发板,测试双核功能,目前遇到的问题是:' @4 G( T7 n7 Y/ d: m
[color=inherit !important]1.ARM端Linux 系统正常进入到文件系统中
) ?4 }8 J J0 ~# j. @[color=inherit !important]
$ G8 V7 {) u1 } u$ F# ?, O8 [( q* v9 u% m
[color=inherit !important]2.DSP端运行基于sysbios的工程,在工程中通过如下设置定时器2
- @' v1 b$ q# i3 b) X( n[color=inherit !important]7 f6 U8 _3 e$ E% t; q
e, s" c* ] a0 A4 w
timerParams.period = 500;
3 D" q7 u u. A; e& `8 b" f$ dtimerParams.periodType = Timer_PeriodType_MICROSECS;$ N4 r/ T) N% v3 w8 _
Timer_create(2, Timer2Proc, &timerParams, &eb);1 M" l* O- I6 Y o4 F
( e; W/ x2 y1 G u6 x* W2 G% Z: ]. ]$ j- a
3.然后在定时器Timer2Proc()中断函数中进行翻转GPIO的操作,然后用示波器去看GPIO的波形,发现产生的波形周期为960us(正常应该是1000us);
0 {1 d2 n$ o9 @3 Y/ X产生了定时器定时周期和我预设的周期值不一样。附件是我dsp.cfg文件(只能上传一部分)。请教一下这个问题是什么原因导致的,如何解决,谢谢。- S+ I% n# e. |8 q7 \
! X, W* A+ h9 [; U; M. l6 D
# {; M6 C. O$ p
9 j2 M8 C- M1 p3 X/*
% G( T. m+ o k# I * ======== Dsp.cfg ========( K5 ^ `$ U. ~ P3 s
*
6 s6 m! g: H! C, c. P4 F3 p/ ] */: l, F2 q3 Z# Q: L1 B+ q
- l' v6 v+ E5 ~6 y
, q N8 a L8 D
/* root of the configuration object model */( |0 k' u+ ]7 A2 a [ F3 A# d% r
var Program = xdc.useModule('xdc.cfg.Program');
) T& a$ w6 q1 c: L. n8 c6 D/ d6 Z1 f: {. F& x( j( W8 ?& N
) s0 f$ o9 k! `8 q7 q: L9 X' C
/* application uses the following modules and packages */5 w9 d' |; M ?: \
xdc.useModule('xdc.runtime.Assert');
: |+ R9 N; d% h+ c& jxdc.useModule('xdc.runtime.Diags');* Z( ?9 {' f7 y; V4 o+ {- ^) d
xdc.useModule('xdc.runtime.Error');" i/ V$ Z9 G# z* ^6 \2 S
xdc.useModule('xdc.runtime.Log');4 I: x# Q3 z8 ]7 J
xdc.useModule('xdc.runtime.Registry');
C( t- c, c7 H
* _8 ~" N; G. l- u4 ^/ w
. \0 Y2 D2 h7 r( G) y4 H/ gxdc.useModule('ti.sysbios.gates.GateHwi');
# m% x/ J' k" d! _% m7 Hxdc.useModule('ti.sysbios.knl.Semaphore');4 t1 ?" U" u7 n% I9 F: Y
xdc.useModule('ti.sysbios.knl.Task');
# t4 l/ O, ]- F. m% Z$ u+ w2 r: O! H+ x8 r# z' F! e8 g, `. q
- h6 t4 c( M7 n+ B; Z9 r
' K4 \$ P2 L: `0 B% R3 ?# F# C8 S7 R5 M9 ]
' [ R: [! k7 x
# h; e: x/ h! e- h( B1 I4 V4 P2 N) K& p8 n% I
var BIOS = xdc.useModule('ti.sysbios.BIOS');" d1 b; `& u/ l) m, L0 F& L. X8 q8 ]
BIOS.libType = BIOS.LibType_NonInstrumented;
7 Q; g5 z0 P$ k7 `9 G. R3 f" [
, L8 u8 d* o' d
+ Z G; v% G% F8 E2 l* J8 w7 l0 {& E4 Q: ?4 ^7 D
xdc.useModule('ti.syslink.ipc.rtos.Syslink');/ X, k9 I% o; C* o# ?5 J
R; a$ ^5 y; ]8 b2 ?( F" j
7 S! Y5 k* k9 c, J# q
3 K' |9 c: c% _7 }0 I
var MultiProc = xdc.useModule('ti.sdo.utils.MultiProc'); _. ^0 C( ?* k- s9 Y; [! w& }3 [
var procNameAry = MultiProc.getDeviceProcNames();) [6 I A1 D) s: \ m; C( ~! X) C
MultiProc.setConfig("DSP", procNameAry);
4 K3 \. B; D' ?+ f E5 d) R' ]2 o; M' |, ~0 i, ?( ~. U
# ^* _+ Y6 n) ]6 ^0 q" `1 }: F1 w7 N+ s4 v7 S$ K c# z& p6 W q
var Ipc = xdc.useModule('ti.sdo.ipc.Ipc');+ ]* t+ I& I( F) w& D+ g& e' u( ]+ N
8 f' D3 U- S3 N& J. q# W" ?! f: d: q3 a# V
' t1 [0 G5 h; ^" U( ~$ }( rIpc.sr0MemorySetup = false;0 e1 R6 ^$ ^8 D$ W6 Z
0 j. h, M3 T! s$ z, |5 j
& x8 x- Y2 z2 a6 `/ G$ Y1 ~4 K4 X
! O' |9 {; T6 i5 o% b; B' UIpc.procSync = Ipc.ProcSync_PAIR;
! @: `. t7 B: t; v p6 J( N6 P, w$ s( g4 q; J/ u8 O3 o
6 u8 r* q& q/ y( B/* define host processor */; J/ ~- p: `( T1 b
Ipc.hostProcId = MultiProc.getIdMeta("HOST");, t9 ^# u- K% m* O
- \% T, Y" W0 g' L
- X% d/ }/ w x9 v% l- l/ G
/* shared region configuration */. W4 x, `6 q+ {* w- x0 W" ]; w2 F
var SharedRegion = xdc.useModule('ti.sdo.ipc.SharedRegion');9 o( y4 K/ H" y: D
7 h! f T+ f9 q: [) u
; u! S! t, c4 G9 o; ~/* configure SharedRegion #0 (IPC) */
: L5 p2 X; [5 R, c/ T, I& Y6 xvar SR0Mem = Program.cpu.memoryMap["SR_0"];, R* h( z- R& O8 V* \ l
3 M' v6 y. ]8 u, {, J$ i( f
, Z) S/ C4 Q+ t$ JSharedRegion.setEntryMeta(0," \8 |$ f; ?" T3 t
new SharedRegion.Entry({
2 U/ q3 n9 P% i" p name: "SR0",
2 L4 m- }+ o( n0 e5 g/ C base: SR0Mem.base,0 ^ Q: M" u! ^8 Y) Y
len: SR0Mem.len,% O% J! ~: K% P. z( t6 o
ownerProcId: MultiProc.getIdMeta("HOST"),
, C' v8 u% M# }/ Y5 z# X cacheEnable: false,) A$ k& ~( D5 ^! W3 [
isValid: true
/ R* [7 V/ i4 D4 Z( G1 M }) {3 h* X; a, s0 x2 ?
);
2 T# @ h6 M' h- {# h: m, H( g' F
: L- [- T$ R3 j0 x8 X5 M
) t/ M0 n' a" q! [+ |' i8 b G5 l; g0 S
( S7 r4 X" A1 H9 @/ s4 C) UCache = xdc.useModule('ti.sysbios.family.c64p.Cache');
. u4 X: d9 \; p5 A5 DCache.MAR192_223 = 0x00000008; /* xxxx xxxx xxxx xxxx xxxx xxxx xxxx 10xx */
% l- v5 W, D3 ?% H- t/ `8 [! i3 z# F& e9 |2 M* }
$ G3 ^& O4 B0 B% Z) ~
( s9 j1 z: `6 K+ q
* @, ]$ ]! h" l* Z `, X/*
; W! f! s" C" T7 ]& B6 s# K * ======== Operating System Configuration ======== m3 j) o* G; u# P
*/
# @2 U6 f, C3 ]7 E& f$ L- e' W/ W C/ p! }( ^" w% A* n7 t+ Q
) y( l) v8 q& M9 l- h7 c/* no rts heap */- s D! g9 i+ N; x( f) r! O
Program.heap = 0;; O; Y0 d6 H4 H5 _ l
Program.argSize = 100; /* minimum size */: s4 Y8 w3 A2 m
Program.stack = 0x1000;
" P4 N, q1 H8 ~! {, M
6 T1 V6 s: p" I
6 W0 y. a1 U2 Q& }2 s7 L/* create a default heap */% F' s) W% Y! i( X3 j4 C6 O
var HeapMem = xdc.useModule('ti.sysbios.heaps.HeapMem'); K: b1 L# W- f
var heapMemParams = new HeapMem.Params();: _& `9 k; y3 s* Q6 A; z( R
heapMemParams.size = 0x4000;2 s# i1 k+ z5 \4 q; h5 x1 e, s+ e1 X2 V, k
; {+ h# W K( r/ k: h
" A1 P5 b' C' s& f6 ]var Memory = xdc.useModule('xdc.runtime.Memory');
) `* s- u: z0 a4 x& ?Memory.defaultHeapInstance = HeapMem.create(heapMemParams);6 c' _0 R/ ], l( X
% ?: S1 h$ H9 O
. e& B6 |: z! E/ J% y
/* configure System module */0 Z& G, ^) b7 }2 x2 F
var SysMin = xdc.useModule('xdc.runtime.SysMin');
& p/ @ `4 y: @& d! p1 HSysMin.bufSize = 0x1000;( N6 K+ C7 g0 H6 D2 T; J2 O5 F/ N
SysMin.flushAtExit = false;9 F# v5 v2 \) A, t9 H
) u V, _6 b' z" R
+ d% Q$ Y2 c5 ^; h* ^' f# v, ]
var System = xdc.useModule('xdc.runtime.System');4 I) _# q1 N' t: e: X: p4 [
System.SupportProxy = SysMin;
+ l8 a- Q0 K$ K$ \; h
d) X( ?/ f1 f
4 f, G4 n0 i) _0 h/* configure SysBios to use the lower half of Timer 1 */1 ^: U1 P3 C& g/ o0 v3 O+ b
var Timer = xdc.useModule('ti.sysbios.timers.timer64.Timer');
6 A2 Z6 t7 D( K2 O: L$ [) D2 Wvar Clock = xdc.useModule('ti.sysbios.knl.Clock');2 _ @! S4 ?* P0 e7 @7 g
Timer.timerSettings[1].master = true;8 A( R: \) i' I( ~
Timer.defaultHalf = Timer.Half_LOWER;6 h1 W: H/ L. m( _. J& |4 W! V, h
Clock.timerId = 1;
: y0 a, o! K1 w- b* u+ G- e! j; A& |$ d' l" V
7 [3 K3 t8 G8 |: Y% H" X4 ~( ?/ A8 T
# F& L7 p& Y; g! {& g/ o |
|