uint8_t totalBufferCount;
#ifdef DET_ACTIVATED
- if (Fr_DrvState != FR_ST_DRV_INITIALIZED) {
+ if (Fr_DrvState < FR_ST_DRV_INITIALIZED) {
return E_NOT_OK;
}
#endif
/* Switch CC into ‘POC:config’ (from any other POCState) */
- if (Fr_POC_go_to_config() == E_NOT_OK) {
- return E_NOT_OK;
+ while (frayREG->CCSV_UN.CCSV_ST.pocs_B6 != FR_POCS_CONFIG) {
+ if (Fr_POC_go_to_config() == E_NOT_OK) {
+ return E_NOT_OK;
+ }
}
+
/* Check Cluster config parameters */
if (Fr_check_cluster_parameters(Fr_Config->clusterConfiguration, &errCode) == E_NOT_OK) {
return E_NOT_OK | errCode | FR_INIT_ERR_CLUSTER_CONFIG;
totalBufferCount = Fr_config_msgRAM_parameters(Fr_Config->msgRAMConfig);
Fr_MsgRAMDataStartAddress = totalBufferCount*4U; // First data section after headers sections in message RAM.
Fr_MsgRAMDataOffset = Fr_MsgRAMDataStartAddress;
+
+ /* Reset configured flags */
+ for (i = 0; i < totalBufferCount; i++) {
+ Fr_BuffersConfigured[i] = FALSE;
+ }
+
/* Configure all transmit/receive resources */
for (i = 0; i < totalBufferCount; i++) {
if (Fr_PrepareLPdu(Fr_CtrlIdx, Fr_buffer_slot_map[i].buffer_ptr->slotId) == E_NOT_OK) {
if (Fr_CtrlIdx != 0) {
return E_NOT_OK;
}
- if (Fr_DrvState != FR_ST_DRV_INITIALIZED) {
+ if (Fr_DrvState < FR_ST_DRV_INITIALIZED) {
return E_NOT_OK;
}
if (Fr_LPduIdx > cSlotIDMax) {