Hi DecaLeo,
Thank you for your response…
the below buffer is the thing wich we are going to send…
uint8_t one_kb[2000] = {“Here the message which the decawave going to send.
Here the message which the decawave going to send.
Here the message which the decawave going to send.
Here the message which the decawave going to send.”};
the below code is for configuring the DW1000
/* Reset DW1000 */
reset_DW1000();
/* Set SPI clock to 2MHz */
port_set_dw1000_slowrate();
/* Init the DW1000 */
if (dwt_initialise(DWT_LOADUCODE) == DWT_ERROR)
{
//Init of DW1000 Failed
while (1) {};
}
// Set SPI to 8MHz clock
port_set_dw1000_fastrate();
/* Configure DW1000. */
dwt_configure(&config);
then finallly the i send the message here by using the below commands…
dwt_write32bitreg(SYS_STATUS_ID, SYS_STATUS_TXFRS);
dwt_writetxdata(strlen(one_kb), one_kb, 0); /* Zero offset in TX buffer. /
dwt_writetxfctrl(strlen(one_kb), 0, 1); / Zero offset in TX buffer, ranging. /
/ Start transmission, indicating that a response is expected so that reception is enabled automatically after the frame is sent and the delay
- set by dwt_setrxaftertxdelay() has elapsed. */
dwt_starttx(DWT_START_TX_IMMEDIATE);
but i got only 124 bytes in my receiving side…
in the receving side the configuration are the same, i enable the receive option by entering the below function.
/* Activate reception immediately. */
dwt_rxenable(DWT_START_RX_IMMEDIATE);
/* Poll for reception of a frame or error/timeout. See NOTE 5 below. */
while (!((status_reg = dwt_read32bitreg(SYS_STATUS_ID)) & (SYS_STATUS_RXFCG | SYS_STATUS_ALL_RX_TO | SYS_STATUS_ALL_RX_ERR)))
{};
if (status_reg & SYS_STATUS_RXFCG)
{
uint32 frame_len;
/* Clear good RX frame event in the DW1000 status register. */
dwt_write32bitreg(SYS_STATUS_ID, SYS_STATUS_RXFCG);
/* A frame has been received, read it into the local buffer. */
frame_len = dwt_read32bitreg(RX_FINFO_ID) & RX_FINFO_RXFLEN_MASK;
if (frame_len <= RX_BUF_LEN)
{
dwt_readrxdata(Receive_Buf, frame_len, 0);
}
is that clear to you, if not i ll send the programming file for your reference…
Thanks and regards
hmdra