AnsweredAssumed Answered

i2c example stm32f103 data transfer format

Question asked by mechielsen.thomas on Mar 20, 2015
Dear all,

I am new to stm32 and i am trying to make my stm32f103 nucleo communicate with an other stm32f103. within the cubef1 is a nice working example: I2C_TwoBoards_ComIT
i have only 1 problem with this part of the code:

  /* While the I2C in reception process, user can transmit data through "aTxBuffer" buffer */
uint8_t aTxBuffer[] = "I send this";
while(HAL_I2C_Master_Transmit_DMA(&I2cHandle, (uint16_t)I2C_ADDRESS, (uint8_t*)aTxBuffer, TXBUFFERSIZE)!= HAL_OK)
    /* Error_Handler() function is called when Timeout error occurs.
       When Acknowledge failure occurs (Slave don't acknowledge its address)
       Master restarts communication */
    if (HAL_I2C_GetError(&I2cHandle) != HAL_I2C_ERROR_AF)

however the only data you send over the i2c lines are text converted to binary, which means you cant send all sorts of bytes.
is there a way to make the format of data I send to hexadecimal or decimal?