Is there a reason that all the 21469 example projects are in C ?
I'm porting an assembly project from 21369 to 21469 and can't get the sport initialized properly.
please find attached a couple of simple SPORT examples - one core-driven and one DMA-driven - that run on the ADSP-21469 EZ-Board. I used the VisualDSP++ update 6 tools currently available on the web. You might find it necessary to use the attached def21469.h file (save it in your \include folder after saving the default one). This file is going to part of the coming Update 7 release and contains a few minor corrections over the previous version. If you have any specific questions about the examples for me, please feel free to either respond to this thread, or you're welcome to send me a separate email as well.
Hope this helps. Best wishes,
Thanks for your question. No particular reason, except that a lot of customers these days seem to develop their applications (and prefer) high level languages like C. It also makes sense for porting code and applications across processors. That being said, there is a link port example that is written in Assembly. If you let me know what you're looking for in a specific example (eg., core-driven versus DMA) I'll be happy to put one together and attach it to this thread.
Thank you Ramdas. I'd appreciate the example code.
So far I've used core-driven I/O, but if you provide both examples it could serve more developers.
Thanks for the code, unfortunately, building it fails on the linker: seg_rth is supposedly missing space for the vector code. As no LDF file is included in the project it uses a default in which the seg_rth is defined and large enough.
Also, I was really looking for code demonstrating the use of the SPORT for the AD1939, as the C examples do.
The tools appear to use the ADSP-21469.ldf as the default linker description file, while they *should* instead be using ADSP-21469_ASM.ldf. Try including this linker file in your project. This ought to fix the problem. I'll follow up on why that's happening internally.
As for code specifically using the AD1939, I'll provide you an update shortly.
Linking against the "ADSP-21469.LDF" file is expected behaviour. If no LDF has been added to the project, the tools will use the default LDF file specified for that platform. In the case of the 21469, that is the ADSP-21469.LDF file. The other LDF files in the "...\214xx\ldf\" directory are provided as temples for inclusion in an application, either by copying the LDF into the project manually, or by adding the LDF via 'Tools'->'Expert Linker'->'Create LDF'. The latter approach, using the wizard, allows you to specify whether your application is ASM, C, C++, and will add a copy of the appropriate LDF to your project.
Ok, got the project running.
In the meanwhile, I've transcoded all the initialization routines of the C talkthru example project from C to assembly by configuring the appropriate registers, for instance:
/* Clear out SPORT 0/1 registers */ //*pSPMCTL0 = 0; // original C code //*pSPMCTL1 = 0; //*pSPCTL0 = 0; //*pSPCTL1 = 0; r0 = 0; // transcoded dm(SPMCTL0) = r0; dm(SPMCTL1) = r0; dm(SPCTL0) = r0; dm(SPCTL1) = r0;
Where the example code says:
I've translated to:
bit set IMASK SP1I;
and provided an ISR at 0x38, but that doesn't get called. From what I understand is that the ISR should be called on cmpletion of the SPORT1 DMA, but I've yet to see that happen.
Are you enabling global interrupts?
bit set mode1 IRPTEN; // Enable interrupts in mode1
Hey, I got it working. If anyone needs the code to do this let me know.
The error was in anomalous SRU connections. Apparently the SRU_DEBUG flag doesn't check for double connections.
Got some other issues but I'll post those in a different thread.
Thanks for posting the info i had the same porting problem...
Retrieving data ...