Dear all, I am using customised hardware having C31. I had written a very small routine in assembly and I wanted to download and execute it from RAM0 (Internal RAM) of DSP. But it doesn't allow me to write it to location zero, that is RESET Vector Location, where I am putting the starting address of my routine. I had put DSP in Microprocessor mode (that is MCBL/MP\ = 0). When I try to run program counter stick to location 0x0000FF, but when I see the location of RAM0 I am able to found the code which I had written in test.asm. If I put DSP in Microcomputer/Boot-loader mode then also it gives me the same error and program counter stick to location 0x000045 (I think it is waiting for an interrupt). My board is having an external RAM & ROM but none of this is mapped to location 0x000000. It is also not mapped to any of boot location if, in case, I want to use it in MCBL/MP\=1 Mode. (Is there any way to change this internal boot location?). If not, then how can I boot my C31...? My routine is...(test.asm) ********************** .sect "vector" .BR int00 .text int00 LDI 1,R1 LDI 2,R2 ADDI R1,R2 .end ********************** Command file contains..... vector: > VEC /* memory 00 to 3E */ .text: > RAM0 /* Internal RAM block 0 */ Please guide me. I will highly appreciate your reply on this. Thanks in advance. Kalpesh Chauhan Sr. Engineer, R&D Hi-Rel Electronics Ltd. B-116/117, GIDC Electronics Zone Sector - 25, Gandhinagar. (Gujarat) INDIA. E-mail : Phone - +91 (0)79 3221636 - +91 (0)79 3222531 Fax - +91 (0)79 3226498 -------------------------- Hirel Electronics Ltd, Gandhinagar, India |
|
C31 Booting Problem
Started by ●December 20, 2001
Reply by ●December 20, 20012001-12-20
Hello Kalpesh Most people just leave the boot ROM enabled and give up the extra 4 cycles to each interrupt as overhead. Never the less, as you have surmised, you will need a few modifications to remove this limitation. Here is some background and what can do about it. 1) The 'bootloader' is nothing more than a small internal ROM that occupies the first 4K of memory when the MCBL/MP pin is set high. The program that runs in this ROM can be found in the C3xxx users guide. Since you cant directly write to locations 0x000000-0x001FFF since this is a ROM, your strategy needs to be modified. If you think about it, you probably do not have all of the address lines connected to the SRAM or decoded into the SRAM enable (if you do disable one). What this will do is create multiple images of the SRAM in external memory. However, as the C31 bootloader does decode all 24 address lines, the first 4K locations in the first alias are unavailable because this contains the bootloader code. But you can get to them in the 2,3,4... aliases. Here is what I would do... - Link your code, data and even the vectors to the 2,3,4... alias of memory. All addresses are now resolved as 24 bits but if you think about it, the DSP does not care... The vectors also work as they are absolute 24 bit addresses with the MBS's again being a dont care - After the bootload is complete, set MCBL/MP=0 while the DSP is *NOT JUMPING BETWEEN INTERNAL AND EXTERNAL MEMORY*. This is neccessary since this is a pipelined DSP and you dont want to be screwing with the opcodes as they go into the DSP. As far as I know, flipping the MCBL/MP bit while you are executing from external code (in an alias page) wont be a problem, but if it is, write a small stub of code to run in the internal RAM and do it there. Additional boot information: - Dont bootload anything to 0x809800 or 0x809801. The bootloader has function CALL's within it and needs a small stack space and guess where that is! Hope this helps, Keith Larson TMS320C3x/C4x/VC33 Applications TMS320VC33 The lowest cost and lowest power 500 uw/mflop floating point DSP on the planet! -------------- At 10:13 AM 12/20/01 +0530, you wrote: >Dear all, > >I am using customised hardware having C31. I had written a very small routine in >assembly and I wanted to download and execute it from RAM0 (Internal RAM) of >DSP. But it doesn't allow me to write it to location zero, that is RESET Vector >Location, where I am putting the starting address of my routine. I had put DSP >in Microprocessor mode (that is MCBL/MP\ = 0). When I try to run program counter >stick to location 0x0000FF, but when I see the location of RAM0 I am able to >found the code which I had written in test.asm. If I put DSP in >Microcomputer/Boot-loader mode then also it gives me the same error and program >counter stick to location 0x000045 (I think it is waiting for an interrupt). > >My board is having an external RAM & ROM but none of this is mapped to location >0x000000. It is also not mapped to any of boot location if, in case, I want to >use it in MCBL/MP\=1 Mode. (Is there any way to change this internal boot >location?). If not, then how can I boot my C31...? > >My routine is...(test.asm) >********************** > .sect "vector" > .BR int00 > > .text >int00 LDI 1,R1 > LDI 2,R2 > ADDI R1,R2 > .end >********************** >Command file contains..... > vector: > VEC /* memory 00 to 3E */ > .text: > RAM0 /* Internal RAM block 0 */ > >Please guide me. I will highly appreciate your reply on this. > >Thanks in advance. > >Kalpesh Chauhan >Sr. Engineer, R&D >Hi-Rel Electronics Ltd. >B-116/117, GIDC Electronics Zone >Sector - 25, Gandhinagar. >(Gujarat) INDIA. >E-mail : >Phone - +91 (0)79 3221636 > - +91 (0)79 3222531 >Fax - +91 (0)79 3226498 |