Hello,
I have been trying to port the StarterWare spi edma examples for the omapl138 to the omapl137 and into sysbios. I have been taking very small gradual steps to isolate issues and ease the migration. I currently have running and working: spi edma on both the arm and the dsp without sysbios. I also was able to succesfully port the spi edma for the dsp into sysbios. The peripheral control is exactly as the starterware example but the interrupts are handle by sys bios. It was fairly simple to add the hwi and tied them to the correct event for edmacc and edmaerr (11 and 12 respectively).
Getting the spi edma w/o sysbios on the arm was sort of a struggle but I managed to figure out my issues and it works without sysbios. (thanks to the forums) Maybe there is something fundamental on the arm side of the omapl137 that I'm missing. Oh well..... here is where I'm stuck on the sysbios side trying to port spi edma example.
I copied over all variables, functions etc., and I'm running the core of the example in the task that gets created by the default sys/bios typical example:
most of the example seems to be working correctly. I can break inside edma3cc isr, the spi is triggering the edma interrupt.
The error, to my humble opinion, is a caching or memory issue.
Inside the WriteEnable function there is a call to check if, in fact, Write is Enabled.
/* Reading the Status Register of SPI Flash. */
temp = FlashStatusRead();
readFlash[1] is suppose to be 0x02.
The strange part is that the location in memory has the expected value:
if I use the memory browser and go to
but the return value is = 0x00.
THe only other change I did to get this going was:
add the peripherals to the MMU like this, in the app.cfg
/*
* Map the peripheral space. Peripheral space is not cached.
*/
var attrs = {
type: Mmu.FirstLevelDesc_SECTION, // SECTION descriptor
bufferable: false, // bufferable
cacheable: false, // cacheable
};
for (var i= 0x01C00000; i < 0x01F12000; i = i + 0x100000) {
Mmu.setFirstLevelDescMeta(i, i, attrs);
}
and created a custom platform where all the code ends up in SHRAM.
Any suggestion will be appreciated.