Community news, upcoming events and general discussions
Threads: 36 Posts: 88
Get technical support from the community
Threads: 1427 Posts: 7608
Threads: 18 Posts: 64
Tell us how to make XDK better!
Threads: 36 Posts: 119
Share and discuss community member projects
Threads: 81 Posts: 350
you can find the definition of init.txBuf_p in the UART interface SER_serialDriver_ih.h. It defines a pointer to a buffer that holds the bytes that are transmitted. serialTxBuffer is defined by Jürgens application and is used as the required buffer.
Kind regards, Franjo
Thanks for the reply. So can the buffer just any spot in memory allocated for the data such as
uint32_t txbuffer, rxbuffer;
yes you are correct. The buffer should work fine with the posted code.
Please don't hesitate to ask, if you have further questions.
I've been trying to use the UART ports on the XDK gateway but I'm still struggling to send anything. My code runs but nothing is received on the other end.
I noticed one thing though when I try the UART example here: http://xdk.bosch-connectivity.com/xdk_docs/html/_x_d_k__e_x_t_e_n_s_i_o_n__b_u_s__g_u_i_d_e.html
the value SER_UART1 is seen as undeclared, I have to use the enum value instead to bypass it, but there maybe a link with my UART not working. I have included "SER_serialDriver_ih.h" and when I mouse over the SER_UART1 line in this file, the enum value is correctly displayed.
I checked the example of the XDK extension guide and observed that there some include parts and variable declarations missing.
I recommend to include the following code snippet above the extension guide code and try it once again.
/** creating the serial Instance for future reference */
static SER_device_t uartHandle;
/* Transmit Buffer size for USART Ringbuffer */
#define TX_BUFFER_SIZE (UINT8_C(20))
/* Receive Buffer size for USART Ringbuffer */
#define RX_BUFFER_SIZE (UINT8_C(20))
/** Serial transmit buffer for ringbuffer */
static uint8_t ser2TxBuf_ma[TX_BUFFER_SIZE];
/** Serial receive buffer for ringbuffer */
static uint8_t ser2RxBuf_ma[RX_BUFFER_SIZE];
Please tell me if this helps you to get your implementation running and do not hesitate to ask if there is anything unclear.