cancel
Showing results for 
Search instead for 
Did you mean: 

Smart Bluetooth

joki_2146851
New Contributor II

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!

0 Likes
1 Solution
ArvindS_76
Employee

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);

View solution in original post

0 Likes
2 Replies
ArvindS_76
Employee

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);

View solution in original post

0 Likes
joki_2146851
New Contributor II

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,

0 Likes