Welcome Guest,Register Now
Log In

ANT Forum

Welcome guest, please Login or Register

   

SPI Interfacing

Avatar
RankRankRankRank

Total Posts: 745

Joined 2012-09-14

PM

You can just send it to the support @thisisant.com e-mail and we'll take a look.      
Rank

Total Posts: 12

Joined 2016-04-05

PM

Hi,
It has been a while that I have sent the file over. Any updates?

Thanks,      
Avatar
RankRankRankRank

Total Posts: 745

Joined 2012-09-14

PM

Hi,

It appears you are using the molex connector version of the device. Have you tested it in conjunction with the ANT USB board or programmed the module to confirm it's operational?

Have you programmed the SPI assuming the MSP430 as the master and the network processor as the slave?

The ANT+ Embedded Reference Design Code also contains some of the timings required for the interface:

#define SYNC_SCLK_EDGE_DETECT()        (SYNC_SCLK_IFG & SYNC_SCLK_BIT)              // this must be an edge interrupt flag
#define SYNC_SCLK_EDGE_CLEAR()         (SYNC_SCLK_IFG  &= ~SYNC_SCLK_BIT)           // clear the interrupt flag

#define SYNC_SRDY_ASSERT()             (SYNC_SRDY_OUT &= ~SYNC_SRDY_BIT)            // active low
#define SYNC_SRDY_DEASSERT()           (SYNC_SRDY_OUT |= SYNC_SRDY_BIT)

/// this is a delay of at least 2.5us
#define SYNC_SRDY_PULSE()              { SYNC_SRDY_ASSERT();\
      
TIMER_SRDY_PULSE_DELAY();\
      TIMER_SRDY_PULSE_DELAY
();\
      SYNC_SRDY_DEASSERT
(); 


while (IS_SMSGRDY_ASSERTED() || IS_SEN_ASSERTED()) // while we have a message to send or a message to receive
   
{   
      
while (!IS_SEN_ASSERTED());                     // make sure SEN is asserted 


     
Rank

Total Posts: 12

Joined 2016-04-05

PM

Hi,
Sorry for the late response.
Yeah the module works with the ANT USB board.
I have programmed the SPI assuming the MSP430 as slave as instructed by the manual page 11.
How I can access the ANT+ Embedded Reference Design code? I mean the functions used in that code.      
Avatar
RankRankRankRank

Total Posts: 745

Joined 2012-09-14

PM

Hi,

Any of the ANT+ Embedded Reference Designs on the downloads page contain the latest serial drivers for the MSP430. The one with the simplest application is probably the Heart Rate Monitor reference design.

The serial.h and serial.c files would likely be the most helpful.

Cheers      
Rank

Total Posts: 12

Joined 2016-04-05

PM

Thanks. I downloaded the reference design package but it doesn't have anything for SPI or that heart rate monitor sample package. Also, I can't see anything like serial.c or serial.h. I can only see USB interfacing stuff but that is for the usb module I believe.
Also, in a previous post, you asked if the host is assumed to be the master but I said the manual says it should be assumed as slave. So is the manual correct or should I change the role of host from slave to master?

Thanks,