Skip to main content
Sam Ho
Associate II
Apr 17, 2019 4:15 PM UTC
Question

SPBTLE-1S, GPIOs

Hello,

I am looking to prototype a project. I will need I2C, SPI and UART.  I2C for some ST sensors/gas gauge, SPI for sd card and UART for RS485.  Is it possible to use SPBTLE-1S, to run both host applications and bluetooth.  

Thanks for your help

This topic has been closed for replies.

2 replies

Sam Ho
Sam HoAuthor
Associate II
Apr 18, 2019 10:34 AM UTC

I am slightly confused by the datasheet.

https://www.st.com/resource/en/datasheet/spbtle-1s.pdf

The GPIOs can they be set at different modes. For example, can i set module pin 3/4 for UART_RX and TX, (mode 001) and at the same time use module pin 15, 16, 17, 18 for SPI (mode 100)

Thanks you

Winfred LU
ST Employee
Apr 22, 2019 3:04 AM UTC

Hi Sam,

Yes, it is possible.

Register MODE0 (offset 0x2C) is for IO0 - IO7, so to configure

  1. pin 3 (DIO4) and pin 4 (DIO5) to function UART (Mode 001) and
  2. pin 15 - 18 (DIO0 - DIO3) to function SPI (MOde 100)

please set MODE0 as below

set MODE0 = 0x00114444

Best Regards,

Winfred