Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Problems about programming the TMS320C31 DSP through MPSD

Status
Not open for further replies.

Kynix

Banned
Joined
Jun 27, 2016
Messages
24
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
0
I use code composer to program the TMS320C31 DSP (through MPSD) to write to the SST39SF010A flash. I can successfully write one byte to any location of the flash by following the "Chip Erase" then "Byte-Program Algorithm" sequences mentioned in TMS320C31 datasheet.

The problem is when I want to write more than one byte in different locations, only the first byte is written and the rest aren't. I added delays between writes but no difference.

What is the cause of this problem? I searched for drivers (Programming algorithms) for this flash but couldn't find!

First:
This is the code we wrote to program the flash:
Code:
void main()  {

volatile unsigned int * start_flash = (volatile unsigned int *)0x00001000;   
      volatile unsigned int * end_flash = (volatile unsigned int *)0x0001ffff;

      volatile unsigned char * flash_addr1 = (volatile unsigned char *)0x005555;    
      volatile unsigned char * flash_addr2 = (volatile unsigned char *)0x002aaa;
      volatile unsigned char * flash_addr3 = (volatile unsigned char *)0x005555; 
      volatile unsigned char * flash_addr4 = (volatile unsigned char *)0x010000;

      volatile unsigned int x = 0;     

          // Chip Erase

        * flash_addr1 = 0xaa;    
        * flash_addr2 = 0x55;      
        * flash_addr1 = 0x80;    
        * flash_addr1 = 0xaa;
        * flash_addr2 = 0x55;
        * flash_addr1 = 0x10; 

        // Delay
        for(x=0;x<=100000;x++);          

        // Byte Program

        * flash_addr1 = 0xaa;    
        * flash_addr2 = 0x55;
        * flash_addr3 = 0xa0;  

        // Data in the first address

        * (start_flash) = 0xba;

        for(x=0;x<=100000;x++); 

       // Data in the following address

        * (start_flash+1) = 0xab;

        while(1);
  }

"BA" is written correctly in the first address but "AB" isn't.

Second:
We are using an FPGA in the system between the DSP and the Flash (and all other system peripherals). Data and Address of DSP is bypassed through the FPGA to the Flash, and control signals are generated from the FPGA. I think there is no problem in generating the control signals since we are able to write one byte successfully, is that correct?
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top