Using memory mapped external memories with SMIF on TraveoII

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

cross mob
sobuc_3832691
Level 1
Level 1
First question asked Welcome!

Hello,

I have a question related to memory mapping and how it works in case of writing data.

Assuming I have a serial flash connected to the SMIF peripheral, as I understand it's no problem to use the XIP mode to read data. However, for writing data I heard that using XIP is not possible because the writing implies 2 SPI commands sent to the serial flash: WREN and the write command.  

What about the same situation, but with an FRAM connected instead of serial flash? The FRAM also needs the WREN command before being able to write anything. I am not sure if there's any difference.

The question is can we use memory mapping to write data to external memory? Will the SMIF know to convert the write data instruction into the 2 SPI commands and send them to the external memory?

Thank you!

Sorin

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

Hi @sobuc_3832691 

Could you please tell me the part number of the Traveo T2G device which you are planning to use?

Regards.

0 Likes
JJack
Level 5
Level 5
Associated Partner - Distributor Rutronik
5 questions asked 25 likes received 100 sign-ins

Hi sobuc_3832691,

maybe my answer is completely wrong (I have absolutely no experience with SMIF) but I give it anyway.

Please look at this register (SMIF_DEVICE_WR_CMD_CTL):

JJack_1-1648721188542.png

It enables to give 2-byte (16-bit) commands. What if you set  CODEH = 06H (WREN) and CODE to the value of the actual write command you want the flash device to execute?

CODEH will be transmitted first (WREN) immediately followed by the flash manipulation (e. g. write) command.

 

 

0 Likes