2015-05-04 11:48 PM
Hi,
EDIT: My assumption regarding reentrancy of functions was wrong. The ISRs became active before the buffer structures were initialized. The invalid data caused writes to inaccessible memory. Please disregard the rest. Im trying to call the same function from main and some ISRs. I'm getting hardfaults as soon as I'm increasing the probability that a function is called concurrently. This mainly deals with two buffers between main and an SPI ISR and a UART ISR. The buffer access functions are identical but the buffer related data is stored in different structures. I'm already passing different data into the function for it to operate on, and the only identical variables are local variables that should be on different positions on the stack. If there are other requirements toward achieving reentrancy I would like to know about them. Regards, Kilian