|
[color=inherit !important] 我们这边用的你们的开发板,测试双核功能,目前遇到的问题是:9 I z/ S. s2 K
[color=inherit !important]1.ARM端Linux 系统正常进入到文件系统中
7 V4 N' }* V: R[color=inherit !important]
' O: S) I. O+ }! g' L) m4 h/ a7 B' q3 r2 r2 ^
[color=inherit !important]2.DSP端运行基于sysbios的工程,在工程中通过如下设置定时器2
+ |/ H- D, v T+ S! G[color=inherit !important]
: J0 c9 m0 S) C/ q5 g8 c; B
2 Q! p; N( Z* q$ I' J/ }# stimerParams.period = 500;
, A; Z+ i7 A9 E' ~timerParams.periodType = Timer_PeriodType_MICROSECS;8 A- }% T, j; o
Timer_create(2, Timer2Proc, &timerParams, &eb);# P3 }; a- b2 I$ t
) U* d2 k. X8 M" C4 X7 ?
$ y0 L; \1 \/ A" M K3 h
3.然后在定时器Timer2Proc()中断函数中进行翻转GPIO的操作,然后用示波器去看GPIO的波形,发现产生的波形周期为960us(正常应该是1000us);( J P* n3 o, {6 ^
产生了定时器定时周期和我预设的周期值不一样。附件是我dsp.cfg文件(只能上传一部分)。请教一下这个问题是什么原因导致的,如何解决,谢谢。" M: y" a! A2 j s: `& G
2 p8 z; l' k1 b
5 {0 l4 `5 S- @' l9 f
0 a# R! s+ S9 {/*/ D z# h( X& J6 M( [2 ?5 D; S
* ======== Dsp.cfg ========' h" Q: m7 A4 q! o5 o$ p( F
*
) T1 X1 Z9 V2 F/ J& | N! L! ] */
" f$ ^4 s. f8 _2 a9 b# h( D) D" e2 S8 @" A
% T% s. Q- V; J1 Q# R/* root of the configuration object model */1 ^: U, f# H5 t5 S
var Program = xdc.useModule('xdc.cfg.Program');
. }$ I6 a0 k) Z. c. W' ^6 P( l* E& o: W* `
: D) u0 E) g3 M) g: m0 L( i
/* application uses the following modules and packages */5 o# h. I/ N+ P) o3 j4 x, p
xdc.useModule('xdc.runtime.Assert');
) O1 {! d# w3 T; k% W7 jxdc.useModule('xdc.runtime.Diags');5 _$ e$ r" W4 `
xdc.useModule('xdc.runtime.Error');
4 P6 x& H/ L0 A5 b) |: L1 Pxdc.useModule('xdc.runtime.Log');
R. F/ N" z* h9 _6 i: t- Xxdc.useModule('xdc.runtime.Registry');
2 d$ v+ |* [9 P# C; ~. y
5 Z! s$ M6 ?) X( g4 w+ L( a( ]6 y+ k4 y4 l C" C
xdc.useModule('ti.sysbios.gates.GateHwi');
, u! Z; P" y: N5 L- `8 Axdc.useModule('ti.sysbios.knl.Semaphore');* U6 `$ X+ W6 _& Q1 z4 p0 _' w( {
xdc.useModule('ti.sysbios.knl.Task');/ ^; |- \6 n5 ]# E1 ^
9 V+ N6 b/ Q. B; {9 ?% \; Q
! p: r0 C v4 E, `4 x
" h3 K2 c9 ^3 |+ L$ v" b1 F4 h( y- ^; h- _& Z: J+ h3 j
4 o& S6 P4 s; d" y4 F
3 A3 Y6 q- u# n' J- S% Y
# L9 x# F$ g9 y
var BIOS = xdc.useModule('ti.sysbios.BIOS');
/ T/ O; b6 {1 Z) ]4 x/ |2 y4 d. YBIOS.libType = BIOS.LibType_NonInstrumented;
; z6 @/ @8 M: o4 q
+ a; x7 m: W# {0 h. @: ]& X6 ^& j
8 M' i* M$ @9 D) a$ @
- A& h/ I2 a- S! F+ C" Rxdc.useModule('ti.syslink.ipc.rtos.Syslink');' H5 j# w& n2 {$ [* I
( d2 Q ? M- ^, S5 g9 c
% d8 h; d' x( V1 f- W+ B8 V u3 |, m: w# X7 h1 {, W# k6 C
var MultiProc = xdc.useModule('ti.sdo.utils.MultiProc');
/ S! ^* W# W8 m! a" }, M8 f0 Cvar procNameAry = MultiProc.getDeviceProcNames();
" G& g' a8 C6 M$ E. d9 A+ \MultiProc.setConfig("DSP", procNameAry);
! q+ s8 L# G: U {
& k' t- Z U5 L
) E% C- D4 y, G9 h
: s4 r# q/ ]6 Zvar Ipc = xdc.useModule('ti.sdo.ipc.Ipc');
! P4 ?, V" D$ J6 N0 U$ `2 \$ B) |: m; s" Y) y# r
0 C& E: g" n6 m& [
+ p3 O2 h, W/ _4 @: p/ {
Ipc.sr0MemorySetup = false;
& i; b) f# t5 b/ f4 N) s% S
2 \3 r! R A6 |- f( i) R" J/ Y8 D. ]- k2 _" Y! C( E7 B
( G: K- D, j/ S: LIpc.procSync = Ipc.ProcSync_PAIR;
, n. ?- Z& [% {. g6 j
" b* F; W, ]7 C6 [( h0 A, E3 j) ^8 s+ y8 ?, Z
/* define host processor */2 j |7 |9 q6 L* x; i6 |5 O
Ipc.hostProcId = MultiProc.getIdMeta("HOST"); N# G3 G/ p2 X, }9 ~. w* U1 |
$ M! z A' F; \8 R. E, |: u) S8 F4 R$ p3 l1 z; E; K5 \
/* shared region configuration */
" g( u f" u A0 Xvar SharedRegion = xdc.useModule('ti.sdo.ipc.SharedRegion');
; [+ b! y* u3 G5 w, L* p# x" H9 l7 M. \9 E1 t) c
% p1 D6 c9 |7 _/* configure SharedRegion #0 (IPC) */! l1 l) H# S6 z# g; v4 l# t& `
var SR0Mem = Program.cpu.memoryMap["SR_0"];! i* J5 l1 `* U
+ p+ S% l- k. t6 L `& w
" |7 f8 E0 v% Y' q3 Y' X+ USharedRegion.setEntryMeta(0,' ^9 r5 p- z7 U+ |2 a9 @1 H: S
new SharedRegion.Entry({ C3 \' m: b2 I+ G1 I1 q
name: "SR0",, B# o1 s& e! R f# Z- x" t
base: SR0Mem.base,, g. [) I, J4 `% M1 v
len: SR0Mem.len,
4 a: R) ~. g) u6 K0 J3 E. ? ownerProcId: MultiProc.getIdMeta("HOST"),0 {4 O: v# g3 w, U) d! C
cacheEnable: false,
P8 u4 z% @: I! C" p: |: z isValid: true' p8 V J) A* l" t" Y3 F
})! n Q! ?" F E( d+ m6 b
);
( y4 F$ d- D" k$ M* Z% t
# X( }, a! e- ^8 d( c! i; o6 j. p6 G' ~$ Z8 I" t r
( [$ ~+ x+ v. R' E4 S
7 `5 B$ N; b l3 S* e6 x! V5 m
Cache = xdc.useModule('ti.sysbios.family.c64p.Cache');2 }& Y7 N3 s% I+ N8 z x3 Q( r
Cache.MAR192_223 = 0x00000008; /* xxxx xxxx xxxx xxxx xxxx xxxx xxxx 10xx */: J: e) ~, h, y
4 J9 p) }5 l, q" T. t! i+ ]7 ~. w$ d, J, R+ G
( D* p/ r' T& @) K. i
" h' h, C( i2 M6 X/*
" @( i/ ]/ |: H- u: U* } * ======== Operating System Configuration ========
# `( _' f9 I6 M, `. S1 p" _8 N, } */
6 M+ p1 v9 u. o4 |" ^# A
W! @6 K0 q+ h6 g5 q" M6 I7 U
2 E- P8 T3 s5 \$ S! a2 s/* no rts heap */
) n4 l9 A0 j [" IProgram.heap = 0;/ X0 W9 w, C* \# v. e& l
Program.argSize = 100; /* minimum size */
1 g; F" Y5 _0 v% |' {: F8 V) z6 lProgram.stack = 0x1000;
6 Q9 g) u4 g' v2 i
( B( I7 J( _; f# C; c
( s) J8 v3 P6 p" ^& _" A1 l- A* V/* create a default heap */& G" o0 v: N" O# A, G. D; F
var HeapMem = xdc.useModule('ti.sysbios.heaps.HeapMem');
7 a( U5 a" P# h! Y( E( O3 i7 jvar heapMemParams = new HeapMem.Params();
1 x* F W2 w% w, q& nheapMemParams.size = 0x4000;
2 J0 i. b! q9 f/ A! v
* O7 ?4 A! D+ r9 x+ |- Y
8 y( `+ w, Z- C0 ]% g4 ^! W. tvar Memory = xdc.useModule('xdc.runtime.Memory');
0 N! `0 N8 R9 o3 NMemory.defaultHeapInstance = HeapMem.create(heapMemParams);
# d6 _& f& ]3 q" Y# ]7 E
9 E5 M7 j# a5 q9 n' ]: o$ s; G5 n) Q6 f7 c$ N- g' n
/* configure System module */
% y4 Z7 w( k6 R7 F! a& G4 z" }( svar SysMin = xdc.useModule('xdc.runtime.SysMin');
: a" j, {$ T- TSysMin.bufSize = 0x1000;4 p8 y; R1 @, U
SysMin.flushAtExit = false;! z1 K& z! A# ^0 ~
: o2 o! [0 x7 T$ L' ?% y, i
; q. b: X2 B+ y9 l2 `var System = xdc.useModule('xdc.runtime.System');; G$ J" b; g9 L. k9 ~
System.SupportProxy = SysMin;
$ q0 S* N. R( h& W, R, p! {
! G; G+ X, |) r. t4 F4 @5 Z+ N' t B* s
/* configure SysBios to use the lower half of Timer 1 */
! s) f- W* {. lvar Timer = xdc.useModule('ti.sysbios.timers.timer64.Timer');
2 ~8 h( T2 Q: ?- H7 Nvar Clock = xdc.useModule('ti.sysbios.knl.Clock');0 h6 o1 v/ S, a
Timer.timerSettings[1].master = true;" D# u' f! j/ l9 }; e
Timer.defaultHalf = Timer.Half_LOWER;8 k6 I6 [( e) j1 T) x- Z
Clock.timerId = 1;8 b C" G9 C( O$ K) g' P( L9 @
( F; ~4 h" B7 a3 ?, I g5 g
x: W0 e c& [3 y
9 P) T* ~; H8 T7 n. R6 R b
2 x3 j) M# H4 ^) c; m |
|