1 Reply Latest reply on Feb 24, 2020 7:31 PM by SAJO_1338106

    Writing a struct to Flash


      I am working with a PSoC 4100S Plus device. I need to write a struct to the flash. My struct is as follows-


      typedef struct


        uint32_t time;

        uint8_t  index;

        uint8_t  state;

      } debug_state;

      static debug_state debug_data[100];


      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?