Welcome Guest,Register Now
Log In

ANT Forum

Welcome guest, please Login or Register

   

Where can I found the ANT_InitCWTest function

Rank

Total Posts: 29

Joined 0

PM

Hi There,
I am try to find the ANT_InitCWTest function for my msp430 micro controller,
But I don't see it in ant_embedded_reference_designs,
Any suggestion will be appreciated.
Best regards,
tony
     
RankRankRankRank

Total Posts: 156

Joined 2013-01-07

PM

Hi Tony,

We have not exposed the CW Test functions in the embedded reference library. CW mode is intended for testing against RF regulatory requirements, what would you like to use it for?

Which ANT component are you using with the MSP430?


     
Rank

Total Posts: 29

Joined 0

PM

Hi Usamak,
I use Nordic nRF24AP2 component with MSP430, now we want to pass the RF regulatory test to get the RF device certifications. So, I will need the test mode function. I found the usage manual has some description about the test mode, howerver I just can't found the api in the sample code.
So, please help me to find the code.
Best regards,
tony
     
RankRankRankRank

Total Posts: 156

Joined 2013-01-07

PM

Hi Tony,

You will have to add the methods for the CW test commands (0x48, 0x53) by modifying the ANTInterface.c and ANTInterface.h files.

Sections 9.5.8.1 and 9.5.8.2 in the ANT Message Protocol and Usage Document: (http://www.thisisant.com/resources/ant-message-protocol-and-usage/) describe the serial message contents of the two commands used to set up and run CW Test mode.

The antmessage.h header file includes the required constants to write these methods:

#define MESG_RADIO_CW_MODE_ID ((UCHAR)0x48)
#define MESG_RADIO_CW_INIT_ID ((UCHAR)0x53)

#define MESG_RADIO_CW_MODE_SIZE ((UCHAR)3)
#define MESG_RADIO_CW_INIT_SIZE ((UCHAR)1)      
Rank

Total Posts: 29

Joined 0

PM

Hi Usmak,
Thanks for your response,
I create two methods based on your suggestion. However, I have no idea the code is correct or not. So, I list it as following, if there is possible could you help me to check the code is correct or wrong.

BOOL ANT_InitCWTestMode(void){
BOOL bSuccess = FALSE;
UCHAR* pucBuffer = Serial_Get_Tx_Buffer(); // Get space from the queue
if(pucBuffer) // If there is space in the queue
{
pucBuffer[0] = MESG_RADIO_CW_INIT_ID;
pucBuffer[1] = 0;
Serial_Put_Tx_Buffer(); // Put buffer back in queue
bSuccess = TRUE;
}
return bSuccess;
}
BOOL ANT_SetCWTestMode(UCHAR ucTransmitPower, UCHAR ucRFChannel){
BOOL bSuccess = FALSE;
UCHAR* pucBuffer = Serial_Get_Tx_Buffer(); // Get space from the queue
if(pucBuffer) // If there is space in the queue
{
pucBuffer[0] = MESG_RADIO_CW_MODE_ID;
pucBuffer[1] = 0;
pucBuffer[2] = ucTransmitPower;
pucBuffer[3] = ucRFChannel;
Serial_Put_Tx_Buffer(); // Put buffer back in queue
bSuccess = TRUE;
}

return bSuccess;
}
Thank in advance.
tony      
RankRankRankRank

Total Posts: 156

Joined 2013-01-07

PM

Hi Tony,

Those functions do look correct. You can also run the CW test on an ANT USB stick using the ANTWare II PC tool for reference.

I would recommend also adding calls to the WaitForResponse() function similar to the other ANT functions in ANTInterface.c.      
Rank

Total Posts: 29

Joined 0

PM

hi,
I use the frequency spectrograph to check the frequence. it looks good.
Many thanks for your support.
Best regards,
tony