Need help in fixing flash programming error

I am having an error in flash programming.
flash.program((uint32_t)&data, FLASH_DATA_ADDRESS, sizeof(SensorData));
error is Cannot initialize a parameter of type ‘const void *’ with an rvalue of type ‘std::uint32_t’ (aka ‘unsigned int’)

Need help in fixing it.

Hello,

because you did not share used API then i just suppose it is FlashIAP.
So a comparsion between what you use and what is in documentation

  • program((uint32_t)&data, FLASH_DATA_ADDRESS, sizeof(SensorData));
  • program (const void *buffer, uint32_t addr, uint32_t size)

So you use diferent data type probably and that lead to the error Cannot initialize a parameter of type ‘const void *’ with an rvalue of type ‘std::uint32_t’ (aka ‘unsigned int’)

BR, Jan