I'm very new to embedded development and have practically no experience with SYSBIOS. Apologies if any of this sounds elementary.
I'm working on porting an audio loopback application that currently runs using Starterware code to use SYSBIOS. The Starterware based application runs as expected on an OMAP L138 EVM. As a first step in moving to SYSBIOS I started compiling this application using a SYSBIOS compatible build setup (cfg file, xdc tools, rtsc etc.) and I'm seeing issues even when SYSBIOS is not used. Stay with me, more details below.
1. Starterware application
This application configures the AIC3106, McASP and EDMA engines and is able to get audio to loopback on the system. The application is interrupt driven and all interrupts have been configured correctly and work as expected.
2. Move to SYSBIOS: check that everything builds when using the SYSBIOS build framework
As a first step I rebuilt the application using the build procedure required for sysbios applications but without any changes to the code i.e. SYSBIOS is not used. Effectively this meant re-compiling the application and using a cfg file that includes the modules shown below.
/*use modules*/
var Defaults = xdc.useModule('xdc.runtime.Defaults');
var Diags = xdc.useModule('xdc.runtime.Diags');
var Error = xdc.useModule('xdc.runtime.Error');
var Log = xdc.useModule('xdc.runtime.Log');
var LoggerBuf = xdc.useModule('xdc.runtime.LoggerBuf');
var Main = xdc.useModule('xdc.runtime.Main');
var Memory = xdc.useModule('xdc.runtime.Memory')
var SysMin = xdc.useModule('xdc.runtime.SysMin');
var System = xdc.useModule('xdc.runtime.System');
var Text = xdc.useModule('xdc.runtime.Text');
In this case, the code builds and runs as expected.
3. Move to SYSBIOS: add BIOS module to cfg file
The next step had just one change; I included the BIOS module in the cfg file as shown below.
/*use modules*/
var Defaults = xdc.useModule('xdc.runtime.Defaults');
var Diags = xdc.useModule('xdc.runtime.Diags');
var Error = xdc.useModule('xdc.runtime.Error');
var Log = xdc.useModule('xdc.runtime.Log');
var LoggerBuf = xdc.useModule('xdc.runtime.LoggerBuf');
var Main = xdc.useModule('xdc.runtime.Main');
var Memory = xdc.useModule('xdc.runtime.Memory')
var SysMin = xdc.useModule('xdc.runtime.SysMin');
var System = xdc.useModule('xdc.runtime.System');
var Text = xdc.useModule('xdc.runtime.Text');
var BIOS = xdc.useModule('ti.sysbios.BIOS');
Note that although I add this in the cfg file I do not use anything related to SYSBIOS in my application. It is the same Staterware based application as used in steps 1 & 2. However, this simple, seemingly innocuous change prevents audio from looping through the system. All the initialization code runs correctly. The clocks have been configured correctly and the interface between the ADC/DAC and the McASP is active. Interrupts are being received at the intervals expected but the only thing I hear at the output are pops and clicks...my vague suspicion is that something is out of sync or the locations being read from and written to are not what I think they are.
Things I've looked at so far:
- Clocks and interfaces have been configured correctly.
- EDMA interrupts are received from Tx and Rx channels, Tx and Rx buffer addresses are updated correctly.
- Audio interface shows active clocks and data.