diff --git a/components/device/silabs/si91x/mcu/core/chip/src/rsi_deepsleep_soc.c b/components/device/silabs/si91x/mcu/core/chip/src/rsi_deepsleep_soc.c index 156fb0eab..d0a6f7e24 100644 --- a/components/device/silabs/si91x/mcu/core/chip/src/rsi_deepsleep_soc.c +++ b/components/device/silabs/si91x/mcu/core/chip/src/rsi_deepsleep_soc.c @@ -314,8 +314,8 @@ void RSI_Set_Cntrls_To_M4(void) BATT_FF->M4SS_TASS_CTRL_SET_REG_b.M4SS_CTRL_TASS_AON_DISABLE_ISOLATION_BYPASS = ENABLE; /* M4SS controlling Power supply for TASS AON domains reset pin in bypass mode. */ M4SS_TASS_CTRL_CLR_REG = M4SS_CTRL_TASS_AON_PWR_DMN_RST_BYPASS_BIT; - for (volatile uint8_t delay = 0; delay < 10; delay++) { - __ASM("NOP"); + for (uint8_t delay = 0; delay < 10; delay++) { + __NOP(); } } /** diff --git a/components/device/silabs/si91x/mcu/core/chip/src/rsi_ps_ram_func.c b/components/device/silabs/si91x/mcu/core/chip/src/rsi_ps_ram_func.c index b47a3c1d1..d4bd87563 100644 --- a/components/device/silabs/si91x/mcu/core/chip/src/rsi_ps_ram_func.c +++ b/components/device/silabs/si91x/mcu/core/chip/src/rsi_ps_ram_func.c @@ -530,15 +530,15 @@ void RSI_PS_Restore_WiseAoc(void) __set_MSP(INTERMEDIATE_SP); /**/ M4SS_CLK_ENABLE_SET_REG1 = M4SS_STATIC_CLK_SWITCH; - __asm("nop"); - __asm("nop"); - __asm("nop"); - __asm("nop"); + __NOP(); + __NOP(); + __NOP(); + __NOP(); M4SS_CLK_ENABLE_CLEAR_REG1 = M4SS_STATIC_CLK_SWITCH; - __asm("nop"); - __asm("nop"); - __asm("nop"); - __asm("nop"); + __NOP(); + __NOP(); + __NOP(); + __NOP(); /*Restore the CPU context*/ RSI_PS_RestoreCpuContext(); return; diff --git a/components/device/silabs/si91x/mcu/drivers/peripheral_drivers/src/rsi_comparator.c b/components/device/silabs/si91x/mcu/drivers/peripheral_drivers/src/rsi_comparator.c index d022a6d13..96ebecf43 100644 --- a/components/device/silabs/si91x/mcu/drivers/peripheral_drivers/src/rsi_comparator.c +++ b/components/device/silabs/si91x/mcu/drivers/peripheral_drivers/src/rsi_comparator.c @@ -155,7 +155,7 @@ rsi_error_t RSI_COMP_Enable(AUX_ADC_DAC_COMP_Type *comp, uint8_t comp_number, ui if (enable) { for (i = 0; i < 300; i++) { - __ASM("nop"); + __NOP(); } RSI_COMP_IntrEnableDisable(comp_number, ENABLE); NVIC_EnableIRQ(COMP1_IRQn); @@ -171,7 +171,7 @@ rsi_error_t RSI_COMP_Enable(AUX_ADC_DAC_COMP_Type *comp, uint8_t comp_number, ui if (enable) { for (i = 0; i < 300; i++) { - __ASM("nop"); + __NOP(); } RSI_COMP_IntrEnableDisable(comp_number, ENABLE); NVIC_EnableIRQ(COMP2_IRQn); @@ -190,7 +190,7 @@ rsi_error_t RSI_COMP_Enable(AUX_ADC_DAC_COMP_Type *comp, uint8_t comp_number, ui if (enable) { for (i = 0; i < 300; i++) { - __ASM("nop"); + __NOP(); } NVIC_EnableIRQ(COMP1_IRQn); } @@ -203,7 +203,7 @@ rsi_error_t RSI_COMP_Enable(AUX_ADC_DAC_COMP_Type *comp, uint8_t comp_number, ui if (enable) { for (i = 0; i < 300; i++) { - __ASM("nop"); + __NOP(); } NVIC_EnableIRQ(COMP2_IRQn); } @@ -219,7 +219,7 @@ rsi_error_t RSI_COMP_Enable(AUX_ADC_DAC_COMP_Type *comp, uint8_t comp_number, ui if (enable) { for (i = 0; i < 300; i++) { - __ASM("nop"); + __NOP(); } RSI_COMP_IntrEnableDisable(comp_number, ENABLE); NVIC_EnableIRQ(COMP1_IRQn); @@ -235,7 +235,7 @@ rsi_error_t RSI_COMP_Enable(AUX_ADC_DAC_COMP_Type *comp, uint8_t comp_number, ui if (enable) { for (i = 0; i < 300; i++) { - __ASM("nop"); + __NOP(); } RSI_COMP_IntrEnableDisable(comp_number, ENABLE); NVIC_EnableIRQ(COMP2_IRQn); diff --git a/components/device/silabs/si91x/mcu/drivers/peripheral_drivers/src/rsi_ir.c b/components/device/silabs/si91x/mcu/drivers/peripheral_drivers/src/rsi_ir.c index c0dbae65c..2dcf79fd1 100644 --- a/components/device/silabs/si91x/mcu/drivers/peripheral_drivers/src/rsi_ir.c +++ b/components/device/silabs/si91x/mcu/drivers/peripheral_drivers/src/rsi_ir.c @@ -64,7 +64,7 @@ void RSI_IR_SoftwareRestart(IR_Type *pIr) uint8_t i; pIr->IR_CONFIG_b.SREST_IR_CORE = 1U; for (i = 0; i < 10; i++) { - __ASM("nop"); + __NOP(); } pIr->IR_CONFIG_b.SREST_IR_CORE = 0U; } diff --git a/components/device/silabs/si91x/mcu/drivers/peripheral_drivers/src/rsi_qspi.c b/components/device/silabs/si91x/mcu/drivers/peripheral_drivers/src/rsi_qspi.c index 555d2b078..c42e0b205 100644 --- a/components/device/silabs/si91x/mcu/drivers/peripheral_drivers/src/rsi_qspi.c +++ b/components/device/silabs/si91x/mcu/drivers/peripheral_drivers/src/rsi_qspi.c @@ -1991,7 +1991,7 @@ void RSI_QSPI_ConfigQspiDll(spi_config_t *spi_config, qspi_reg_t *qspi_reg) | (spi_config->spi_config_2.qspi_clk_en << 8)); // Octa_mode_enable_with_dqs //wait till 10 clocks while (delay) { - __ASM("nop"); + __NOP(); delay--; } diff --git a/components/device/silabs/si91x/mcu/drivers/peripheral_drivers/src/sl_si91x_m4_ps.c b/components/device/silabs/si91x/mcu/drivers/peripheral_drivers/src/sl_si91x_m4_ps.c index 14b235c9d..4d9decb9c 100644 --- a/components/device/silabs/si91x/mcu/drivers/peripheral_drivers/src/sl_si91x_m4_ps.c +++ b/components/device/silabs/si91x/mcu/drivers/peripheral_drivers/src/sl_si91x_m4_ps.c @@ -359,7 +359,7 @@ bool sli_si91x_ta_packet_initiated_to_m4(void) // This delay is introduced to synchronize between the M4 and the NWP. for (uint8_t delay = 0; delay < 10; delay++) { - __ASM("NOP"); + __NOP(); } // Verify if the NWP has already initiated a packet to the M4 diff --git a/components/device/silabs/si91x/mcu/drivers/rom_driver/inc/rsi_rom_power_save.h b/components/device/silabs/si91x/mcu/drivers/rom_driver/inc/rsi_rom_power_save.h index 65289df29..88681b291 100644 --- a/components/device/silabs/si91x/mcu/drivers/rom_driver/inc/rsi_rom_power_save.h +++ b/components/device/silabs/si91x/mcu/drivers/rom_driver/inc/rsi_rom_power_save.h @@ -132,7 +132,7 @@ STATIC INLINE rsi_error_t RSI_PS_PowerStateChangePs4toPs2(ULP_MODE_T enCtxSel, M4CLK->CLK_ENABLE_SET_REG1_b.M4SS_UM_CLK_STATIC_EN_b = 0x1; #endif for (uint8_t x = 0; x < 10; x++) { - __ASM("NOP"); + __NOP(); } #if !defined(SLI_SI917) && !defined(SLI_SI915) M4CLK->CLK_ENABLE_CLR_REG1_b.M4SS_UM_CLK_STATIC_EN_b = 0x1; diff --git a/components/device/silabs/si91x/mcu/drivers/systemlevel/inc/rsi_power_save.h b/components/device/silabs/si91x/mcu/drivers/systemlevel/inc/rsi_power_save.h index fcc06614a..0fbf0e96d 100644 --- a/components/device/silabs/si91x/mcu/drivers/systemlevel/inc/rsi_power_save.h +++ b/components/device/silabs/si91x/mcu/drivers/systemlevel/inc/rsi_power_save.h @@ -536,7 +536,7 @@ STATIC INLINE rsi_error_t ps_power_state_change_ps4tops2(ULP_MODE_T enCtxSel, uint8_t socLdoEnable, uint8_t standByDc) { - volatile int x = 0; + int x = 0; /*return error if this function is called from PS2*/ if (M4_ULP_SLP_STATUS_REG & ULP_MODE_SWITCHED_NPSS) { @@ -553,7 +553,7 @@ STATIC INLINE rsi_error_t ps_power_state_change_ps4tops2(ULP_MODE_T enCtxSel, /*Avoid the junk system bus access*/ for (x = 0; x < 10; x++) { - __ASM("NOP"); + __NOP(); } /* Indicates the status of functional switching to ULP Mode operation @@ -669,7 +669,7 @@ STATIC INLINE rsi_error_t ps_power_state_change_ps2_to_Ps4(uint32_t PmuBuckTurnO /* Wait for Status bit indicating Physical transition from PS2 to PS4*/ /*Avoid the junk system bus access*/ for (x = 0; x < 10; x++) { - __ASM("NOP"); + __NOP(); } while (M4_ULP_SLP_STATUS_REG & ULP_MODE_SWITCHED_NPSS) @@ -699,7 +699,7 @@ STATIC INLINE rsi_error_t ps_power_state_change_ps2_to_Ps4(uint32_t PmuBuckTurnO M4CLK->CLK_ENABLE_SET_REG1_b.M4SS_UM_CLK_STATIC_EN_b = 0x1; #endif for (x = 0; x < 200; x++) { - __ASM("NOP"); + __NOP(); } #if !defined(SLI_SI917) && !defined(SLI_SI915) M4CLK->CLK_ENABLE_CLR_REG1_b.M4SS_UM_CLK_STATIC_EN_b = 0x1; diff --git a/components/device/silabs/si91x/mcu/drivers/unified_api/src/sl_si91x_psram.c b/components/device/silabs/si91x/mcu/drivers/unified_api/src/sl_si91x_psram.c index cdb0cb858..ca791e55e 100644 --- a/components/device/silabs/si91x/mcu/drivers/unified_api/src/sl_si91x_psram.c +++ b/components/device/silabs/si91x/mcu/drivers/unified_api/src/sl_si91x_psram.c @@ -2021,7 +2021,7 @@ sl_psram_return_type_t sl_si91x_psram_sleep(void) /*Make sure tHS is not violated*/ - __asm("nop"); + __NOP(); return PSRAM_SUCCESS; } @@ -2038,16 +2038,16 @@ sl_psram_return_type_t sl_si91x_psram_wakeup(void) /*Make sure tXPHS is not violated*/ - __asm("nop"); - __asm("nop"); - __asm("nop"); + __NOP(); + __NOP(); + __NOP(); qspi_reg->QSPI_MANUAL_CONFIG_REG = (qspi_reg->QSPI_MANUAL_CONFIG_REG | 0x1); /*Make sure tXHS is not violated*/ for (int i = 0; i < tXHS_MAX_COUNT; i++) { - __asm("nop"); + __NOP(); } return sl_si91x_psram_init(); diff --git a/components/device/silabs/si91x/wireless/ahb_interface/src/sl_platform_wireless.c b/components/device/silabs/si91x/wireless/ahb_interface/src/sl_platform_wireless.c index 6ebe1b9b3..3ee012e0d 100644 --- a/components/device/silabs/si91x/wireless/ahb_interface/src/sl_platform_wireless.c +++ b/components/device/silabs/si91x/wireless/ahb_interface/src/sl_platform_wireless.c @@ -293,8 +293,8 @@ void sl_si91x_trigger_sleep(SLEEP_TYPE_T sleepType, P2P_STATUS_REG &= ~M4_is_active; P2P_STATUS_REG; // Adding delay to sync m4 with NWP - for (volatile uint8_t delay = 0; delay < 10; delay++) { - __ASM("NOP"); + for (uint8_t delay = 0; delay < 10; delay++) { + __NOP(); } // Checking if already NWP have triggered the packet to M4 diff --git a/components/device/silabs/si91x/wireless/socket/src/sl_si91x_socket_utility.c b/components/device/silabs/si91x/wireless/socket/src/sl_si91x_socket_utility.c index 75c0fa3ed..0e1dfc598 100644 --- a/components/device/silabs/si91x/wireless/socket/src/sl_si91x_socket_utility.c +++ b/components/device/silabs/si91x/wireless/socket/src/sl_si91x_socket_utility.c @@ -784,7 +784,7 @@ int sli_si91x_accept(int socket, struct sockaddr *addr, socklen_t *addr_len, sl_ SLI_SI91X_RETURN_IMMEDIATELY, NULL); SLI_SOCKET_VERIFY_STATUS_AND_RETURN(status, SL_STATUS_OK, SLI_SI91X_UNDEFINED_ERROR); - return SL_STATUS_OK; + return client_socket_id; } else { status = sli_si91x_send_socket_command(si91x_client_socket, SLI_WLAN_REQ_SOCKET_ACCEPT, diff --git a/examples/si91x_soc/peripheral/sl_si91x_pcm_secondary/pcm_secondary_example.c b/examples/si91x_soc/peripheral/sl_si91x_pcm_secondary/pcm_secondary_example.c index ac4a2e464..320deb0e4 100644 --- a/examples/si91x_soc/peripheral/sl_si91x_pcm_secondary/pcm_secondary_example.c +++ b/examples/si91x_soc/peripheral/sl_si91x_pcm_secondary/pcm_secondary_example.c @@ -128,7 +128,7 @@ void pcm_example_process_action(void) do { // Delay added to synchronize secondary receive with primary transmission. for (int i = 0; i < 11000; i++) { - __asm("nop"); + __NOP(); } if (sl_si91x_pcm_receive_data(pcm_handle, pcm_secondary_data_in,