Other Parts Discussed in Thread: CC2650
Hey,
I am developing a project based on simpleBLEperipheral.
I am communicating with UART to another MCU, while I am sure about the byte which are sent from the other MCU to out CC2650 (CCS) by debugging from the other MCU debug environment and via monitoring the RX line to the CC2650 UART to the PC,
I see that some of the received bytes, the most significant bit in them are captured as logic one while it is zero (monitored for sure with PC and the other MCU debug mode).
for example it receives 0x00 as 0x80! or 0x7F as 0xFF!
maybe it is really captured by hardware of the CC2650 module as logic one? or can be that the array is overwritten because issues of memory leak?!
I have a periodic event that I am managing my application using it, and I restart the counter of the periodic event only at the end of the content of the periodic task.
at the first time I enter the task I am initializing the UART :
UART_Params_init(&SbpUartParams);
SbpUartParams.baudRate = 256000;//57600;//115200;
SbpUartParams.writeDataMode = UART_DATA_BINARY;
SbpUartParams.readDataMode = UART_DATA_BINARY;
SbpUartParams.readReturnMode = UART_RETURN_FULL; // Unblock/callback when buffer is full
SbpUartParams.readEcho = UART_ECHO_OFF;
SbpUartParams.readTimeout = 1500;//15;
SbpUartHandle = UART_open( CC2650_UART0, &SbpUartParams );
and I am writing and reading like that:
// Send the UART message
ret_value = UART_write( SbpUartHandle, UART_Tx_Arr, i );
if( ret_value == i )
{
ret_value = UART_read( SbpUartHandle, UART_Rx_Arr, ReceivedPacketLength );
}
I really receive the expected number of bytes but sometimes as I mentions I have the Most significant bit in some of the bytes as logic one while it is really zero!!
maybe something with configuring start/stop bit should be configured otherwise?
I am sending 4 bytes and receive 73 bytes.
how can I solve this problem?
Thanks.