Welcome Guest,Register Now
Log In

ANT Forum

Welcome guest, please Login or Register

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

   

Embedded Integrated ANT-FS (C7) 

Rank

Total Posts: 4

Joined 2010-01-21

PM

Hi,

I am using the CC257x in a embedded design (8bit AVR C) and I would like to implement the 'integrated ANT-FS' capability that the CC257x has built-in.

The embedded system will act as the client (data-collector).

There does not seem to be any reference code for an embedded integrated ANT-FS client. Would the best approach be for me to port the code found in 'Integrated_ANTFS_Client/src/' to my embedded design?

On this note, in the document 'Integrated ANT-FS Client Interface Control Document', a number of functions (commands) are described in Table 2. - where would I find the implemented code for these functions (commands)?
Are they to be found in 'FS_AntLib.cs' within the 'Integrated_ANTFS_Client.zip', only have they been renamed?

Thanks in advance for any insight you can provide.


Kind regards,
Mathew Pottinger


     
Avatar
RankRankRankRank

Total Posts: 662

Joined 2012-10-09

PM

Hi Matthew,

Unfortunately, we do not have embedded reference code for the integrated ANT-FS feature of the C7 at this moment. You can find the implementation of the commands on FS_AntLib.cs, or in the source code of the ANT Windows Library package, in the ANT_LIB project, in dsi_framer_integrated_antfs_client.cpp.

You may also find it easier to work from the documentation, as the 'Integrated ANT-FS Client Interface Control Document" describes in detail the format of the serial messages to use for this feature. You can start from any of the ANT+ embedded reference designs, and look at the ANTInterface.c file that implements standard ANT messages (refer to the "ANT Message Protocol and Usage" document for details on the messages). You can add the integrated ANT-FS commands you need in a similar manner, based on the description of the commands in the 'Integrated ANT-FS Client Interface Control Document" or the PC code.      
Rank

Total Posts: 4

Joined 2010-01-21

PM

Hi,

Thank you for your help - I have now implemented the integrated ANT-FS commands in a similar manner to the standard ANT messages found in the ANTInterface.c file.

However, when I send the following messages, ANTFS_InitFSMemory() returns with an error:
ANTFS_InitEEPROMDevice(64, 1); // 64 bytes per page, 2 byte address
Returns 0x00 FS_NO_ERROR Operation successful

ANTFS_FormatFSMemory(4, 4); // 4 sectors, 4 pages per sector
Returns 0x00 FS_NO_ERROR Operation successful

ANTFS_InitFSMemory();
Returns 0x01 FS_MEMORY_UNFORMATTED_ERROR NVM not formatted before attempting a file operation

I am using a 128-Kbit EEPROM.
Datasheet

Using a logic analyzer I have checked the SPI communication between the C7 and EEPROM. I have attached the output from this test. To summarize. the ANTFS_InitEEPROMDevice message doesn't result in any SPI communication. The ANTFS_FormatFSMemory message results in the C7 sending a number of characters to the EEPROM,, however the EEPROM (MISO) responds with either 0xFF or 0x00 every time. The ANTFS_InitFSMemory message results in a similar behaviour to the previous message.

Do you know what could be the cause of the error in response to the ANTFS_InitFSMemory message?
Is it likely to be due to a hardware issue (EEPROM not properly connected)? Or perhaps an initialization issue (am I using incorrect values to initialize a 128Kbit EEPROM)?

Thanks in advance for any assistance you can provide.
     

File Attachments

Avatar
RankRankRankRank

Total Posts: 662

Joined 2012-10-09

PM

When I've seen that problem before it has been due to problems in the connection with the EEPROM, so that would be the first thing to check. The first two commands just setup parametes to use when usiing the EEPROM, so they are successful even if there is a problem connecting to the EEPROM.