- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have been trying to configure and run the SPI_MASTER example, after several iterations I have been able to get it to run, but one problem that I am still having is that the Chip select signal I want to output (different board that I have done a layout on for a custom application), on Port 32 and Port 33, which happen to share the PUART configuration. I tried to disable the PUART by sending in the following structure:
BLE_PROFILE_PUART_CFG puart_cfg =
{
/*.baudrate =*/ 115200,
/*.txpin =*/ PUARTDISABLE | GPIO_PIN_UART_TX,
/*.rxpin =*/ PUARTDISABLE | GPIO_PIN_UART_RX,
}
This is what was shown in the example with SPI_MASTER. Where GPIO_PIN_UART_TX = 32, and GPIO_PIN_UART_RX = 33.
The problem is that I get no output from my Chip select setting that is on Port 32. If I change the Port config to another port (port 4 for example), then the signal output works as expected. I also changed the puart_cfg to use GPIO_PIN_UART_TX = 0, and GPIO_PIN_UART_RX = 2, But still no output on port 32. So it seems like the PUART is somehow being configured on these pins no matter what I do and is not allowing me to use GPIO on these pins. Please Help!
Solved! Go to Solution.
- Labels:
-
Peripherhal UART
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Don't use the puart config at all when registering your application create function.
bleapp_set_cfg((UINT8 *)gatt_database,
sizeof(gatt_database),
(void *)&app_cfg,
NULL, // Don't configure the puart.
(void *)&gpio_cfg,
app_create);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Don't use the puart config at all when registering your application create function.
bleapp_set_cfg((UINT8 *)gatt_database,
sizeof(gatt_database),
(void *)&app_cfg,
NULL, // Don't configure the puart.
(void *)&gpio_cfg,
app_create);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Indeed what was mentioned by arvinds above was correct. The actually problem I was also have in was related to user error -- I was using 1 based port instead of 0, so was trying to configure port 3, pin 0 instead of port2, pin 0.... I'm sure I won't be the only one to make this dumb mistake. Just something to look out for.
Thanks,