Skip to main content

Timeline for Send Data With Usart STM32

Current License: CC BY-SA 4.0

13 events
when toggle format what by license comment
Jan 10, 2021 at 13:10 vote accept Andrea
Jan 10, 2021 at 13:09 comment added Andrea @Justme Ok, it works. Thanks you.
Jan 10, 2021 at 12:48 comment added Justme @Andrea OK, fixed the answer based on new info not given in the question.
Jan 10, 2021 at 12:47 history edited Justme CC BY-SA 4.0
Fixed code based on new info
Jan 10, 2021 at 12:32 comment added Andrea @Justme sorry again, sigTX is a pointer, I forgot to mention it.
Jan 10, 2021 at 12:27 comment added Justme @Andrea you are not taking a sizeof of a pointer, you are taking a sizeof of array - sigTX is an array, right? If it is not an array but a pointer, I actually don't know that since you did not say what sigTX is.
Jan 10, 2021 at 12:24 comment added Andrea @Justme Sorry, I asked this question because I know there can be problems using sizeof with a pointer.
Jan 10, 2021 at 12:20 comment added Justme @Andrea I don't really understand why you ask this. Did it not work? The transmit function needs a pointer, and in C, an array is a simply pointer to the first element in it.
Jan 10, 2021 at 12:06 comment added Andrea @Justme Does it work even if sigTX is a pointer to an array and not an array?
Jan 10, 2021 at 11:09 comment added jusaca Oh I see, OK that is a valid point. I haven't realized sigTX is an array.
Jan 10, 2021 at 10:59 comment added Justme True, there is not much difference, except that your example uses a separate float variable, so it sends one float of 4 bytes and OP must use a for loop to transmit out all the floats in the sigTX array, but my example sends out the whole sigTX array in one call.
Jan 10, 2021 at 10:52 comment added jusaca I truly can't see the slightest difference to my suggestion.
Jan 10, 2021 at 10:47 history answered Justme CC BY-SA 4.0