2019-11-12 09:39 PM
2019-11-13 01:03 AM
sorry I don't get it...
as I turn every pictures to some Hex bytes, I do not use char variable. what should I do now???
and you mean 0x32 was just an address the whole time I've been working...:face_screaming_in_fear:
2019-11-13 01:13 AM
#define BUFFER_LENGHT 8
static uint8_t cPrnBuffer[BUFFER_LENGHT];
2. Fill buffer with data:
static void vPrnBufferFill(void){
uint16_t i;
for (i=0;i<BUFFER_LENGHT;i++) {
cPrnBuffer[i]=0x32;//for example
}
}
3. Send data:
HAL_USART_Transmit_DMA(&husart1,cPrnBuffer,BUFFER_LENGHT);
2019-11-13 01:36 AM
I had a buffer like that, but it doesn't work.
@Community member says that 0x32 is just an address!! and it is not interpreted as a HEX data...
2019-11-13 01:56 AM
That right, " (uint8_t*)0x32" is just a pointer to data, located in 0x32 address, but it is mistake. You need to send right pointer to function HAL_USART_Transmit_DMA(). For axample if you have data buffer "BUFFER_NAME[BUFFER_LENGHT]" send pointer to function with "BUFFER_NAME" or "&BUFFER_NAME[0]" instead of "(uint8_t*)0x32".
2019-11-13 05:15 AM
I tried this method that you mentioned above, line by line. still no results...:sad_but_relieved_face:
2019-11-13 06:06 AM
I think problem is not here. If you'd give GitHub reference on the project, i will spend some time loking for bug.
2019-11-16 01:07 AM
can I send you the whole document by email?