Forum Discussion
Altera_Forum
Honored Contributor
15 years agoCrash and semaphores
Hi, when I make three tasks synchronized by semaphores (the tasks do nothing, they only make a Post and then a Pend to pass the control each other), after a number of iterations (this number i...
Altera_Forum
Honored Contributor
15 years agoHi 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