--- Quote Start ---
Hi Italian,
I know that this post is a bit old, but if you didn't already solved your problem I have a suggest for you. I took a look to your code and I saw the call to OSInit() function: :evil: you don't have to call it because it is already called within alt_main() function that is called before your main()! If you do it, that function initialize os structure, included semaphre, mailbox, queue, etc... If you call it a second time after one in alt_main() you will re-assign all previously initialized semaphore (e.g. uart one, jtag one, etc)!!!
Ciao
--- Quote End ---
Ho letto solo ora il tuo post, grazie per la risposta. Il problema l'ho risolto cambiando strategia di programmazione: un solo loop infinito senza sistema operativo. Però mi interessa capire il perché del malfunzionamento. Ho chiamato OSInit() perché ho seguito le indicazioni del libro su MicroC/OS-II. Dici che è già chiamata dentro alt_main()? Ma cos'è questa alt_main()?
Grazie
Ciao