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.
Right I had already added the missing statements. I found my problem yesterday, apparently the 3.3V and 2.5V pins don't work or don't supply enough current. I was able to make it work by connecting my UART module to an external power supply.
Should I initialize the power pins on the gateway, or is there a max current that can be supplied by it?
I found the way while looking at the definition of SDCardDriver_Init(). The following statement enables the 2 power pins on the gateway:
as I understand you try to supply an additional external UART module to receive the data from the XDK. Am I right so far?
If this is the case it depends on the power consumption of your module. The 3.3 V and 2.5 V pins have a maximum output of 100 mA. If your UART module requires a greater amount of supply current, your choice using an external supply source should be the way to go. Otherwise you can use them and activate via PTD_pinModeSet() as you already mentioned.
Please tell me if this helps you and do not hesitate to ask if you have further questions.
You're correct. My module draws up to 50 mA every few minutes so it is fine.
Thanks for your help!
I am glad to hear that this fits for your purpose.
Please do not hesitate to ask if you have further questions.