RT1170 FlexSPI A & B port enable in same time example

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

RT1170 FlexSPI A & B port enable in same time example

2,106 Views
kwf
Contributor III

Hi Community

My customer for some reason need to use FlexSPI to communicate his device with FlexSPI port A and port B.

Search SDK Example, only FlexSPI communicate QFlash example through FlexSPI Port A.

After Study example, FLEXSPI_SetFlashConfig can configure FlexSPI output thought port A or port B, Is there possible output port A "and" port B.

I notice that Octal Flash on EVB board. It's there have Octal Flash example without XIP way? Just like evkmimxrt1170_flexspi_nor_edma_transfer_cm7 example use FlexSPI API.

thanks for your time to read.

0 Kudos
10 Replies

2,102 Views
jeremyzhou
NXP Employee
NXP Employee

Hi,
Thank you for your interest in NXP Semiconductor products and for the opportunity to serve you.
1) Is there possible output port A "and" port B?
-- Actually, I'm not very clear with your question, whether you want the FlexSPI's port A and port B to connect an external QSPI flash respectively, and one is a boot device and another one is data flash.
If yes, it's available to make it, I'd also suggest you refer to the application note to do it.
Have a great day,
TIC

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos

2,093 Views
kwf
Contributor III

Hi jeremyzhou 

Thanks for your reply.

In fact, It is not flash, it's communication with toner cartridge.

For reasons outlined above, We need operate FlexSPI like LPSPI.

Currently, I saw the SDK example the function FLEXSPI_TransferEDMA, It can send message through A port or B port by parameter flexspi_transfer_t.port.

But in the enum _flexspi_port , there are A1, A2, B1, B2, PortCount,  seems can not send message both A and B port.

The communicate architecture as below.

kwf_0-1625457628675.png

 

Is it possible send message through A "and" B port? 

And I will study the document that you provide.

 

Tags (1)
0 Kudos

2,073 Views
kwf
Contributor III

Hi jeremyzhou 

So, NXP doesn't provide API for this case?

 

Tags (1)
0 Kudos

2,068 Views
jeremyzhou
NXP Employee
NXP Employee

Hi,
Thanks for your reply.
Until now, there's no quad-data transmit transfers demo project based on the LPSPI module in the SDK library, however, you can adapt the APIs in the fsl_lpspi.c to make it and it's not hard to do that.
Have a great day,
TIC

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

 

0 Kudos

1,977 Views
kwf
Contributor III

Hi Jeremyzhou

I try to modify the example "evkmimxrt1170_flexspi_nor_polling_transfer_cm7" on RT1170 EVB with SDK Ver. 2.9.2.

But I got a problem, the FlexSPI2 Port B did not work.

I try to used FlexSPI1 Port B to make sure my code correct, and FlexSPI1 Port B is work correct.

But the same code modify to FlexSPI2, the port B is not work.

Is there some thing I don't know need to configure?

I attachment my code, if you need. 

 

0 Kudos

1,959 Views
jeremyzhou
NXP Employee
NXP Employee

Hi,
Thanks for your reply.
I was wondering if you can illustrate what modification you did with the evkmimxrt1170_flexspi_nor_polling_transfer_cm7 demo to make FlexSPI2 port B work.
BR,

Have a great day,
TIC

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos

1,936 Views
kwf
Contributor III

Hi

I modified as below

1.define EXAMPLE_FLEXSPI from FLEXSPI1 to FLEXSPI2

2.define EXAMPLE_FLEXSPI_AMBA_BASE from FlexSPI1_AMBA_BASE to FlexSPI2_AMBA_BASE

3.define EXAMPLE_FLEXSPI_CLOCK from kCLOCK_Flexspi2 to kCLOCK_Flexspi1

4. Config FlexSPI2 clock in flexspi_clock_init 

CLOCK_SetRootClockDiv(kCLOCK_Root_Flexspi2, 2);
CLOCK_SetRootClockMux(kCLOCK_Root_Flexspi2, 0);

5.Add flash configuration port B in flexspi_nor_flash_init

FLEXSPI_SetFlashConfig(base, &deviceconfig, kFLEXSPI_PortB1);

6.Send command  as below 

flashXfer.deviceAddress = 0;
flashXfer.port = kFLEXSPI_PortB1;
flashXfer.cmdType = kFLEXSPI_Command;
flashXfer.SeqNumber = 1;
flashXfer.seqIndex = NOR_CMD_LUT_SEQ_IDX_ERASECHIP;

status = FLEXSPI_TransferBlocking(EXAMPLE_FLEXSPI, &flashXfer);

7.Configure pin through flexSPI2 pin through Pin MCUXpresso config tool

I was attached my code in previous reply, if you need to know the detail.

0 Kudos

1,704 Views
krishnad
Contributor II

Hi @kwf ,

 

Could you pls share information on how did you interface/connect to FlexSPI1-B or FlexSPI2-A or FlexSPI2-B on RT1170 board?

 

I need to connect a FPGA(FlexSPI slave) device in quad mode to any of the FlexSPI ports (FlexSPI1-B or FlexSPI2-A or FlexSPI2-B) on RT1170 board. I am facing difficulities trying to look out for the exposed FlexSPI ports  & chipselects which i can use to interface FPGA slave device.

 

Thanks in advance for the help.

-Krishna

0 Kudos

1,636 Views
kwf
Contributor III

Hi Krishna

My customer was change to other platform MCU, so I did not work on this question.

And the question was not solve.

Sorry to bring you bad news!

0 Kudos

2,088 Views
jeremyzhou
NXP Employee
NXP Employee

Hi,
1) Is it possible send message through A "and" B port?
-- Yes, however, in my opinion, it's not a good idea to use the FlexSPI module to implement the SPI transmit, I think the LPSPI may be a better option.
Have a great day,
TIC

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

Hi,
1) Is it possible send message through A "and" B port?
-- Yes, however, from my opinion, it's not a good idea to use the FlexSPI module to implement the SPI transmit, I thik the LPSPI maybe a better opition.
Have a great day,
TIC

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos