After some research, I think, that the problem is on my site. Copying binary file to F401 Nucleo with PGEEZ1 example makes it work properly. Compiling prepared project to F476 (there is no binary file to copy from ST) and adding some lines of code (for init and further testing) makes it work also. Here are the lines from main.c:
#include "main.h"
#include "app_x-cube-eeprma1.h"
/* Private includes ----------------------------------------------------------*/
/* USER CODE BEGIN Includes */
#include "m95p32.h"
#include "pgeez1_m95p32.h"
/* USER CODE END Includes */
/* Private typedef -----------------------------------------------------------*/
/* USER CODE BEGIN PTD */
/* USER CODE END PTD */
/* Private define ------------------------------------------------------------*/
/* USER CODE BEGIN PD */
/* USER CODE END PD */
/* Private macro -------------------------------------------------------------*/
/* USER CODE BEGIN PM */
/* USER CODE END PM */
/* Private variables ---------------------------------------------------------*/
SPI_HandleTypeDef hspi2;
/* USER CODE BEGIN PV */
uint8_t EEBuff[512];
uint8_t EEBuffRx[512];
uint16_t adress = 0;
int32_t retval32;
/* USER CODE END PV */
/* Private function prototypes -----------------------------------------------*/
void SystemClock_Config(void);
static void MX_GPIO_Init(void);
static void MX_SPI2_Init(void);
/* USER CODE BEGIN PFP */
/* USER CODE END PFP */
/* Private user code ---------------------------------------------------------*/
/* USER CODE BEGIN 0 */
/* USER CODE END 0 */
/**
* @brief The application entry point.
* @retval int
*/
int main(void)
{
/* USER CODE BEGIN 1 */
/* USER CODE END 1 */
/* MCU Configuration--------------------------------------------------------*/
/* Reset of all peripherals, Initializes the Flash interface and the Systick. */
HAL_Init();
/* USER CODE BEGIN Init */
/* USER CODE END Init */
/* Configure the system clock */
SystemClock_Config();
/* USER CODE BEGIN SysInit */
/* USER CODE END SysInit */
/* Initialize all configured peripherals */
MX_GPIO_Init();
MX_SPI2_Init();
// MX_EEPROM_Init();
/* USER CODE BEGIN 2 */
BSP_COM_Init(COM1);
while( PGEEZ1_M95P32_Init(PGEEZ1_M95P32_0)!= M95_OK); printf("\n\rInitiated ...");
retval32 = PGEEZ1_M95P32_WriteEnable(); printf("\n\rWrite Enabled...");
retval32 = PGEEZ1_M95P32_WritePage(0, EEBuff, adress, 512); printf("\n\rWrite OK ...");
retval32 = PGEEZ1_M95P32_ReadPage(0, EEBuffRx, adress, 512); printf("\n\rRead ...");
for (int i = 0; i<512; i++) if (EEBuff[i] != EEBuffRx[i]) printf("\n\rERROR");
printf("\n\rRead OK ...\n\r");
/* USER CODE END 2 */
/* Infinite loop */
/* USER CODE BEGIN WHILE */
while (1)
{
/* USER CODE END WHILE */
//MX_EEPROM_Process();
/* USER CODE BEGIN 3 */
}
/* USER CODE END 3 */
}
So - I the issue is solved.