Home > Back-end >  Stm32 two serial ports at some point need to handle tasks at the same time, can you tell me how to d
Stm32 two serial ports at some point need to handle tasks at the same time, can you tell me how to d

Time:03-25

Have the following questions, please correct me,, thank you:

1) on the timer with flags, once every three minutes sent via A serial port data, each 1 minute through A serial port B through 74 hc4052 receive four data switch switcher, that if at the time of 3 minutes, A serial port B just entered the interrupt processing, as A serial port to send data,
This how to solve? Interrupt priority level to reduce the downloading B can solve?

2) about the while (1) the function whether can after

Each task A B C D length as shown in figure,

If ABC three functions running time is very short, let's assume that we have a SystemTask ABC three functions () running at the same time, but time is more long, excuse me: the while (1) will be performed three functions TaskA TaskB TaskC to perform in the next while SystemTask (),
Still not finish, assuming that time only enough TaskA TaskB, cannot perform the TaskC?

3) assumes that the array uint8_t datalenth []={0 x03, 0 x00 to 0 x15} is 0 x15 this data is a string of a string uint8_t data artificial number out to the length of the hexadecimal again, would like to ask how to through the

Strlen (data), it is concluded that the length of the data, and converted to hexadecimal, plus 0 x prefix, assign values to the array elements datalenth in [2]?
  • Related