Hi,
I have searched for it in this forum but couldn´t get enough help in the existing topics.
I am using an OLP425 device from connectBlue, that has the cc2540 chip integrated, and I want to add an additional sensor that communicates with the chip over spi. The sensor data shall be sent out via bluetooth to an iPad.
In http://e2e.ti.com/support/low_power_rf/f/538/p/230636/852356.aspx it was recommended to use _hal_uart_spi.c, which is my intention now.
Investigating the code I found:
#if !defined HAL_UART_SPI
#define HAL_UART_SPI 2
#elif (HAL_UART_SPI != 2)
#error Only supporting HAL_UART_SPI==2 for now.
#endif
and later:
#if (HAL_UART_SPI == 1)
#define UxCSR U0CSR
#define UxUCR U0UCR
#define UxDBUF U0DBUF
#define UxBAUD U0BAUD
#define UxGCR U0GCR
#elif (HAL_UART_SPI == 2)
#define UxCSR U1CSR
#define UxUCR U1UCR
#define UxDBUF U1DBUF
#define UxBAUD U1BAUD
#define UxGCR U1GCR
#endif
Does that really mean that I can´t work with HAL_UART_SPI==1? In other words do I have to use USART1? I´d rather want to use USART0 SPI alt. 1 configuration since that configuration is suggested by connectBlue and the pins are still available for me.
It´s also very appreciated if you have tips for me that help me get along with the spi implementation. Is _hal_uart_spi.c everything I need? I am pretty new to this and a step by step overview, what to do, could really help me a lot.
I hope my questions are clear enough, if not please ask.
Thank you in advance.
Daniel Reichelt