Skip to main content
Associate
December 11, 2025
Solved

STM32WL55-NUCELO-EVK - Flash Error -6 "FLASH_IF_PARAM_ERROR" after "AT+CS"

  • December 11, 2025
  • 1 reply
  • 373 views

Hello Forum,

I upgraded my (alredy working) project, based on AT-Slave to the latest
STMCubeIDE: V2.0.0
STMCubeMX: V6.16.0
and STM32Cube_FW_WL_V1.4.0

My problem: suddenly I get Flash Error -6 "FLASH_IF_PARAM_ERROR" after "AT+CS".
Is this a know issue? Before, all worked and "AT+CS" stored well.

My Stack, derived from AT-Slave:

AT+VER=?
APPLICATION_VERSION: V1.4.0
MW_LORAWAN_VERSION: V2.6.2
MW_RADIO_VERSION: V1.3.1
L2_SPEC_VERSION: V1.0.4
RP_SPEC_VERSION: V2-1.0.3


I think there might be some issue with the FLASH-IF-Driver? I also reconised in "lora_at.c" a missleading comment:
(it should be 256kBytes, not 128), whereas ADDRESS is right. 

/**
 * @brief LoRaWAN NVM Flash address
 * @note last 2 sector of a 128kBytes device
 */
#define LORAWAN_NVM_BASE_ADDRESS ((void *)0x0803F000UL)


Thanks for any help,
Jo


Best answer by joembedded

Ok, problem located:
From STM32Cube_FW_WL_V1.3.1 to STM32Cube_FW_WL_V1.4.0 there is a change in lora_app.c, that is not documented and not handled by CubeMX: 

1.3.1:

if (FLASH_IF_Init(NULL) != FLASH_IF_OK) {
		Error_Handler();
}

1.4.0:

if (FLASH_IF_Init(FLASH_RAM_buffer) != FLASH_IF_OK) {
		Error_Handler();
}

 

1 reply

joembeddedAuthorBest answer
Associate
December 11, 2025

Ok, problem located:
From STM32Cube_FW_WL_V1.3.1 to STM32Cube_FW_WL_V1.4.0 there is a change in lora_app.c, that is not documented and not handled by CubeMX: 

1.3.1:

if (FLASH_IF_Init(NULL) != FLASH_IF_OK) {
		Error_Handler();
}

1.4.0:

if (FLASH_IF_Init(FLASH_RAM_buffer) != FLASH_IF_OK) {
		Error_Handler();
}