hi at all!,
i have a problem when i compile a program.. i have these warnings..
"Warning unreferenced functions removed:
FCD_LCDDisplay0_GetDefines in: D:\_LABORATORIO\_MOTO ACQUA\_CENTRALINA MOTO ACQUA\_CENTRALINA MASTER REV_4 1KHz22072010.c
FCD_LCDDisplay0_PrintASCII in: D:\_LABORATORIO\_MOTO ACQUA\_CENTRALINA MOTO ACQUA\_CENTRALINA MASTER REV_4 1KHz22072010.c
FCD_LCDDisplay0_Command in: D:\_LABORATORIO\_MOTO ACQUA\_CENTRALINA MOTO ACQUA\_CENTRALINA MASTER REV_4 1KHz22072010.c
FCD_LCDDisplay0_RawSend in: D:\_LABORATORIO\_MOTO ACQUA\_CENTRALINA MOTO ACQUA\_CENTRALINA MASTER REV_4 1KHz22072010.c
LCD_722908_Dummy_Function in: D:\_LABORATORIO\_MOTO ACQUA\_CENTRALINA MOTO ACQUA\_CENTRALINA MASTER REV_4 1KHz22072010.c
Building CASM file
Serious Warning: Possible sw stack corruption, function 'FCD_LCDDisplay0_Cursor' called by more than one asynchronous thread (main/Task, interrupt, interrupt low)
Serious Warning: Possible sw stack corruption, function 'FCD_LCDDisplay0_PrintString' called by more than one asynchronous thread (main/Task, interrupt, interrupt low)
Serious Warning: Possible sw stack corruption, function 'LCD_722908_RawSend' called by more than one asynchronous thread (main/Task, interrupt, interrupt low)"
and so when i try to start the ecio40 the display goes wrong, flash whit a lot of strange simbols..
problem with a program
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: problem with a program
Hello,
Hope this makes sense.
This means that the functions that you are not calling (referencing) in your program will not be included in the assembled hex file. Basically because your not using them they wont consume memory on the device. This is normal and one of the major advantages of using the C language."Warning unreferenced functions removed:
This is where a function is called from the main program loop and then again from an interrupt routine. This can lead to problems like you are mentioning where the display gets corrupted with strange symbols. Instead of using LCD functions in your interrupt macro you can instead set a flag variable in the interrupt routine. Then in your main loop check the variable and if it has been set than do your LCD functionality before clearing the variable again.Serious Warning: Possible sw stack corruption
Hope this makes sense.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Re: problem with a program
hi Benj,
I have tried but when I go up to 100Hz the display print a lot of strange characters...
have you got some ideas?
thank you so much!
I have tried but when I go up to 100Hz the display print a lot of strange characters...
have you got some ideas?
thank you so much!
-
- Matrix Staff
- Posts: 9521
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
Re: problem with a program
Hello franky.
This is usually caused by timing issues. E.g Chip clock speed could be set differently to actual osc speed of hardware.
I.e If you have a 8.0MHz crystal connected to microcontroller, then make sure you manually type in a clock speed of 8000000.
Could you have missed or added an extra 0 for instance.
place a small delay at the beginning of your program e.g 50ms to allow LCD warm up time.
Or in your case could still be a conflicting macro.
If you don't mind sharing your program, then upload it, and some one will look at it for you.
This is usually caused by timing issues. E.g Chip clock speed could be set differently to actual osc speed of hardware.
I.e If you have a 8.0MHz crystal connected to microcontroller, then make sure you manually type in a clock speed of 8000000.
Could you have missed or added an extra 0 for instance.
place a small delay at the beginning of your program e.g 50ms to allow LCD warm up time.
Or in your case could still be a conflicting macro.
If you don't mind sharing your program, then upload it, and some one will look at it for you.
Martin
Re: problem with a program
ok i'll check it...
thank you medelec35!
i'll tell you something after the test..
thank you medelec35!
i'll tell you something after the test..
Re: problem with a program
hi Benj,
I have tried a lot but i can't resolve the problem... the display goes wrong... probably because a write a lot of data at the same moment.. i don't know.. can you help me?
please find the enclosed file..
thank you so much
I have tried a lot but i can't resolve the problem... the display goes wrong... probably because a write a lot of data at the same moment.. i don't know.. can you help me?
please find the enclosed file..
thank you so much
- Attachments
-
- _TEST DISPLAY.fcf
- (21.69 KiB) Downloaded 370 times
-
- Matrix Staff
- Posts: 9521
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
Re: problem with a program
I believe the reason for corrupt LCD is you have LCD components in you interrupt macro, and in your main program. What will happen is whilst writing to LCD in main, your interrupt is probably triggered, overwriting the LCD, hence corrupt characters.
Best way is never write to LCD within an interrupt.
Within interrupt, just set a variable to 1.
Then in main use decision branch if variable = 1 then write to LCD. Variable = 0 .
When you compile code, look out for warnings like:
I am just repeating some of what Ben said after looking at your program, as I totaly agree with him.
If you get stuck with this, I’m sure some can assist you further.
Best way is never write to LCD within an interrupt.
Within interrupt, just set a variable to 1.
Then in main use decision branch if variable = 1 then write to LCD. Variable = 0 .
When you compile code, look out for warnings like:
- Serious Warning: Possible sw stack corruption, function 'FCD_LCDDisplay0_Cursor' called by more than one asynchronous thread (main/Task, interrupt, interrupt low)
I am just repeating some of what Ben said after looking at your program, as I totaly agree with him.
If you get stuck with this, I’m sure some can assist you further.
Martin
Re: problem with a program
ok thank's at all!!
i'll try to solve like you told me.. and i'll tell you something.
i'll try to solve like you told me.. and i'll tell you something.