2024-07-26 05:54 AM
Hello,
My application is loaded via flash memory. Four threads are created and they seem to be generated correctly because when the board is connected to the computer, all the threads run well. But if I disconnect the power and then turn it back on, the threads no longer run.
Systick is used for ThreadX and TIM6 is used for HAL-Tick.
But the scheduler does not start the threads. I do not understand why. I am new to threads.
Has anyone encountered a similar problem and have solutions to suggest? Please
I am attaching the file app_thread.c
2024-08-01 04:44 AM
No - but to receive 1 byte using the DMA is ... rather overshot the target .
2024-08-01 04:58 AM
@AScha.3 wrote:No - but to receive 1 byte using the DMA is ... rather overshot the target .
I don't quite understand what you mean by that, can you please explain?
2024-08-01 06:37 AM
Just imagine how much overhead you generate, to get/read ONE byte : a complex HAL-call for setting up the uart and then the DMA is needed, then on signal from uart the DMA is called and transfers with a 32bit bus 8bit.
Then INT is generated, DMA finished its job, and you get the info: we habe received a byte. wow.
If you just let the uart call (you) by an INT, you have the received byte and action is finished.
2024-08-01 10:44 PM
DMA should be used with the UART when you want to offload sending and/or receiving multiple bytes of data. When used for receiving, the IDLE interrupt should be enabled -- __HAL_UART_ENABLE_IT(&huart, UART_IT_IDLE) -- and idle timeout handled in the UART interrupt handler.