Hello,
I have got some early samples for this uC and have tried for some time to get the RTOS to work properly. I am complete new to the RTOS, but is there any limitation in usint the RTOS on this new uC?
Well, i think the RTOS seems to run, but i get some hard fault erros, normally in conjuction with IRQ or read from SD card. The IRQ routines i have made small and only do some flag check and set some event with the ISR set event function. The SD card uses DMS and i use the ST supplied driver for the STM32.
I have tried to use the debug paper from keil, to look up reguisters and so, but i think i have not get any clear clue. I have noticed some times when it halts, the same task is maybe 20 time on the stack? i can not think about how it will be called so many times?
How about irq priority on Sys_tick timer and my own interupt, how fo they need to managed?
I think i have set the stack for each task quite high, and also the stack for the system and the heap i have put quite big amount of ram into.
I have not attached any code because i believe that will be confusing anyway. So i hope you could give me some advices on common problems that a newbie could have, and maybe some help to debug this.
Kasper
What RTOS?
Sorry, Build in Keil RTX for Arm.
Hi,
the SysTick is the System Tick for the RTX, it always runs on lowest Interrupt priority. So your Interrupts always have higher prio.
When you are in a task, you must use the os_ functions to comminicate with the RTX. When you are inside an ISR, you must use the isr_ functions to comminicate with the RTX.
When you spawn tasks (this is normally done in the task name you give the os_init() ), you have two possibillities: - put the while(1) { ... } _behind_ the task spawn - delete the task itselv (os_delete_slv()) or s.th.) when all tasks have spawned.
Of course, you can spawn tasks while running, but what you tell in your post sounds like you spawn tasks in an endless loop.
. BR, /th.
Yes, i use the OS_ and ISR_ event correctly and i use the for(;;) {} in each task.
i forget to mention sometimes it seems to go longer time than others before it crashes :(
I have tried to collect some data:
http://rapzak.mine.nu/rtx.doc
I hope some kindly person could look through this and give me some help :)
Thanx
With Microsofts constant addition of new ways a computer can catch a cold, few people likes to open doc files from the net. It's always better to link to pdf files. Yes, Adobe has spent a significant amount of time trying to make pdf files almost as dangerous as Word documents. But there are more safe alternatives for viewing of pdf files than there are safe alternatives for viewing Word documents.
http://rapzak.mine.nu/rtx.pdf
It is also ok to post if you think everything seems ok... then i atleast now it is not in this part there is error.
I have played a litle arround and came if i in a other task have a debug print out, it seems to work much better, almost without errors, but do i delete this print out so the task actually is empty i get hard fault error. It is properly not this there is the error, but maybe it can give a hint.
for(;;) { result = os_evt_wait_or (0x0001,250); if (result == OS_R_TMO) { printf("BT Timed Out\n\r"); } }
It is the printf line i comment out to not have it working :(
Any clues?