3 Replies Latest reply on Jun 5, 2020 8:54 AM by RavikiranH_01

    Questions Regarding the SMIF Block on PSoC 6 BLE.


      Hello. I am getting started with a project using the PSoC 6 board. I would like to learn more about two functions of the SMIF block


      First, how do I use the block in execute in place/XIP/memory mode? I saw in the documentation a few short lines for setting up that mode, but doing that still won't allow me to write to the RAM. 


      Second, how do I use the built in cryptography functionality of this block? I see that when using the SMIF Configuration tool that it adds the "CY_SMIF_FLAG_CRYPTO_EN" to the memory configuration, but alone doesn't seem to be enough.


      For background, I have booted up the CE220823 SMIF_Memory_Write_and_Read_Operation sample project, but it doesn't use the cryptography and it uses the "normal" mode rather than the XIP mode.


      Any assistance would be greatly appreciated.

        • 1. Re: Questions Regarding the SMIF Block on PSoC 6 BLE.


          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.

          1 of 1 people found this helpful
          • 2. Re: Questions Regarding the SMIF Block on PSoC 6 BLE.



            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_SysInt_Init(&smifIntConfig, SMIF_Interrupt_User);

            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);

            Cy_SMIF_Enable(SMIF_1_HW, &SMIF_1_context);


            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.

            • 3. Re: Questions Regarding the SMIF Block on PSoC 6 BLE.

              That was extremely helpful answer.


              Thank you