cancel
Showing results for 
Search instead for 
Did you mean: 

Do I need EXTI?

Ala
Senior
16 REPLIES 16

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:

PKvac.1185
Associate II
  1. Make buffer:

#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);

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

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".

I tried this method that you mentioned above, line by line. still no results...:sad_but_relieved_face:

I think problem is not here. If you'd give GitHub reference on the project, i will spend some time loking for bug.

Ala
Senior

can I send you the whole document by email?