Quantcast
Channel: Processors forum - Recent Threads
Viewing all articles
Browse latest Browse all 17527

Running Timers in SYSBIOS omapl137

$
0
0

I have the rCSL timer code up and running with timer 0 and timer 1. I modified a copy of the code to timer 1 as I'm under the impression SYSBIOS uses timer 0 by default, although if it is not, I'm setting the clock module to use timer 0.

Now I'm trying to use the rCSL to control the timers but from SYSBIOS.

I have taken the following steps:

0- new project, sysbios typical

1- copy all necessary source code to the rtsc project

2- use the app.cfg to map the event id with interrupts 4-7 with 4 hwi

3- copy the core of the example into a task

4- changed while(runExample); for a sempaphore

5- added a counter on timer34 which is the one toggling the GPIO led

Commenting out #4 (using while(runExample);)

I get the following error:

ti.sysbios.gates.GateMutex: line 99: assertion failure: A_badContext: bad calling context. See GateMutex API doc for details.
xdc.runtime.Error.raise: terminating execution

I can put breakpoints on all ISR (the timer interrupts and the compare interrupts) and the code halts accordingly. 

counter on timer34 isr gets stuck at 1. which means I get into the ISR but it is only triggered once. I double checked that TCR_ENAMODE34 is set to EN_CONT.

If I implement a semaphore instead of while()

00
B16=0x0 B17=0x0
B18=0xc00170b6 B19=0xc0017a98
B20=0xc000b7fc B21=0x0
B22=0xf B23=0x0
B24=0x0 B25=0xc0015468
B26=0x0 B27=0xc0015468
B28=0xffffffff B29=0xffffffff
B30=0xfffffff7 B31=0x0
NTSR=0x1000f
ITSR=0xf
IRP=0xfffffff6
SSR=0x0
AMR=0xc0015440
RILC=0xc0000850
ILC=0xc000ad50
Exception at 0xc0017bc0
EFR=0x2 NRP=0xc0017bc0
Internal exception: IERR=0x8
Opcode exception
ti.sysbios.family.c64p.Exception: line 256: E_exceptionMax: pc = 0x00000000, sp = 0xc0015500.
xdc.runtime.Error.raise: terminating execution

counter on timer34 isr gets stuck at 1

Additional Notes:

I created a new platform that adds timer1 to the platform address since I recall having issues accessing peripherals in the past. (Just to be safe)

Any ideas or suggestion of things I can try?


Viewing all articles
Browse latest Browse all 17527

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>