Dear Sir
I am new in develop the firmware that related wit CSR1010 Chipset.
Currently I try to develope firmware related with the CSR1010 IC.
I need to know the methods and procedure for sending and receiving the 4 byte data through UART Port. The Byte data is in Hex code.
I already check the CSR uart example and it is mostly related with the ASCII code.
Can anyone help me regarding this matter
UART send just bytes. it sends one byte at the time. (8Bit)
HEX and ASCII are a human presentative of the value of that byte.
HEX is in a form 0xXY and Ascii as a character.
So, your assumption that the UART example sends "ASCII" is wrong. It sends bytes.
When you receive that bytes, fill a buffer with them and you will have 4 bytes. Buffer array of bytes or characters is 100% same.
You can call my Skype nissim.test
Hi Nissim Zur
1 message UART contain 4 bytes of data. I want to use the MILLISECOND ((TIME)(1000)) for create 2ms interval between 2 message.
I already add the time.h inside header folder.
Below is the firmware I wire.
*/
/* Display the first message */
const uint8 message[] = {0x02,0x42,0x00,0x23};
const uint8 message_len = (sizeof(message))/sizeof(uint8);
/* Add the first message to byte queue */
BQForceQueueBytes(message, message_len);
/*Delay 1ms*/
MILLISECOND ((2)(1000));
/*Display the second message*/
const uint8 message1[] = {0x02,0x42,0x00,0x23};
const uint8 message1_len = (sizeof(message1))/sizeof(uint8);
/* Add second message to byte queue */
BQForceQueueBytes(message1, message1_len);
Can you help me how I can make 2ms interval message?
Base on the Firmware above the error code show as below.
uartio.c: In function 'Start':
uartio.c:261: error: called object '2' is not a function
uartio.c:261: error: called object '1000ul' is not a function
Dear Sir
I already manage to sent 4 byte Uart communication from CSR1010 to another MCU.
1 message contain 4 byte data. Can I use MILLISECOND((TIME)(1000)) to create interval between 2 message data? If can how do I need to put this to my firmware.
In real time system, as in CSR1010, it is not allowed to make a close loop with delay.
Therfor I offer you to create a timer interrupt and send the 4 bytes in that interrupt service routine.
You can call my Skype nissim.test