Sign in

username:

password:



Not a member?

Search msp430



Search tips

Subscribe to msp430



Ads

Discussion Groups

Discussion Groups | MSP430 | CC2500 FIFO underflow?

The purpose of this group is to foster exchange of information on the Texas Instruments MSP430 family of microcontrollers and related tools. Everyone welcome, all levels of familiarity/expertise.

CC2500 FIFO underflow? - abufadel - Sep 5 13:06:49 2008

Greetings,

Can anyone explain the reason I am getting an fifo underflow when I
transmit data that is less than the array?

Here is what I have:

uint8 Data[64];

while (TRUE)
{
// Send packet
halRfSendPacket(Data, 4);
//halRfStrobe(CC2500_SFTX);
status = halRfReadStatusReg(CC2500_TXBYTES);
//Wait a bit such that the receiver is not saturated
halMcuWaitUs(240); //
}

The loop above goes through once and hangs on the 2nd iteration.
Status tells me that the FIFO is underflowed.

However if I change send packet line 6 to be
halRfSendPacket(Data, 64); no underflow happens.

Also, if I change the Data declaration to Data[4] and keep the original:
halRfSendPacket(Data, 4); no underflow occurs.

Can anyone explain why something like this would happen? Why does it
seem that the buffer has to be exact size of the packet? Why can't
the packet be less?

Any insights appreciated.

Thank you,

A
------------------------------------



(You need to be a member of msp430 -- send a blank email to msp430-subscribe@yahoogroups.com )


Re: CC2500 FIFO underflow? - Onestone - Sep 5 13:26:44 2008

You have probably set the packet length at some point to 64. You then
only send 4 bytes to the buffer before actually transmitting. this means
that the expected 64 bytes aren't there, hence an underflow occurs. When
changing the declaration the packet length is shortened hence no underflow.

Al

abufadel wrote:

>Greetings,
>
>Can anyone explain the reason I am getting an fifo underflow when I
>transmit data that is less than the array?
>
> Here is what I have:
>
>uint8 Data[64];
>
> while (TRUE)
> {
> // Send packet
> halRfSendPacket(Data, 4);
> //halRfStrobe(CC2500_SFTX);
> status = halRfReadStatusReg(CC2500_TXBYTES);
> //Wait a bit such that the receiver is not saturated
> halMcuWaitUs(240); //
> }
>
>The loop above goes through once and hangs on the 2nd iteration.
>Status tells me that the FIFO is underflowed.
>
>However if I change send packet line 6 to be
>halRfSendPacket(Data, 64); no underflow happens.
>
>Also, if I change the Data declaration to Data[4] and keep the original:
>halRfSendPacket(Data, 4); no underflow occurs.
>
>Can anyone explain why something like this would happen? Why does it
>seem that the buffer has to be exact size of the packet? Why can't
>the packet be less?
>
>Any insights appreciated.
>
>Thank you,
>
>A
>------------------------------------



(You need to be a member of msp430 -- send a blank email to msp430-subscribe@yahoogroups.com )