RE: Sending data via UART
응답
16. 8. 4 오후 4:48 as a reply to Garret Holt.

Hello Garret,

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

0 (0 투표)
RE: Sending data via UART
응답
16. 8. 5 오전 7:34 as a reply to Franjo Stjepandic.

Hi Franjo,

 

Thanks for the reply. So can the buffer just any spot in memory allocated for the data such as

uint32_t txbuffer[5], rxbuffer[5];

 

Garret

0 (0 투표)
RE: Sending data via UART
응답
16. 8. 7 오후 12:39 as a reply to Garret Holt.

Hello Garret,

yes you are correct. The buffer should work fine with the posted code.

Please don't hesitate to ask, if you have further questions.

Kind regards,
Franjo

0 (0 투표)
RE: Sending data via UART
응답
17. 2. 16 오후 2:32 as a reply to Franjo Stjepandic.

Hello guys,

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.

Any idea?

Thanks,

Aurelien

0 (0 투표)
RE: Sending data via UART
응답
17. 2. 16 오후 7:02 as a reply to Aurelien Lequertier.

Hello Aurelien,

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.

#include "PTD_portDriver_ih.h"
#include "PTD_portDriver_ph.h"
#include "SER_serialDriver_ih.h"
#include "em_cmu.h"

/** 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.

Kind regards,
Franjo

0 (0 투표)