about KW24 SMAC send API

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

about KW24 SMAC send API

1,600 次查看
haidong_zheng
NXP Employee
NXP Employee

hi  I have some questions for KW24 SMAC send API

In PhyPlmeData.c API PhyPdDataRequest

1: phyPacket_t   frameLength,  Dose this frameLength  include FCS ?

2: phyPacket_t   data,  Should  data[0] be  frameLength  which will be written to KW24 PB buffer ?  Just as below description:

    for MC1324xDrv_PB_SPIBurstWrite in PhyPdDataRequest, the Written length should be frameLength ? or frameLength + 1 <include the first byte -> "frame length">

pastedImage_1.png

3: For Freescale Test Tool which is running on PC

   Dose RAW frame captured by USB dongle include two FCS bytes ?

Thanks!

标签 (1)
0 项奖励
回复
4 回复数

1,400 次查看
AngelC
Senior Contributor I

Hello Haidong,

To send data over the air using SMAC you should MCPSDataRequest() instead, which automatically calls PhyPdDataRequest() and takes care of the rest of size calculations and other bytes added. Before such call, the MCPSDataRequest uses SmacFormatTxPacket(psTxPacket) to format the packet and add the FCS bytes to the frame length as bellow:

packetToPhy->frameLength += 2; //Add 2 for FCS

Therefore, the frameLength parameter in PhyPdDataRequest already includes the FCS. I would recommend you to use the MCPS API to send data since it is how the SMAC expects. Moreover, the raw data in protocol analyzer should show the MAC integrity code, which would be the FCS.

Regards,

AngelC

1,400 次查看
haidong_zheng
NXP Employee
NXP Employee

hi AngeIC:

Some one try to integrate KW24D5 and Contiki, this require directly using PHY layer code not SMAC.

1,400 次查看
AngelC
Senior Contributor I

Hello Haidong,

Based in the MCPSDataRequest(), the frameLength in phyPacket_t  includes the FCS bytes but not the frameLength byte itself. Therefore, you should write the frame length and then the corresponding length of bytes including FCS.

Regards,

AngelC

0 项奖励
回复

1,400 次查看
karina_valencia
NXP Apps Support
NXP Apps Support

gogoer​ can you let me know the customer name related with this case?

0 项奖励
回复