Cypress Perform

Home > Design Support > Cypress Developer CommunityTM > Cypress Forums > USB Controllers > How i can burn .img file to AT24C1024?

Bookmark and Share
Cypress Developer CommunityTM
Forums | Videos | Blogs | Training | Rewards Program | Community Components



How i can burn .img file to AT24C1024?
Moderator:
RSKV

Post Reply
Follow this topic



How i can burn .img file to AT24C1024?

mike g posted on 02 Jan 2012 5:37 AM PST
Member
10 Forum Posts

Follow question:

1.  Does .img file in FX3 like .hex file in FX2 only can download to ram not for eeprom? I can't burn my .img file to eeprom by "Program-> FX3->I2C E2PROM" menu.

2. If .img file in FX3 like .iic file in FX2 can download to eeprom, why my .img file format is different to i2c_boot_option.pdf's description?

    My .img file is obtained by "elf2img.exe" -i SlaveFifoSync.elf -o SlaveFifoSync.img -i2cconf 1C". 

    1C means Bit0 = 0: execution binary file; 1: Bit3:1 (I2C size) 6: 64KB (128K ATMEL), 01: 400KHz
    According to  i2c_boot_option.pdf, dAddress 0 is 1st sections address of Program Code not the I2C address, but my .img file's dAddress 0 is ELF( 7F 45 4C 46 ), it seems .elf file's header. Is it right .img file format for burning?

3. According to datasheet, AT24C1024 is no A0, A2, only A1 is avalible, am i right?

4. Another problem is the IIC protocol for atmel 24c1024 is different to others such as 24lc256, following device address, ack, 8bits address send then wait for ack, 24c1024 should 16bits MSB address send then wait for ack.  how can i deal this case? It seem i can't fullfill this function by calling CyU3PI2cTransmitBytes for writing or CyU3PI2cReceiveBytes reading.

 

Thanks

 

 

 

 

 

 

 




Re: How i can burn .img file to AT24C1024?

Bob Marlowe posted on 02 Jan 2012 07:00 AM PST
Top Contributor
1466 Forum Posts

When you look at your Atmel serial eeprom as just an ordinary peripheral you have to

1st: create interfaces to basicly read and write to your peripheral

2nd: create interface to populate peripheral with initial data. This is (I assume) your question how to do that.

 

To put ANY data into your peripheral that are not generated by your application you need another interface (UART, USB, I2C...) to communicate with additional hardware (a PC for instance) that holds the data and transfers it to your PSoC-application where it is handled by interface #2 to store data in peripheral.

 

You cannot "burn"/Program it as you program your PSoC, because it is not part of your PSoC, it is a peripheral.

As to the format of the data: feel free to use what you'd like. Since both interfaces are yours, you have the complete control.

Bob

 



Re: How i can burn .img file to AT24C1024?

Bob Marlowe posted on 02 Jan 2012 07:48 AM PST
Top Contributor
1466 Forum Posts

Oopsi, too fast. Thought it was a PSoC forum and overlooked the fx...

So my tips are nuts, sorry.

Bob

 



Re: How i can burn .img file to AT24C1024?

mike g posted on 02 Jan 2012 07:54 AM PST
Member
10 Forum Posts

Thanks Bob, but i don't know what you mean.

I want to have these functions:

1. I can burn .img data to AT24C1024, this EEPROM connect to FX3's I2C_SDA and I2C_SCL pin, and address is A1=0.  When i select "Program->FX3->I2C E2PROM",  i see CyBootProgrammer.img has download to FX3, i think this firmware's function can receive .img from pc and write to AT24C1024 by I2C bus. Just now, I setup Beta4 on my PC, i find another elf2img.exe(2011/12/9) on this Package. I haven't compared source code now, but i find the .img file created by this execution has changed even i have same elf file.  So i want to confirm which elf2img.exe should i use? I wonder why you said i can't burn my .img file to EEPROM?

 

2. Before I use AT24C1024, i have used AT24LC256. i writed and read 24LC256 by send command through PC successfully. I want to add these command to my firmware so i can update my firmware online. But now i meet problem with AT24C1024.

Othe question:

When i setup FX3SDK_Beta4( I haven't update arm_gcc, my current use B540 ), i found .img file size changed. It become more larger.  Why such simple code can create more than 128K bin file? Is there a way to reduce file size? later i will test ARM_GCC_B607.



Re: How i can burn .img file to AT24C1024?

aasi posted on 04 Jan 2012 09:54 AM PST
Cypress Employee
1073 Forum Posts

Please look at http://www.cypress.com/?app=forum&id=167&rID=57016 for background of the elf2img issue. Please use the fixed elf2img.c file.

With regards to AT24C1024 what exactly is the error behavior being seen?

Regards,

Anand



Re: How i can burn .img file to AT24C1024?

mike g posted on 04 Jan 2012 08:08 PM PST
Member
10 Forum Posts

Thanks aasi!

I have solved all my questions now. i can burn my .img files now. i use two 24c1024 and use my own kit to burn .img file because control center can not burn img file more than 128K bytes. Why limited?

Now i meet new question. after my .img file burned, why enumeration by system takes such long time about 12 second? is it normal?  Is it the time need for FX3 loading code from EEPROM before enumeration?

Best Regards!

 

 

 



Re: How i can burn .img file to AT24C1024?

mike g posted on 04 Jan 2012 08:56 PM PST
Member
10 Forum Posts

ok, speed seem ok when i change I2C speed to 1MHz, about 1~2 second. thanks!



Re: How i can burn .img file to AT24C1024?

aasi posted on 06 Jan 2012 03:50 AM PST
Cypress Employee
1073 Forum Posts

http://www.cypress.com/?app=forum&id=167&rID=55811 has the details on the 128K limitation on EEPROM write.






ALL CONTENT AND MATERIALS ON THIS SITE ARE PROVIDED "AS IS". CYPRESS SEMICONDUCTOR AND ITS RESPECTIVE SUPPLIERS MAKE NO REPRESENTATIONS ABOUT THE SUITABILITY OF THESE MATERIALS FOR ANY PURPOSE AND DISCLAIM ALL WARRANTIES AND CONDITIONS WITH REGARD TO THESE MATERIALS, INCLUDING BUT NOT LIMITED TO, ALL IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT OF ANY THIRD PARTY INTELLECTUAL PROPERTY RIGHT. NO LICENSE, EITHER EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, IS GRANTED BY CYPRESS SEMICONDUCTOR. USE OF THE INFORMATION ON THIS SITE MAY REQUIRE A LICENSE FROM A THIRD PARTY, OR A LICENSE FROM CYPRESS SEMICONDUCTOR.

Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms and Conditions of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms and Conditions of this site. Cypress Semiconductor and its suppliers reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.