I am working with a PSoC 4100S Plus device. I need to write a struct to the flash. My struct is as follows-
static debug_state debug_data;
During the run of the program, I will be filling in the struct with values. And at the end of the test run, I need to write this struct 'debug_data' to Flash memory. I understand I have to use the function CySysFlashWriteRow, but I am unable to figure out how to calculate the flash row number and how to pass the struct data to the function. Can someone help me with this?
Take a look at em_EEPROM component. It has very easy API for writing data to the flash.