52235 - sprintf x violation access interrupt

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

52235 - sprintf x violation access interrupt

943 Views
Ricardo_RauppV
Contributor I
Hello guys
I posted a SR (below) along Freescale today.
If you could provide me some help/comment I will appreaciate it a lot ..!!Thanks
 
Hi Freescale.
 I created a 1000 bytes console_buffer to serve as a console debug via serial port (only tx work).For each application event, I transmit a respective frame over the serial port in order the application can be observed through the hyperterminal screen.A pointer scheme was created to allow more then 1 event be generated at time, therefore pushing its frame over such console_buffer.The problem is, I am going to violation access interrupt vector (#2) frequently when a frame is been transnmitted at the same time sprintf is called to write the next frame in the console_buffer.Besides this vector#2, some variables are crashed without reasons, a typical stack size problem (currently 2Kbytes, enough I believe..).BUT, If I before the sprintf call I disable the interrupts (sr=2700 etc..), and so enable it back after the calling, the problem disappear.The interrupt serial TX function is very simple...just a comparsion between pointer and data size..I don´t know what kind of information I can provide, but..here I am...However keep on mind the detail about disable interrupts at sprintf call..Some special care about sprintf stack,timming,parameters?Realize such buffer is used at the same time by sprintf and tx interrupt
Labels (1)
0 Kudos
1 Reply

201 Views
Ricardo_RauppV
Contributor I
Hi peolple
This issue was solved by a Freescale SR..
The problem was that my universal interrupt entry point was stacking only A0/A1 and D0/D1, as I copied from a 5213 example...
The orientation I received from Freescale was to push all regsiters A0- to A7 and D0 to D6.
It worked perfectly....
Now on, I will allways stack all these registers instead of be concerned what exacltly I should stack...
If someone have a more elegant one...let us now ...
Thanks ...
 
0 Kudos