Lines Matching refs:rx_status

226 static RADIO_Rx_status_t rx_status;  variable
574 RSSI_value = rx_status.rx_resp.rssi.RSSI; in nhw_RADIO_TASK_RSSISTART()
648 if (rx_status.CI == 1) { in maybe_signal_event_RATEBOOST()
713 if (rx_status.codedphy) { in nhw_radio_timer_triggered()
718 nhwra_set_Timer_RADIO(rx_status.PAYLOAD_End_Time); in nhw_radio_timer_triggered()
727 nhwra_set_Timer_RADIO(rx_status.CRC_End_Time); in nhw_radio_timer_triggered()
732 nhw_ccm_radio_received_packet(!rx_status.CRC_OK); in nhw_radio_timer_triggered()
738 if ( rx_status.CRC_OK ) { in nhw_radio_timer_triggered()
1001 rx_status.CI = rx_buf[0] & 0x3; in Rx_handle_CI_reception()
1003 if ((rx_status.rx_resp.packet_size < 1) || (rx_status.CI > 1)) { in Rx_handle_CI_reception()
1005 __func__, rx_status.rx_resp.packet_size, rx_status.CI); in Rx_handle_CI_reception()
1008 NRF_RADIO_regs.PDUSTAT |= (rx_status.CI << RADIO_PDUSTAT_CISTAT_Pos) & RADIO_PDUSTAT_CISTAT_Msk; in Rx_handle_CI_reception()
1010 if (rx_status.rx_resp.status != P2G4_RXSTATUS_OK) { in Rx_handle_CI_reception()
1020 rx_status.CI ^= 1; in Rx_handle_CI_reception()
1021 rx_status.CI_error = true; in Rx_handle_CI_reception()
1028 if (rx_status.inFEC1 == true) { /* End of CodedPhy packet FEC1 */ in Rx_handle_end_response()
1032 if (rx_status.rx_resp.status != P2G4_RXSTATUS_HEADER_ERROR) { in Rx_handle_end_response()
1033 rx_status.CRC_End_Time = end_time + nhwra_timings_get_Rx_chain_delay(); in Rx_handle_end_response()
1039 if ( rx_status.rx_resp.status == P2G4_RXSTATUS_OK ){ in Rx_handle_end_response()
1040 NRF_RADIO_regs.RXCRC = nhwra_get_rx_crc_value(rx_buf, rx_status.rx_resp.packet_size); in Rx_handle_end_response()
1041 rx_status.CRC_OK = 1; in Rx_handle_end_response()
1050 rx_status.ADDRESS_End_Time = address_time + nhwra_timings_get_Rx_chain_delay(); in Rx_handle_address_end_response()
1052 if ((rx_status.codedphy == true) && (rx_status.inFEC1)) { in Rx_handle_address_end_response()
1053rx_status.FEC2_start_time = address_time + 16 + 24 + 1; /* It will be updated on the FEC1 Rx end */ in Rx_handle_address_end_response()
1054 rx_status.packet_rejected = false; //We always accept the FEC1 part in Rx_handle_address_end_response()
1057 rx_status.PAYLOAD_End_Time = rx_status.FEC2_start_time + 2*8/bits_per_us in Rx_handle_address_end_response()
1059 rx_status.CRC_End_Time = rx_status.PAYLOAD_End_Time + rx_status.CRC_duration; in Rx_handle_address_end_response()
1072 rx_status.packet_rejected = true; in Rx_handle_address_end_response()
1074 rx_status.packet_rejected = false; in Rx_handle_address_end_response()
1076 if (rx_status.CI_error) { in Rx_handle_address_end_response()
1078 rx_status.packet_rejected = true; in Rx_handle_address_end_response()
1086 payload_end = rx_status.rx_resp.rx_time_stamp + (bs_time_t)((2+length)*8/bits_per_us); in Rx_handle_address_end_response()
1088 payload_end = rx_status.rx_resp.rx_time_stamp + (bs_time_t)((1+length)*8/bits_per_us); in Rx_handle_address_end_response()
1091 rx_status.PAYLOAD_End_Time = nhwra_timings_get_Rx_chain_delay() + in Rx_handle_address_end_response()
1095 if (rx_status.codedphy) { in Rx_handle_address_end_response()
1096 if (rx_status.CI == 1) { in Rx_handle_address_end_response()
1103rx_status.CRC_End_Time = rx_status.PAYLOAD_End_Time + rx_status.CRC_duration + TERM2_duration; //P… in Rx_handle_address_end_response()
1107 …if (rx_status.rx_resp.packet_size >= 5) { /*At least the header and CRC, otherwise better to not t… in Rx_handle_address_end_response()
1111 memcpy(&((uint8_t*)NRF_RADIO_regs.PACKETPTR)[2 + rx_status.S1Offset], in Rx_handle_address_end_response()
1115 …if (rx_status.rx_resp.packet_size >= 3) { /*At least the header and CRC, otherwise better to not t… in Rx_handle_address_end_response()
1117 memcpy(&((uint8_t*)NRF_RADIO_regs.PACKETPTR)[1 + rx_status.S1Offset], in Rx_handle_address_end_response()
1125 double RSSI = p2G4_RSSI_value_to_dBm(rx_status.rx_resp.rssi.RSSI) + cheat_rx_power_offset; in Rx_handle_address_end_response()
1128 ((uint8_t*)NRF_RADIO_regs.PACKETPTR)[1 + rx_status.S1Offset + length] = LQI; in Rx_handle_address_end_response()
1149 …bs_time_t addres_time = hwll_dev_time_from_phy(rx_status.rx_resp.rx_time_stamp); //this is the end… in handle_Rx_response()
1153 if ((rx_status.codedphy == false) || (rx_status.inFEC1)) { in handle_Rx_response()
1155 nhwra_set_Timer_RADIO(rx_status.ADDRESS_End_Time); in handle_Rx_response()
1160 nhwra_set_Timer_RADIO(rx_status.PAYLOAD_End_Time); in handle_Rx_response()
1164 bs_time_t end_time = hwll_dev_time_from_phy(rx_status.rx_resp.end_time); in handle_Rx_response()
1171 if (rx_status.rx_resp.status == P2G4_RXSTATUS_NOSYNC) { in handle_Rx_response()
1172 if ((rx_status.codedphy == false) || (rx_status.inFEC1 == true)) { in handle_Rx_response()
1178 nhwra_set_Timer_RADIO(rx_status.PAYLOAD_End_Time); in handle_Rx_response()
1183 if (rx_status.inFEC1 == true) { in handle_Rx_response()
1186 rx_status.rx_req.start_time = rx_status.rx_resp.end_time + 1; in handle_Rx_response()
1187 nhwra_set_Timer_RADIO(rx_status.FEC2_start_time); in handle_Rx_response()
1202 p2G4_rxv2_t *rx_req = &rx_status.rx_req;
1226 p2G4_abort_t *abort = &rx_status.rx_req.abort; in Rx_abort_eval_respond()
1249 rx_status.S1Offset = 1; /*1 byte offset in RAM (S1 length > 8 not supported)*/ in start_Rx()
1251 rx_status.S1Offset = 0; in start_Rx()
1254 rx_status.codedphy = false; in start_Rx()
1255 rx_status.inFEC1 = false; in start_Rx()
1256 rx_status.CI_error = false; in start_Rx()
1257 rx_status.CI = 0; in start_Rx()
1266 rx_status.codedphy = true; in start_Rx()
1267 rx_status.inFEC1 = true; in start_Rx()
1271 rx_status.CRC_duration = nhwra_get_crc_length()*8/bits_per_us; in start_Rx()
1272 rx_status.CRC_OK = false; in start_Rx()
1273 rx_status.rx_resp.status = P2G4_RXSTATUS_NOSYNC; in start_Rx()
1275 if (rx_status.codedphy) { in start_Rx()
1276 nhwra_prep_rx_request_FEC1(&rx_status.rx_req_fec1, rx_addresses); in start_Rx()
1277 update_abort_struct(&rx_status.rx_req_fec1.abort, &next_recheck_time); in start_Rx()
1279 nhwra_prep_rx_request(&rx_status.rx_req, rx_addresses); in start_Rx()
1280 update_abort_struct(&rx_status.rx_req.abort, &next_recheck_time); in start_Rx()
1284 if (rx_status.codedphy) { in start_Rx()
1285 ret = p2G4_dev_req_rxv2_nc_b(&rx_status.rx_req_fec1, rx_addresses, in start_Rx()
1286 &rx_status.rx_resp, &rx_pkt_buffer_ptr, in start_Rx()
1289 ret = p2G4_dev_req_rxv2_nc_b(&rx_status.rx_req, rx_addresses, in start_Rx()
1290 &rx_status.rx_resp,&rx_pkt_buffer_ptr, in start_Rx()
1305 rx_status.inFEC1 = false; in start_Rx_FEC2()
1307 if (rx_status.CI == 0) { in start_Rx_FEC2()
1308 rx_status.rx_req.coding_rate = 8; in start_Rx_FEC2()
1312 rx_status.rx_req.coding_rate = 2; in start_Rx_FEC2()
1313 rx_status.rx_req.error_calc_rate = 500000; in start_Rx_FEC2()
1314 rx_status.rx_req.header_duration = 2*8*2 /* 2 bytes at 500kbps */; in start_Rx_FEC2()
1317 rx_status.rx_req.pream_and_addr_duration = 0; in start_Rx_FEC2()
1318 rx_status.rx_req.n_addr = 0; in start_Rx_FEC2()
1319 rx_status.rx_req.scan_duration = 1; in start_Rx_FEC2()
1320 rx_status.rx_req.prelocked_tx = true; in start_Rx_FEC2()
1322 rx_status.CRC_duration = nhwra_get_crc_length()*8/bits_per_us; in start_Rx_FEC2()
1324 update_abort_struct(&rx_status.rx_req.abort, &next_recheck_time); in start_Rx_FEC2()
1328 ret = p2G4_dev_req_rxv2_nc_b(&rx_status.rx_req, NULL, in start_Rx_FEC2()
1329 &rx_status.rx_resp, &rx_pkt_buffer_ptr, in start_Rx_FEC2()
1346 bool accept_packet = !rx_status.packet_rejected; in Rx_Addr_received()
1348 if (rx_status.codedphy == false || rx_status.inFEC1 == false) { in Rx_Addr_received()
1363 update_abort_struct(&rx_status.rx_req.abort, &next_recheck_time); in Rx_Addr_received()
1364 int ret = p2G4_dev_rxv2_cont_after_addr_nc_b(accept_packet, &rx_status.rx_req.abort); in Rx_Addr_received()
1372 NRF_RADIO_regs.RXCRC = nhwra_get_rx_crc_value(rx_buf, rx_status.rx_resp.packet_size); in Rx_Addr_received()
1375 nhw_ccm_radio_received_packet(!rx_status.CRC_OK); in Rx_Addr_received()