Technical discussions about the TI C55x DSPs (including the c5501, c5502, c5503, c5507, c5509, c5510 and OMAP5910).
Hello, I have a very simple question that should be very easy to answer, but first I'd like to provide a bit of background on where I am coming from. Feel free to skip over this if you like. << Begin Background >> Although I have had three DSP classes none of these courses exposed me to any type of DSP embedded programming. I have never programmed a DSP chip before because all my time, to date, has been spent on theory (Z-transforms, basics on IIR & FIR filters, using MatLAB for design of filters and plotting, understanding differences of DFT and FFTs (as well as other computationally efficient transforms) and even a small bit on polyphase filters). I found all of this stuff absolutely fascinating, but I have no practical experience. In an effort to gain real experience I have decided to spend time learning how to use the TMS320VC5510 DSK evaluation board along with Code Composer (ver. 3.1.0). My background is very limited with regards to programming, however I have taken a few required classes in C programming as well as an assembly course (for the Motorola 6800 – a very old microprocessor from the 1970s). I should be reasonably functional to start. << End Background >> In Code Composer I found a way to operate the LED by writing directly to the CPLD on the Evaluation board (the CPLD is used for memory decoding as well as controlling the user input switches and LEDs). I did this from Code Composer by pressing View --> Memory... to bring up the Memory Windows Options dialog box then entering the address 0x300000 into the field that says address. After pressing OK another dialog box comes up showing memory values in HEX from address 0x300000 to 0x300250. From this window you can change the lower 4-bits of the 16-bit memory location to control the LEDs. Now, I would like to write a program to blink the LEDs (or control them in some way). I am not sure what would be the easiest way to do this. Any suggestions? Would anyone care to show how I could write to address 0x300000 using C in Code Composer? I don't know if this is a good idea or not, but I did consider writing a few lines of assembly within C code that would directly write to this address. I could do this by hacking into an existing C source code that can be compiled and run on the C5510 DSK. If this is a reasonable approach then I would need to know the command to write in-line assembly code in a C file. Joe
DSP, in my view, is 2 parts of the same game: theory and implementation. You have the theory, which is good. Now you are learning the implementation, which is just as challenging ( and fun! ) Here is an example of how I write to the CPLD register using C, for a 6713 DSK: *(unsigned volatile int *)DSK_CPLD = 0x00030010; With your c55 kit, there should be some header file like hw.h, where the addresss of the CPLD is defined. For a 6713 DSK I have, it is defined as 0x90080004. It will likely be different for the C55. For the C55, I also write to some internal registers like this: *(ioport volatile unsigned int *)DXR1_1 = 0x0000; All of this can be done in assembly as well. The inline assembly command is asm( "instruction" ). But you could find this in the C55 manuals that are located at www.ti.com. I encourage you to find these manuals, and use them as reference. Regards, Robert www.greatlakessignalprocessing.com -----Original Message----- From: c...@yahoogroups.com [mailto:c...@yahoogroups.com] On Behalf Of j...@yahoo.com Sent: Saturday, September 02, 2006 11:56 PM To: c...@yahoogroups.com Subject: [c55x] Example Program for TMS320VC5510 DSK - controlling LED Hello, I have a very simple question that should be very easy to answer, but first I'd like to provide a bit of background on where I am coming from. Feel free to skip over this if you like. << Begin Background >> Although I have had three DSP classes none of these courses exposed me to any type of DSP embedded programming. I have never programmed a DSP chip before because all my time, to date, has been spent on theory (Z-transforms, basics on IIR & FIR filters, using MatLAB for design of filters and plotting, understanding differences of DFT and FFTs (as well as other computationally efficient transforms) and even a small bit on polyphase filters). I found all of this stuff absolutely fascinating, but I have no practical experience. In an effort to gain real experience I have decided to spend time learning how to use the TMS320VC5510 DSK evaluation board along with Code Composer (ver. 3.1.0). My background is very limited with regards to programming, however I have taken a few required classes in C programming as well as an assembly course (for the Motorola 6800 - a very old microprocessor from the 1970s). I should be reasonably functional to start. << End Background >> In Code Composer I found a way to operate the LED by writing directly to the CPLD on the Evaluation board (the CPLD is used for memory decoding as well as controlling the user input switches and LEDs). I did this from Code Composer by pressing View --> Memory... to bring up the Memory Windows Options dialog box then entering the address 0x300000 into the field that says address. After pressing OK another dialog box comes up showing memory values in HEX from address 0x300000 to 0x300250. From this window you can change the lower 4-bits of the 16-bit memory location to control the LEDs. Now, I would like to write a program to blink the LEDs (or control them in some way). I am not sure what would be the easiest way to do this. Any suggestions? Would anyone care to show how I could write to address 0x300000 using C in Code Composer? I don't know if this is a good idea or not, but I did consider writing a few lines of assembly within C code that would directly write to this address. I could do this by hacking into an existing C source code that can be compiled and run on the C5510 DSK. If this is a reasonable approach then I would need to know the command to write in-line assembly code in a C file. Joe