About the Tx_CMSIS_Wrapper example
I am new to STM32, been looking at it just a week, have an L4R9 Disco board. I am familiar with the CMSIS RTOS2 api, and have used RTX previously. Was interested to see the Tx_CMSIS_Wrapper example, as it shows how an RTOS2 facade is added to Azure RTOS ThreadX.
What I don't get is the apparent need for a Mutex/Semaphore in the example. The two threads are toggling separate LEDs, and share no data (ram nor peripheral registers). Yes, they do both call printf, 3 times, but ironically 2 of the 3 calls aren't in the critical region anyway.
Am I missing something here, or is there a fundamental misunderstanding of concurrent programming on the part of that code's author? The README within the project states that (paraphrasing) "because both threads call Led_Toggle, this is considered a critical region... ". Shared DATA needs sequential access, but two threads that happen to be sharing CODE does not.
