Hi, I can not understand completely the code in the railtest want to feel more sure about what I'm doing in my own program.
By default, the rail libray will count packet with crc error inside the "received" event? By default I mean with no calling to the rx option function with the ignore crc option (actually I'm not calling this function at all)
The railtest will count it in the received packets when I ask for status?
If a packet had been received without any error (including abort by software, CRC error, frame length decoding error, filtering error, etc.) the RAIL_EVENT_RX_PACKET_RECEIVED event will be raised. It can be also triggered by receiving a packet with CRC error if the RAIL_RX_OPTION_IGNORE_CRC_ERRORS option is in effect. This event is counted in counters.receive and printed out as RxCount:%u.
Packet received with CRC errors are counted in counters.frameError and printed out as FrameErrors:%u by default (the RAIL_EVENT_RX_FRAME_ERROR will be triggered). Once the RAIL_RX_OPTION_IGNORE_CRC_ERRORS option is activated packet with CRC errors will no longer raise the frame error event.
I'm not sure I fully understand the question, but here's how the rx crc check works:
Somewhat related: RAIL_RX_OPTION_STORE_CRC will result in saving the CRC bytes into the rx frame. Above 2 options still work, so unless RAIL_RX_OPTION_IGNORE_CRC_ERRORS is used, it only saves the frame+crc for frames that pass the crc check.