2003-05-27 01:11 AM
2011-05-17 02:34 AM
I'm just starting to develop with ST92F150 and I have a problem.
In my main.c, I have the right declaration: include If I try to write in main.c: P0DR = 0; and all is ok, but if I write, for example: WUCTRL = 0; the compiler generates the error ''WUCTRL undeclared''. And so on with other examples... some are working, other not Why? Where can I read the content of st92fh file (I think it's protect...)? Many thanks Aragorn2011-05-17 02:34 AM
Sorry, in my previous message, the declaration is:
#include ''sys/st92f150/st92f150.h'', with '' substituted by triangular parenthesis... the triangular parenthesis symbol is not shown in Explorer. Bye2011-05-17 02:34 AM
You have to modify the page pointer using the spp instruction.
When you use the name of a register, it is an #define, it will be replaced by the pre-processor by the register number. It is up to you to modify the page. If it was managed by the compiler, each access to a register will have its own spp instruction increasing the code size. Note: by default, when an interrupt routine is entered the page pointer is saved in the stack so that you can modify it within the interrupt routine.2011-05-17 02:34 AM
Many thanks Romain!
But do I have to reference the correct page when I touch a register? Isn't the compiler toolchain that assembles the right code? Thanks2011-05-17 02:34 AM
All the general purpose include files are located in the directory:
C:\ST9PlusV6.1.8\lib\gcc-lib\st9-elf\2.7.2\include\sys then the include files dedicated to the ST92F150 are in the sys\st92f150 directory. You can know the list of the include files by reading the sys\st92f150\st92f150.h file. WUCTRL is declared as WU_CTLR in the wk_up_it.h include file. Note: be careful that the WUCTRL register is located in the 57th page, you will need to use a ''spp'' instruction.