Technical discussions related to Analog Devices DSPs (including Blackfin, TigerSHARC, SHARC and ADSP-21xx DSPs).
|
_______________________________ |
|
From:
madhavi b <> Date: Thu Aug 12, 2004 7:54 am Subject: ADSP2191:flash access To: |
|
Hello, I am trying to write external flash AT29c040A at runtime which connected to boot memory space of ADSP2191 with [data(0-7) and Addrress(0-18) lines, BMS as chip select]. To access adress 0x00000 of flash memory, I am accessing on ADSP2191 as DMPG1 = 0x04; I1 = 0x0000; m2=0;.. EMI settings are IOPG = Clock_and_System_Control_Page; ax0 = 0x0052; IO(PLLCTL) = ax0; IOPG = External_Memory_Interface_Page ; ax0 = 0x0070; IO(EMICTL) = AX0; ax0 =0xDFF; io(BMSCTL) = ax0; IOPG = External_Access_Bridge_Page ; ax0 = 0x0004 ; //for dm data format IO(E_STAT) = AX0; onadsp For Programming Atmel, I have to write sequence ofcode to ADSP.. 1) to load data 0xAAH into address 05555H corresponding my code is.. DMPG1 = 0x04; I1 = 0x2AAA; M1 = 0; L1 =0; //DATA 0xAA00 INTO ADDRSS 05555 AR = 0XAA00; DM(I1,M1) =AR; 2)to load data 0x55H into address 0x2AAA DMPG1 = 0x04; //FWR_ADDR2== 0x1555 = 2AAA/2; on flash address is 0x2AAA = divide by 2 on adsp is 1555 I2 = 0x1555; M2 = 0; L2 =0; //DATA 0x5500 INTO ADDRSS 02AAA AR = 0X0055; DM(I2,M2) =AR; 3) load data 0xa0 into 0x05555 for this I am loading 0xA000 at DM(I1,m1). 4) load sector. 256 bytes i am writing to DM. 5) pause write cycle time(10ms). (here i am pausing for 10ms /more.. Processor adsp2191 has 160 MHz core and 80 MHz peripheral clock. During write access, on checking ( with oscilloscope) the pins WR, RD, address lines ,.. all are in there respective active state. Any help/suggestions in this regard..? Thanks in advance. Madhavi __________________________________ |
|
|
|
Hi, What was the problem you encountered? sorry, i did not understand ur question properly. please clarify your question, so some one can help you. (i don't know the 2191 architecture) > 1) to load data 0xAAH into address 05555H > corresponding my code is.. > DMPG1 = 0x04; > I1 = 0x2AAA; > M1 = 0; > L1 =0; > //DATA 0xAA00 INTO ADDRSS 05555 > AR = 0XAA00; > DM(I1,M1) =AR; Why you changed 0xaaH to 0xaa00H? Is the upper 8 bit of the processor data bus is connected to the flash device? regards ajith --- In , madhavi b <madhavigb@y...> wrote: > _______________________________ > > I am trying to write external flash AT29c040A at > runtime which connected to boot memory space of > ADSP2191 with [data(0-7) and Addrress(0-18) lines, > BMS as chip select]. > > To access adress 0x00000 of flash memory, > I am accessing on ADSP2191 as DMPG1 = 0x04; I1 > = 0x0000; m2=0;.. > > EMI settings are > IOPG = Clock_and_System_Control_Page; > ax0 = 0x0052; > IO(PLLCTL) = ax0; > > IOPG = External_Memory_Interface_Page ; > ax0 = 0x0070; > IO(EMICTL) = AX0; > > ax0 =0xDFF; > io(BMSCTL) = ax0; > > IOPG = External_Access_Bridge_Page ; > ax0 = 0x0004 ; //for dm data format > IO(E_STAT) = AX0; > > onadsp > For Programming Atmel, I have to write sequence ofcode > to ADSP.. > 1) to load data 0xAAH into address 05555H > corresponding my code is.. > DMPG1 = 0x04; > I1 = 0x2AAA; > M1 = 0; > L1 =0; > //DATA 0xAA00 INTO ADDRSS 05555 > AR = 0XAA00; > DM(I1,M1) =AR; > 2)to load data 0x55H into address 0x2AAA > DMPG1 = 0x04; > //FWR_ADDR2== 0x1555 = 2AAA/2; on flash address is > 0x2AAA = divide by 2 on adsp is 1555 > I2 = 0x1555; > M2 = 0; > L2 =0; //DATA 0x5500 INTO ADDRSS 02AAA AR > = 0X0055; > DM(I2,M2) =AR; > > 3) load data 0xa0 into 0x05555 for this I am loading > 0xA000 at DM(I1,m1). > 4) load sector. 256 bytes i am writing to DM. > 5) pause write cycle time(10ms). (here i am pausing > for 10ms /more.. > > Processor adsp2191 has 160 MHz core and 80 MHz > peripheral clock. > > During write access, on checking ( with oscilloscope) > the pins WR, RD, address lines ,.. all are in there > respective active state. > Any help/suggestions in this regard..? > Thanks in advance. > Madhavi > > __________________________________ |
|
|
|
Hello, I am not able to write to the flash which connected to boot memory space of ADSP2191 with data(0-7) and Addrress(0-18) lines, BMS as chip select, nWR, nRD. during runtime with the EMI settings I have given. According to my understanding, Data alignment through the external port depends on whether the system uses an 8- or 16-bit data bus.data alignment in external memory that varies with the external data format/size (16- or 24-bit) and the bus width (8- or 16-bit).For this the DSP supports logical addressing for programs and physical addressing for connecting devices to connect to external devices. Physical Address = Format Factor address multiplier x Size Factor addr multiplier x Logical Address In my case I am using 16-bit Format, 16-bit Data, and 8-bit External Bus, so Format Factor address multiplier is = 1 Size Factor address multiplier is = 2 In the Hardware reference manual of ADSP2191, For Example if one is using 16-bit Format, 16-bit Data, and 8-bit External Bus then adressing used is like this (wrt to hardware manual of 2191 for External port) Logical 16-Bit Physical 16-Bit address Data Word Address Data Word 0x20000 0x1234 0x40000 0x34 0x40001 0x12 0x20001 0x5678 0x40002 0x78 0x40003 0x56 In my case , Address lines (0-18) are connected to flash AT29c040A. so physical address is 80000H is mapped to 00000H of flash memory, therefore logical address calculated is 40000H. To write control word A0H at address 05555H,I am writing as.. DMPG1 = 0x04; // 2AAAH = 05555H/2 // 2AAA X 2 = 5554H //LSB OF 0XAA00 transfer to 0x5554H //and MSB 0xAAH will transfer to 0x5555H I1= 2AAAH; M1 = 1; AR = 0XAA00; DM(I1,m1)= AR; With this, My problem is ,whether understanding is wrong in the technique of addressing or there is some problem is my EMI port settings or anyting else.. ,to write to flash memory. Suggestions are welcome. Thanks in advance. Madhavi --- ajith_pc <> wrote: > Hi, > > What was the problem you encountered? sorry, i did > not understand ur > question properly. please clarify your question, so > some one can help > you. (i don't know the 2191 architecture) > > > 1) to load data 0xAAH into address 05555H > > corresponding my code is.. > > DMPG1 = 0x04; > > I1 = 0x2AAA; > > M1 = 0; > > L1 =0; > > //DATA 0xAA00 INTO ADDRSS 05555 > > > AR = 0XAA00; > > DM(I1,M1) =AR; > > Why you changed 0xaaH to 0xaa00H? Is the upper 8 bit > of the processor > data bus is connected to the flash device? > > regards > ajith > --- In , madhavi b > <madhavigb@y...> wrote: > > > > > > > > > > > > _______________________________ > > > > Hello, > > I am trying to write external flash AT29c040A at > > runtime which connected to boot memory space of > > ADSP2191 with [data(0-7) and Addrress(0-18) > lines, > > BMS as chip select]. > > > > To access adress 0x00000 of flash memory, > > I am accessing on ADSP2191 as DMPG1 = 0x04; > I1 > > = 0x0000; m2=0;.. > > > > EMI settings are > > IOPG = Clock_and_System_Control_Page; > > ax0 = 0x0052; > > IO(PLLCTL) = ax0; > > > > IOPG = External_Memory_Interface_Page ; > > ax0 = 0x0070; > > IO(EMICTL) = AX0; > > > > ax0 =0xDFF; > > io(BMSCTL) = ax0; > > > > IOPG = External_Access_Bridge_Page ; > > ax0 = 0x0004 ; //for dm data format > > IO(E_STAT) = AX0; > > > > onadsp > > For Programming Atmel, I have to write sequence > ofcode > > to ADSP.. > > 1) to load data 0xAAH into address 05555H > > corresponding my code is.. > > DMPG1 = 0x04; > > I1 = 0x2AAA; > > M1 = 0; > > L1 =0; > > //DATA 0xAA00 INTO ADDRSS 05555 > > > AR = 0XAA00; > > DM(I1,M1) =AR; > > 2)to load data 0x55H into address 0x2AAA > > DMPG1 = 0x04; > > //FWR_ADDR2== 0x1555 = 2AAA/2; on flash address > is > > 0x2AAA = divide by 2 on adsp is 1555 > > I2 = 0x1555; > > M2 = 0; > > L2 =0; //DATA 0x5500 INTO ADDRSS 02AAA > AR > > = 0X0055; > > DM(I2,M2) =AR; > > > > 3) load data 0xa0 into 0x05555 for this I am > loading > > 0xA000 at DM(I1,m1). > > 4) load sector. 256 bytes i am writing to DM. > > 5) pause write cycle time(10ms). (here i am > pausing > > for 10ms /more.. > > > > Processor adsp2191 has 160 MHz core and 80 MHz > > peripheral clock. > > > > During write access, on checking ( with > oscilloscope) > > the pins WR, RD, address lines ,.. all are in > there > > respective active state. > > > > > > Any help/suggestions in this regard..? > > > > > > Thanks in advance. > > Madhavi > > > > > > > > __________________________________ > > > > _____________________________________ > /groups.php3 > > Yahoo! Groups Links __________________________________ |
|
|
|
Hi, Sorry i don't know 2191 archetecture. My understanding is that while placing a 0xaa00H in 16bit data bus, the 0xaaH goes to upper 8 bit. u informed that data lines (0-7) is connected to the flash. so the flash gets 0x00H. pls check the memory addressing of the processor again and confirm your addressing logic. Note also that AT29c040A is a 8 bit flash. regards ajith --- madhavi b <> wrote: > Hello, > > I am not able to write to the flash which connected > to boot memory space of > ADSP2191 with data(0-7) and Addrress(0-18) lines, > BMS > as chip select, nWR, nRD. > during runtime with the EMI settings I have given. > > According to my understanding, > Data alignment through the external port depends on > whether the system > uses an 8- or 16-bit data bus.data alignment in > external > memory that varies with the external data > format/size > (16- or 24-bit) and the bus width (8- or 16-bit).For > this the DSP supports logical > addressing for programs and physical addressing for > connecting devices to connect to > > external devices. > Physical Address = Format Factor address multiplier > x > Size Factor addr multiplier > > x Logical Address > In my case I am using 16-bit Format, 16-bit Data, > and > 8-bit External Bus, so > Format Factor address multiplier is = 1 > Size Factor address multiplier is = 2 > In the Hardware reference manual of ADSP2191, > > For Example > if one is using 16-bit Format, 16-bit Data, and > 8-bit > External Bus then adressing used is like this (wrt > to hardware manual of 2191 for External port) > > Logical 16-Bit Physical 16-Bit > address Data Word Address Data Word > > 0x20000 0x1234 0x40000 0x34 > 0x40001 0x12 > > 0x20001 0x5678 0x40002 0x78 > 0x40003 0x56 > > In my case , > Address lines (0-18) are connected to flash > AT29c040A. > so physical address is 80000H is mapped to 00000H of > flash memory, > therefore logical address calculated is 40000H. > To write control word A0H at address 05555H,I am > writing as.. > DMPG1 = 0x04; > // 2AAAH = 05555H/2 > // 2AAA X 2 = 5554H > //LSB OF 0XAA00 transfer to 0x5554H > > //and MSB 0xAAH will transfer to 0x5555H > I1= 2AAAH; > M1 = 1; > AR = 0XAA00; > DM(I1,m1)= AR; > With this, My problem is ,whether understanding > is > wrong in the technique of addressing or there is > some problem is my EMI port settings or anyting > else.. > ,to write to flash memory. > > Suggestions are welcome. > Thanks in advance. > Madhavi > > --- ajith_pc <> wrote: > > > Hi, > > > > What was the problem you encountered? sorry, i did > > not understand ur > > question properly. please clarify your question, > so > > some one can help > > you. (i don't know the 2191 architecture) > > > > > 1) to load data 0xAAH into address 05555H > > > corresponding my code is.. > > > DMPG1 = 0x04; > > > I1 = 0x2AAA; > > > M1 = 0; > > > L1 =0; > > > //DATA 0xAA00 INTO ADDRSS 05555 > > > > > > AR = 0XAA00; > > > DM(I1,M1) =AR; > > > > Why you changed 0xaaH to 0xaa00H? Is the upper 8 > bit > > of the processor > > data bus is connected to the flash device? > > > > regards > > ajith > > > > > > > > > > > > --- In , madhavi b > > <madhavigb@y...> wrote: > > > > > > > > > > > > > > > > > > _______________________________ > > > > > > http://messenger.yahoo.com > > > Hello, > > > I am trying to write external flash AT29c040A > at > > > runtime which connected to boot memory space of > > > ADSP2191 with [data(0-7) and Addrress(0-18) > > lines, > > > BMS as chip select]. > > > > > > To access adress 0x00000 of flash memory, > > > I am accessing on ADSP2191 as DMPG1 = 0x04; > > I1 > > > = 0x0000; m2=0;.. > > > > > > EMI settings are > > > IOPG = Clock_and_System_Control_Page; > > > ax0 = 0x0052; > > > IO(PLLCTL) = ax0; > > > > > > IOPG = External_Memory_Interface_Page ; > > > > ax0 = 0x0070; > > > IO(EMICTL) = AX0; > > > > > > ax0 =0xDFF; > > > io(BMSCTL) = ax0; > > > > > > IOPG = External_Access_Bridge_Page ; > > > ax0 = 0x0004 ; //for dm data format > > > IO(E_STAT) = AX0; > > > > > > onadsp > > > For Programming Atmel, I have to write sequence > > ofcode > > > to ADSP.. > > > 1) to load data 0xAAH into address 05555H > > > corresponding my code is.. > > > DMPG1 = 0x04; > > > I1 = 0x2AAA; > > > M1 = 0; > > > L1 =0; > > > //DATA 0xAA00 INTO ADDRSS 05555 > > > > > > AR = 0XAA00; > > > DM(I1,M1) =AR; > > > 2)to load data 0x55H into address 0x2AAA > > > DMPG1 = 0x04; > > > //FWR_ADDR2== 0x1555 = 2AAA/2; on flash > address > > is > > > 0x2AAA = divide by 2 on adsp is 1555 > > > I2 = 0x1555; > > > M2 = 0; > > > L2 =0; //DATA 0x5500 INTO ADDRSS 02AAA > > > AR > > > = 0X0055; > > > DM(I2,M2) =AR; > > > > === message truncated === __________________________________ |
|
|
|
Are you using an EZ-Lite board? It has BMS~ and MS0~ chip selects mapped to the flash if I recall correctly. Even if you aren't using the Ez-lite board, you might want to check out the flash programmer driver for the EZ-lite. It can be found here...... ..\Analog Devices\VisualDSP 3.5 16-Bit\219x\Flash Programmer Drivers\ADSP-2191 EZ-Kit Lite Also, the physical address is what you'll actually see on the address lines. The logical address is what your code uses in the dsp. So if you had an 8 bit external bus and were looking at say the base of page 3, the address bus would put out 0x060000 (22 bit address bus). This is because it takes an extra address to get the data out of a byte memory as opposed to a word wide memory. If you had a word wide bus you would of had a physical address of 0x030000. Example (16 bit transfer over 8 bit wide bus) Data word = 0xAA55 Logical Address Physical Address DATA 0x03 0000 0x06 0000 0x55 0x06 0001 0xaa Regards, Tim Dahlin > --- madhavi b <madhavigb@y...> wrote: > > > Hello, > > > > I am not able to write to the flash which connected > > to boot memory space of > > ADSP2191 with data(0-7) and Addrress(0-18) lines, > > BMS > > as chip select, nWR, nRD. > > during runtime with the EMI settings I have given. > > > > According to my understanding, > > Data alignment through the external port depends on > > whether the system > > uses an 8- or 16-bit data bus.data alignment in > > external > > memory that varies with the external data > > format/size > > (16- or 24-bit) and the bus width (8- or 16-bit).For > > this the DSP supports logical > > addressing for programs and physical addressing for > > connecting devices to connect to > > > > external devices. > > Physical Address = Format Factor address multiplier > > x > > Size Factor addr multiplier > > > > x Logical Address > > In my case I am using 16-bit Format, 16-bit Data, > > and > > 8-bit External Bus, so > > Format Factor address multiplier is = 1 > > Size Factor address multiplier is = 2 > > > > > > In the Hardware reference manual of ADSP2191, > > > > For Example > > if one is using 16-bit Format, 16-bit Data, and > > 8-bit > > External Bus then adressing used is like this (wrt > > to hardware manual of 2191 for External port) > > > > Logical 16-Bit Physical 16-Bit > > address Data Word Address Data Word > > > > 0x20000 0x1234 0x40000 0x34 > > 0x40001 0x12 > > > > 0x20001 0x5678 0x40002 0x78 > > 0x40003 0x56 > > > > > > > > In my case , > > Address lines (0-18) are connected to flash > > AT29c040A. > > so physical address is 80000H is mapped to 00000H of > > flash memory, > > therefore logical address calculated is 40000H. > > > > > > To write control word A0H at address 05555H,I am > > writing as.. > > DMPG1 = 0x04; > > // 2AAAH = 05555H/2 > > // 2AAA X 2 = 5554H > > //LSB OF 0XAA00 transfer to 0x5554H > > > > //and MSB 0xAAH will transfer to 0x5555H > > I1= 2AAAH; > > M1 = 1; > > AR = 0XAA00; > > DM(I1,m1)= AR; > > > > > > > > > > > > With this, My problem is ,whether understanding > > is > > wrong in the technique of addressing or there is > > some problem is my EMI port settings or anyting > > else.. > > ,to write to flash memory. > > > > Suggestions are welcome. > > Thanks in advance. > > Madhavi |