To use a specific memory slave in an XIP mode you have to select the memory mapped field corresponding to the memory in the SMIF configuration tool. This will set the corresponding FLAG bit (CY_SMIF_FLAG_MEMORY_MAPPED) to the memory config structure. If you intend to write to this memory in XIP mode, which I believe you want to do in RAM use case, set up the write enable bit also. Once these settings are made you need to call Cy_SMIF_Memslot_Init(). Which will initialize the registers required for the XIP operation of the selected memory.
The SMIF block works either in a "normal" mode or "XIP" mode. you will need to set the SMIF mode to XIP using the Cy_SMIF_SetMode(SMIF0, CY_SMIF_MEMORY); This will set hte SMIF block to work in the XIP mode. But before you change the mode to XIP, the memory needs to have been initialized with right commands to read and write using the commands that were specified. The XIP will only be able to send read and write commands.
For encryption in XIP mode, please use the same steps as described above. after having set the encryption enabled in the tool.
Thank you for responding. I sort of understand, but I still don't have it working. In 'normal' mode, to initialize the device in the sample SMIF project, the following is done:
Cy_SMIF_Init(SMIF_1_HW, &SMIF_1_config, TIMEOUT_1_MS, &SMIF_1_context);
Cy_SMIF_SetDataSelect(SMIF_1_HW, CY_SMIF_SLAVE_SELECT_0, CY_SMIF_DATA_SEL0);
If I understand your post, that would mean I need to do these functions and then do Cy_SMIF_SetMode(SMIF_1_HW, CY_SMIF_MEMORY);
This isn't correct though. Do I need do something different to initialize the device before setting the mode? You mention a Memslot_Init function, but that isn't used in the SMIF_Memory_Write_and_Read_Operation sample project.