Other Parts Discussed in Thread: AFE031
Tool/software:
Hello,
I have a small question concerning the packet reception software in the C2000 examples for the AFE031: boost_afe031_f28379d_rx
I modified the transmission software to send 9 packets of 8 bits instead of 3 packets of 11 bits in the example (based on boost_afe031_f28379d_dacmode)
So far, no problem, I'm observing my frame on the oscilloscope, everything is consistent, but I have a doubt about the behavior of a function in the reception software.
My modifications are as follows:
| RX_MESSAGE_SIZE | 72 |
| NUMBER_OF_WORDS ("fsk_packetization.h") | 9 |
| NUMBER_OF_BITS_PER_WORD ("fsk_packetization.h") | 8 |
But the result in the “packet_sum” variable is not what was expected. It seems that the Packetize(...) function only takes into account the first 33 bits.
In debug, if I place a breakpoint before the Packetize function and modify data within the first 33 bits of the "rxMessage", the packet_sum is changed at the function's output, whereas if I modify data after the first 33 bits, the packet_sum is unchanged.
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
}
Have I forgotten something or does the packetize function only work for 33bits received?
Thanks for your help!