PSOC 6 SMIF

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
ShAm_4016726
Level 1
Level 1
5 replies posted 5 sign-ins First reply posted

Hi,

I would like to be able to configure the external flash on PSOC 6 BLE PIONEER KIT for both XIP as well as be able to write data (logging data during runtime) to this external flash.

Configure specific sector or region? of the external flash for XIP.

Configure another sector or region? for writing data on this external flash.

I have used CE224285_XIP code example and XIP is working with no issue.

I can also change the mode via Cy_SMIF_SetMode(SMIF_HW, CY_SMIF_MEMORY) to CY_SMIF_NORMAL. and can write data with no issue.

However, my question is how can I configure one sector for XIP and another sector for data writing?

Any help is greatly appreciated.

Regards

Shahram Amini

0 Likes
1 Solution

Hi Shahram,

Apologies for the delay. I discussed your query internally and this is what we found -

It is not possible to simultaneously perform transfers in Memory and normal mode. There can be memories supported in memory and normal mode, that co-exist as slaves. But the user code will have to switch between the modes before addressing the respective memories.

Hope this answers your question.

Regards,

Apurva

View solution in original post

0 Likes
4 Replies
Apurva_S
Moderator
Moderator
Moderator
100 likes received 500 replies posted 250 solutions authored

Hi Shahram,

Are you interested in knowing the capabilities/limitations of the flash on the pioneer kit or are you looking for a code example for your requirement?

- Apurva

0 Likes

Hi Apurva,

Code example will be great.

I already have code example in CE224285 code example.

I believe I have understood the concept of XIP and its usage.

I also see how the flash is used on pioneer kit to do XIP as well as flash read/write in that example.

My question is that how can I specify a specific sector or region? for XIP and another specific sector for flash read/write.

Currently, my intention is to use

Cy_SMIF_SetMode(SMIF_HW, CY_SMIF_NORMAL) before any normal flash read/write and then set it to Cy_SMIF_SetMode(SMIF_HW, CY_SMIF_MEMORY)  to access XIP throughout my code.

I don't see an issue with above, I just want to avoid flipping back/forth between MEMORY and NORMAL mode by permanently designating specific sector or region? for XIP.

In the ld file, there is the following entry

xip               (rx)    : ORIGIN = 0x18000000, LENGTH = 0x4000000     /* 64 MB */

I was hoping that I can change the ORIGIN and LENGTH to smaller size for XIP and use the remainder for normal mode.

When I reduced it and did a read/write to flash outside of the xip range, it failed but succeeded when I set the mode to normal.

It looks to be that the entire flash goes to XIP mode rather than smaller size.

Is my question above make sense? to be able to set only a specific sector or region? for XIP?

Note I have both the SMIF and the specific pioneer kit flash documentation and reading it. any pointer there will be helpfull as well.

Thank you in advance,

Shahram Amini

0 Likes

Hi Shahram,

Apologies for the delay. I discussed your query internally and this is what we found -

It is not possible to simultaneously perform transfers in Memory and normal mode. There can be memories supported in memory and normal mode, that co-exist as slaves. But the user code will have to switch between the modes before addressing the respective memories.

Hope this answers your question.

Regards,

Apurva

0 Likes

Hi Apurva,

Many thanks for follow up and guidance.

Regards

Shahram Amini

0 Likes