Welcome Guest,Register Now
Log In

ANT Forum

Welcome guest, please Login or Register

You are here: Forum Home → ANT+ Forums → ANT-FS → Thread

   

Problem when open file created in EEPROM

Rank

Total Posts: 4

Joined 0

PM

Hello,

I use a MCU AT90CAN128 connected to a module ANT C7. An EEPROM 128kbyte is connected directly to module ANT C7. I had successfully initialized the EEPROM device, formated EEPROM device and initialized the memory.
For a test, I configured 2 bytes per page, 2 bytes for addressing, 8 sectors per file and 2 pages per sector.
I created successfully one file at index 5. But after that, I can't open this file. In fact, the module ANT c7 don't answer me after the command open.

To create one file, I sended to ANT:
0xA4 : // byte sync
0x0B : // MSG length = 11
0xE1 :
0x00 : // extended MSG ID
0xE2 :
0x0A : // MSG ID
0x05 : // byte LOW of file index
0x00 : // byte HIGH of file index
0x01 : // byte data type
0x01 :
0x00 :
0x00 : // 3 bytes identify
0x00 : // byte data type specific flag
0xE0 : // byte general flag
checksum

I received a message from ANT indicated that it had done successufully.

I tried to open this file by sending:
0xA4 : // byte sync
0x06 : // MSG length
0xE1 :
0x00 : // MSG ID entended
0xE2 :
0x0B : // MSG ID
0x05 : // byte LOW file index
0x00 : // byte HIGH file index
0x80 : // open flag
checksum

After that, I did not receive any message from ANT.

Can anyone help me?

One other question: What do data type and data type specific flag mean? Where can I find the explication for these 2 parameters?

Thanks for your help      
Rank

Total Posts: 4

Joined 0

PM

I have solved my problem. Just want to share the solution if someone has the same problem. Do not config the parameters at the minimum value: example sectors par page must > 2 (in Integrated ANT-FS Client Interface Control Document, at function ANTFS_FormatFSMemory(), minimum value for sector is 2, but it causes problem), pages per sector must > 2.      
Avatar
RankRankRankRank

Total Posts: 662

Joined 2012-10-09

PM

Also note that these parameters are not arbitrary values. You should refer to your EEPROM datasheet for information regarding your page size and addressing.

In your particular case, you are specifying your EEPROM size as 2 bytes per page * 2 pages per sector * 8 sectors in the file system = 32 bytes, which is far less than the 128kbytes of your EEPROM, and not enough space for creating both the directory and a file.      
Rank

Total Posts: 4

Joined 0

PM

ah, ok. I understand. Thanks very much