- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am trying to set up two Q-SPI Interfaces on my PSoC6 (Dev. Board: CY8CPROTO-062-4343W PSoC6).
One SPI should be initialized in Quad-Mode and the second SPI in Single-Mode. The "Quad-Mode-SPI" works fine but initializing the "Single-Mode-Spi" returns a "pin-related-Error".
This is how i initialized the "Quad-Mode"-QSPI. Everything works fine.
#define dataSpi_Io0 (P11_6)
#define dataSpi_Io1 (P11_5)
#define dataSpi_Io2 (P11_4)
#define dataSpi_Io3 (P11_3)
#define dataSpi_Clk (P11_7)
#define dataSpi_SS (P12_4)
[...]
cyhal_qspi_t qspi;
result = cyhal_qspi_init(&qspi, dataSpi_Io0, dataSpi_Io1, dataSpi_Io2, dataSpi_Io3, NC, NC, NC, NC, dataSpi_Clk, dataSpi_SS, 1000000, 0);
This is how i initialized the "Single-Mode"-QSPI. The code results in a "Pin-Realted Error" (CYHAL_QSPI_RSLT_ERR_PIN)
#define ctrlSpi_Mosi (P6_0)
#define ctrlSpi_Miso (P6_1)
#define ctrlSpi_Clk (P6_2)
#define ctrlSpi_SS (P6_3)
[...]
cyhal_qspi_t spi;
result = cyhal_qspi_init(&spi, ctrlSpi_Mosi, ctrlSpi_Miso, NC, NC, NC, NC, NC, NC, ctrlSpi_Clk, ctrlSpi_SS, 1000000, 0);
Any ideas on how to fix that?
Marius
Solved! Go to Solution.
- Labels:
-
ispn:40047:1:0
-
l1:314:1:0
-
PSoC6MCU
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello @MB ,
The reason it fails is because the pins P6_0, P6_1, P6_2, P6_3 are not valid SMIF pins. You can see in the below figure that they do not connect to the SMIF block, there's no mention.
Please change the code to this:
#define ctrlSpi_Mosi (P12_0)
#define ctrlSpi_Miso (P12_1)
#define ctrlSpi_Clk (P11_7)
#define ctrlSpi_SS (P11_2)
You have other options too. Please see the below figure to understand which pins are available and what functionalities they represent.
You can find this information in the datasheet here on page#34. With these changes you should be able to get it to work. Let me know your observations.
Regards,
Dheeraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello @MB ,
The reason it fails is because the pins P6_0, P6_1, P6_2, P6_3 are not valid SMIF pins. You can see in the below figure that they do not connect to the SMIF block, there's no mention.
Please change the code to this:
#define ctrlSpi_Mosi (P12_0)
#define ctrlSpi_Miso (P12_1)
#define ctrlSpi_Clk (P11_7)
#define ctrlSpi_SS (P11_2)
You have other options too. Please see the below figure to understand which pins are available and what functionalities they represent.
You can find this information in the datasheet here on page#34. With these changes you should be able to get it to work. Let me know your observations.
Regards,
Dheeraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hey @DheerajK_81 ,
i changed the Pin-Assignment in my code as you suggested and everything is working fine now. Thanks a lot!
Regards,
Marius