Hello,
In my project I want use the fopen, fwrite, fclose functions within an USB interrupt.
If I dont' use the RTX all is OK, but if I use the RTX, I have and undef_handler, sometimes an dabt_handler.
I don't understand the problem, anybody can help me ?
Thanks,
Julien.
In my project I want use the fopen, fwrite, fclose functions within an USB interrupt
you cannot do that! this is the cause of your exceptions. do it in the main loop / task context.
do you really believe it is a good idea to block the entire system (excluding FIQ) while you write to non-volatile/RAM drive storage while at interrupt mode?
I use this function in the IRQ because I have to know if th operation is succesfully completed to send the result to the host.
Moreover the MCB2300/usbmem example do the same thing.
And why without the RTX it works ? It's my question
Thanks
you are not allowed to use these functions while at any mode other than user mode. it is as simple as that - FlashFS rules.
interesting. are you sure it is a genuine Keil example? that would surprise the hell out of me.
use an interaction between a task/main loop to get the work done.
Ok I understand but why it works perfectly without the RTX ?
why it works perfectly without the RTX
I really don't know the answer to that.
"it is as simple as that - FlashFS rules."
Yes, it is always wise to adhere to the rules laid down in the documentation.
you see? there is hope for me. I only break RTX rules :-)
I don't see this rule in the documentation
View all questions in Keil forum