- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I would like to use the Pmod SPI 6x1 connector on my PSoC6 WiFi BT Prototyping Kit (CY8CPROTO-062-4343W). According to the Schematics and the Board's silkscreen, the SPI_SEL is P5_7. However, I've tried to use the configuration (MOSI=P5_0, MISO=P5_1, CLK=P5_2, SEL=P5_7) in my code, and it doesn't work. The SEL pin that actually works is P5_3.
I have tried the MTB 2.2 Device Configurator and found that SCB5 offers a choice of SEL, namely: SS0=P5_3, SS1=P5_4, SS2=P5_5, SS3=P5_6. There isn't a P5_7 option!
Could you advise if the board's Pmod SPI connector is erroneous? Or is there another way to configure the SW to use P5_7?
Thanks!
Best Regards,
Stan
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello StLe_4753786
You are not able to see the SPI_SEL as P5_7 because you are using Serial communication Block 5 (SCB 5) which uses P5_3 as slave select line. In case of PSoC 6 there are multiple serial communication blocks that can be configured as SPI, UART, etc. Each block has a sets of pins that is used to configure the block.
If you want to use the SPI_SEL as P5_7 then you need to use the Serial Communication Block 3 (SCB 3) as shown in the image below.
You can refer to the PSoC 6 datasheet Pinouts section for information on pins for each of the SCBs
Please let me know if switching the SCB helps to resolve the issue.
Thanks and Regards
Ekta
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello StLe_4753786
You are not able to see the SPI_SEL as P5_7 because you are using Serial communication Block 5 (SCB 5) which uses P5_3 as slave select line. In case of PSoC 6 there are multiple serial communication blocks that can be configured as SPI, UART, etc. Each block has a sets of pins that is used to configure the block.
If you want to use the SPI_SEL as P5_7 then you need to use the Serial Communication Block 3 (SCB 3) as shown in the image below.
You can refer to the PSoC 6 datasheet Pinouts section for information on pins for each of the SCBs
Please let me know if switching the SCB helps to resolve the issue.
Thanks and Regards
Ekta
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Ekta,
Thanks a lot for your reply. Since the Pmod SPI is using pins from SCB5 (P5_0, P5_1 and P5_2) and SCB3 (P5_7). Would that mean both SCB have to be selected in the Device Configurator? Then I wouldn't be able to use SCB3 for something else, like another SPI or I2C?
Thanks and Best Regards,
Stan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Stan,
In case you want to use two SCBs one for SPI (say SCB 5) and one for something else SPI or I2C (say SCB 3), then is possible for you to use the pins that are assigned for SPI function in that SCB, i.e. in case of SCB 5 you can use the pins P5_0 for MOSI, P5_1 for MISO P5_2 for CLK and P5_3/4/5/6 for SPI select.
Similarly for the other SCB you can use the pins assigned to that SCB for the particular functionality.
Is there any specific reason why you want to use the Pmod SPI Header?
Best Regards
Ekta
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Ekta,
I'm designing a shield and wanted to use a standard connector. The Pmod SPI seems like a logical choice. But from your reply, it seems the board designer hadn't made the 6x1 connector easy to use with the Device Configurator.
I have found that it is possible to get cyhal_spi_init(P5_0, 5_1, 5_2 and 5_7) working after all. My earlier troubles with this code was probably due to a bad wire connection. However, I think the Device Configurator would be necessary if I want DMA with SPI, right?
Another pain point: I had to avoid P5_0 and P5_1 in cy_retarget_io_init(), which means I cannot get Printfs over the debug USB cable. Is there a way I can still get debug USB to work (without needing another UART/USB to Serial cable)?
Thanks!
Best Regards,
Stan