Part Number: F28M35H52C
Hello.
I am having problems with a function that is loaded in flash but executed from RAM. The thing is that when calling it, not all the arguments are correctly passed. I am not sure why but I know the problem is related to the fact that is run from RAM because when I loaded and run it from flash, it works fine.
The strange thing is that the function receives 3 arguments, all of them are pointers, but only one of them is wrong passed and it seems to be always the last one (I tried modifying the order and realized about this).
Looking for answers, I found this thread in which I am quiet sure the person who asked had the exactly same problem: 
I am not concerned about all the things that have to be set to correctly run a function from RAM when it was loaded in flash. However, in my case it is not possible to use the ramfunc attribute because they do not fit in RAM (even though I use the shared one) so they can not be simultaneously placed in that memory. Depending on some inputs, I call different functions so they are copied there when it is necessary with copy_in(...) and COPY_TABLE variables.
Is there something extra that should be done to make functions call work correctly when it is used the copy_in mechanism to achieve RAM placement of some functions? I followed the document spraa46a in order to do this and it seemed to be fine, but when I added more arguments to functions, something failed.