- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I'm using WICED Studio 6.2 and have a working audio gateway profile in a CYBT-343026 module, this is controlled from an MCU over the HCI UART (at 2048000 baud) this all works fine.
We now want to attached something to the peripheral SPI on the CYBT-343026 but as soon as I enable the PSPI the HCI UART stops working. In one case where the HCI UART is sending out a WICED_BT_TRACE when the PSPI is enabled (just after the trace call) the end of the trace is corrupted with three 0x19 bytes.
The code to initialise the PSPI looks like this:
#define PSPI_FREQ_HZ 1000000
#define PSPI_CS WICED_P36
// SPI1 master mode
wiced_hal_gpio_configure_pin(PSPI_CS, GPIO_OUTPUT_ENABLE, GPIO_PIN_OUTPUT_HIGH);
wiced_hal_pspi_init(SPI_MASTER_ROLE, INPUT_PIN_FLOATING, MASTER1_P24_CLK_P27_MOSI_P25_MISO,
PSPI_FREQ_HZ, SPI_MSB_FIRST, SPI_SS_ACTIVE_LOW, SPI_MODE_3, PSPI_CS);
Is there anything else that needs to be done?
Is this known to work on this module with this version of WICED Studio?
Thanks
Nigel
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi NiPa_3775556 ,
Please note SPI and HCI UART can not be used simultaneously since they share a hardware fifo.
You can use only one at a time.
Regards,
Anjana
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Nigel,
Please have a look at SPI example for CYW20706
For CYBT-343026, select P26 as CS pin. Choose the pins as P36, P00 and P25 resp. while calling pspi init API and check if it works.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Thanks for the link, but even if I try the same pin config (can't use this in final system as P0 is being used for I2S_WS) the same thing happens. The HCI UART (not PUART) produces some corrupted bytes. The baud rate of the bad bytes are consistent with what the HCI port should be using but the values are 0x19 (rather than some ASCII text in this case).
Any other ideas?
Thanks
Nigel
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Nigel,
I know this is an old post but have you got it to work ? I am using CYBT-353027 and have encountered the same problem.
Best,
Christophe
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Christophe,
Sorry no, we've not managed to get this to work. My guess is that there is something wrong in the firmware for this device. At some point I may get time to try the newer version of WICED Studio to see if that helps but not any time soon.
Cheers
Nigel
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi NiPa_3775556 ,
Please note SPI and HCI UART can not be used simultaneously since they share a hardware fifo.
You can use only one at a time.
Regards,
Anjana
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Anjana,
Thanks, good to know. Is there a document somewhere that mentions what peripherals can't be used at the same time?
Thanks
Nigel
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi NiPa_3775556 ,
Unfortunately its not documented. I will request internally to mention this point in the datasheet.
Sorry for the inconvenience.
Regards,
Anjana
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi AnjanaM_61, NiPa_3775556, and ChCl_3198336,
Thanks for posting this question and answer. It helped me out.
Is there a way to de-init the SPI bus? The API doesn't appear to have a de-init function. My SPI bus is acting as a master.
I'm assuming to de-init the HCI Uart you can just:
wiced_set_debug_uart( WICED_ROUTE_DEBUG_NONE );
Thanks,
Rob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi RoHe_4796991 ,
Can you please confirm which chip are you using?
It will be great if you can create a new thread. As this is an old thread, it will be difficult for us to track.
Can you please create a new thread with further details.
Regards,
Anjana
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi AnjanaM_61
I have created a new post here:
HCI Uart and Spi don't work at the same time
Thanks,
Rob