it seems in the STM32Cube_FW_L1_V1.8.1 in Drivers/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal_flash_ex.c there is a typo in the parameter guarding.
in line 811:
HAL_StatusTypeDef HAL_FLASHEx_DATAEEPROM_Erase(uint32_t TypeErase, uint32_t Address)
HAL_StatusTypeDef status = HAL_OK;
/* Check the parameters */
should be: IS_TYPEERASEDATA()
to STM team:
- can you confirm this typo?