主题中讨论的其他器件:AFE031
工具/软件:
您好:
我有一个关于 AFE031 的 C2000 示例中的数据包接收软件的小问题: boost_afe031_f28379d_rx
我修改了传输软件以发送 9 个 8 位的数据包、而不是示例中 3 个 11 位的数据包(基于 boost_afe031_f28379d_dacmode)
到目前为止,没问题,我在示波器上观察我的画面,一切都是一致的,但我对接收软件中的功能的行为有疑问。
我的修改如下:
| rx_message_size | 72. |
| number_of_words(“fsk_packetization.h")“) | 9. |
| number_of_bits_per_word (“fsk_packetization.h")“) | 8. |
但“packet_sum"变量“变量中的结果与预期的结果不同。 似乎是包装 (...) 仅考虑前 33 位。
在调试中、如果我在 Packetize 函数之前放置一个断点并在“rxMessage"的“的前 33 位内修改数据、则 packet_sum 会在函数的输出处更改、而如果我在前 33 位之后修改数据、则 packet_sum 将保持不变。
while(1)
{
//
// Begin receiving data
//
Start_Receiving();
//
// wait for message to be received, timeout if not received within set time
//
while(!msgFull){}
msgFull = 0; // Clear the msgFull flag
//
// Stop receiving data
//
Stop_Receiving();
//
// Packetize the received message, clears the received message buffer
//
// In debug, before this function, I can see 72 bits received
Packetize(rxMessage, packet);
// And after, the first 33 bits are cleared by the function but not the ones after
//
// LED indication of received packet
//
Visual_Indication();
//
// software breakpoint after receiving full message
//
//asm(" ESTOP0"); // Uncomment to receive only one packet
}
我是否忘记了某些东西、或者打包功能仅在收到 33 位数据时才起作用?
感谢您的帮助!