rosserial_stm32 icon indicating copy to clipboard operation
rosserial_stm32 copied to clipboard

Type mismatch error in STM32Hardware.h

Open tianyuZ opened this issue 2 years ago • 7 comments

https://github.com/yoneken/rosserial_stm32/blob/7ccaf5befb5c717982bec8659ce37ddf33b89b58/src/ros_lib/STM32Hardware.h#L107 Type mismatch,should be modified to HAL_UART_Transmit_DMA(huart, tbuf, twind);

tianyuZ avatar Sep 23 '22 08:09 tianyuZ

After looking at it in detail,The second half of message in case of tx bufferoverflow will not be transferred to the serial port through DMA because the first part of the buffer has not been transferred, so the previous logic is correct.

tianyuZ avatar Sep 23 '22 12:09 tianyuZ

Hello, I've read your reply about that problem...

That problem came to me and It occurs compile error..

Can I fix the line to this

HAL_UART_Transmit_DMA(huart, tbuf, twind);

?? Waiting for your reply, thanks

jaykorea avatar Sep 28 '22 07:09 jaykorea

After looking at it in detail,The second half of message in case of tx bufferoverflow will not be transferred to the serial port through DMA because the first part of the buffer has not been transferred, so the previous logic is correct.

What do you mean with previous logic? I suggested the second DMA transfer because of this problem -> https://github.com/yoneken/rosserial_stm32/pull/40

maxi-naeher avatar Sep 28 '22 12:09 maxi-naeher

After looking at it in detail,The second half of message in case of tx bufferoverflow will not be transferred to the serial port through DMA because the first part of the buffer has not been transferred, so the previous logic is correct.

What do you mean with previous logic?

I suggested the second DMA transfer because of this problem -> https://github.com/yoneken/rosserial_stm32/pull/40

Thanks for your information. Simply I have a issue that I cannot compile that line.(mentioned on issue #43) Compile error occurs in stm32f466re board, Firmware version 1.24.2

jaykorea avatar Sep 28 '22 17:09 jaykorea

After looking at it in detail,The second half of message in case of tx bufferoverflow will not be transferred to the serial port through DMA because the first part of the buffer has not been transferred, so the previous logic is correct.

What do you mean with previous logic? I suggested the second DMA transfer because of this problem -> #40

Thanks for your information. Simply I have a issue that I cannot compile that line.(mentioned on issue #43) Compile error occurs in stm32f466re board, Firmware version 1.24.2

Since @tianyuZ discovered a problem with the DMA transfer logic, you probably should checkout rosserial_stm32 from this commit: https://github.com/yoneken/rosserial_stm32/commit/0d1c48b9427be8dec439065864b0b44c1fdb5ebd

maxi-naeher avatar Sep 29 '22 08:09 maxi-naeher

Hello, I've read your reply about that problem...

That problem came to me and It occurs compile error..

Can I fix the line to this

HAL_UART_Transmit_DMA(huart, tbuf, twind);

?? Waiting for your reply, thanks

Sorry, just saw your comment now, your fix is correct.

tianyuZ avatar Nov 07 '22 08:11 tianyuZ

After looking at it in detail,The second half of message in case of tx bufferoverflow will not be transferred to the serial port through DMA because the first part of the buffer has not been transferred, so the previous logic is correct.

What do you mean with previous logic? I suggested the second DMA transfer because of this problem -> #40

When the DMA transfer is completed, it will enter the interrupt and finally call the HAL_UART_TxCpltCallback callback function to transfer the remaining data again, so there is no need to immediately send out the second half of the message in the front of the tx buffer after a buffer overflow occured.

tianyuZ avatar Nov 08 '22 10:11 tianyuZ