View previous topic :: View next topic |
Author |
Message |
olhexy
Joined: 03 Apr 2011 Posts: 192 Location: Tilburg, Netherlands
|
Posted: Wed Jun 27, 2012 11:40 am Post subject: About $waitstate and CONFIG XRAM |
|
|
2.0.7.5 documentation says to use CONFIG XRAM in stead of $waitstate.
But in CONFIG XRAM I can only specify WaitstateLS and/or WaitstateHS.
When using an (old, but widespread non Atmega) AT90S8515 there is only 1 waitstate type possible, and it has no separate HS and LS to specify.
I think this single Waitstate should be added as an option in CONFIG XRAM, or it should be told there how to deal with it. |
|
Back to top |
|
|
albertsm
Joined: 09 Apr 2004 Posts: 5913 Location: Holland
|
Posted: Wed Jun 27, 2012 9:01 pm Post subject: |
|
|
the waitstate is already a part of the config xram : CONFIG XRAM = mode , Waitstate=wls
this is for old chips that have no sections.
you could specify CONFIG XRAM = mode , Waitstate=wls or CONFIG XRAM = mode , WaitstateLS=wls which would have the same effect.
I added it to the help. _________________ Mark |
|
Back to top |
|
|
olhexy
Joined: 03 Apr 2011 Posts: 192 Location: Tilburg, Netherlands
|
Posted: Thu Jun 28, 2012 7:51 pm Post subject: |
|
|
albertsm wrote: | the waitstate is already a part of the config xram : CONFIG XRAM = mode , Waitstate=wls
this is for old chips that have no sections.
you could specify CONFIG XRAM = mode , Waitstate=wls or CONFIG XRAM = mode , WaitstateLS=wls which would have the same effect.
I added it to the help. |
In 2.0.7.5.002 I read the help CONFIG XRAM .
Syntax
CONFIG XRAM = mode [ , WaitstateLS=wls , WaitStateHS=whs ]
Where is the word Waitstate (without LS or HS) here??? It is NOT offered as a variable!
(From the further description I could guess that for AT90S8515 waitstatels=1 works. And that waitstatehs=1 works as well)
[Edit as a reply for here under: I just managed to do Help/Update and expected "Waitstate" to be already in Help CONFIG RAM. Sorry! ]
Last edited by olhexy on Thu Jun 28, 2012 9:58 pm; edited 2 times in total |
|
Back to top |
|
|
albertsm
Joined: 09 Apr 2004 Posts: 5913 Location: Holland
|
Posted: Thu Jun 28, 2012 9:37 pm Post subject: |
|
|
it was added to the help, but this help is not available yet. when the next build of the help (the help has a different build number) is available you can read it. And i already wrote it, didn't i ?
And it is not a variable but a parameter. _________________ Mark |
|
Back to top |
|
|
olhexy
Joined: 03 Apr 2011 Posts: 192 Location: Tilburg, Netherlands
|
Posted: Sat Jun 30, 2012 8:34 am Post subject: |
|
|
How do I set these sector limits with CONFIG XRAM?
Or are they derived from $xramstart and $xramsize?
(BTW: My chip options do not write these in my program.)
The sector limit could differ from size of SRAM chip, I think.
Because Help says to not use $waitstate but CONFIG XRAM, I expect to be able (or: have to) set these sector limits there too.
Should I write something like: CONFIG XRAM enabled, waitstateLS&H8000=1, waitstateHS&H8000=3 ???
Or should I use: set emcucr,6 'to indicate SRL2 as the sector limit ???
Or should I use: emcucr = Bits(6,5,4) 'to select SRL2, SRL1 and SRL0 ??? |
|
Back to top |
|
|
albertsm
Joined: 09 Apr 2004 Posts: 5913 Location: Holland
|
Posted: Sat Jun 30, 2012 9:16 pm Post subject: |
|
|
you begin your post with an old 8515.
did you now switched to a new chip? or is it just some random image you attached?
for the 8515, there is no sector, and then you only use waitstate = value or waitstateLS=value
for the M162, you can use waitstateLS=value (0-3) and waitstateHS=value(0-3)
here is some info from the dat file what the effect will be for the M162:
xramenable=MCUCR.7 ; enables xram
wtsL=4 ; lower sector wait states
wtsH=4 ; high sector wait states
wtsL1=0, EMCUCR.2-0, EMCUCR.3-0 ; no wait states
wtsL2=1, EMCUCR.2-1, EMCUCR.3-0 ; 1 cycle during read/write
wtsL3=2, EMCUCR.2-0, EMCUCR.3-1 ; 2 cycle during read/write
wtsL4=3, EMCUCR.2-1, EMCUCR.3-1 ; 2 cycle during r/w and 1 before new address
wtsH1=0, MCUCR.6-0, EMCUCR.1-0 ; no wait states
wtsH2=1, MCUCR.6-1, EMCUCR.1-0 ; 1 cycle during read/write
wtsH3=2, MCUCR.6-0, EMCUCR.1-1 ; 2 cycle during read/write
wtsH4=3, MCUCR.6-1, EMCUCR.1-1 ; 2 cycle during r/w and 1 before new address _________________ Mark |
|
Back to top |
|
|
olhexy
Joined: 03 Apr 2011 Posts: 192 Location: Tilburg, Netherlands
|
Posted: Sat Jun 30, 2012 10:42 pm Post subject: |
|
|
Thanks for your answer.
I have 2 STK200 boards. 1 is old with At908515 and I want to use that for some quick tests with GLCD and XRAM.
The other board has an Mega162V where I want to use XRAM too, it is for a paired steppermotor control system that I am developing.
So I want to use CONFIG XRAM on both, combined with GLCD. And also want to exploit (or play with) different sector limits in Mega162.
I am somewhat surprised that CONFIG XRAM does not have the possibility to set sector limits, it is common thing on Atmega's with XRAM. After bringing it up several times now you did not give an answer how to do that with CONFIG XRAM.
I conclude that it is not possible and that I have to set them directly with writing to EMCUCR register. But that is an action that the compiler will not know about then (I think). So I thought it has to be done by CONFIG XRAM ("there must be a way.., but how?"). That is the reason for my repeated question(s) about it. |
|
Back to top |
|
|
albertsm
Joined: 09 Apr 2004 Posts: 5913 Location: Holland
|
Posted: Sat Jun 30, 2012 11:05 pm Post subject: |
|
|
First of all, you begin with 8515, then throw in questions about M162, and then expect me to know how to fit that in?
Only when you give good info you will get good info back. i was in the assumption you were still playing with the 90S8515.
The config xram only activates the xram (the bus) and sets the waitstate. Nothing more or less.
By default there is no sector, old chips have just 1 sector. And that is the reason all sector bits are set to 0. So the config xram works for the whole chip.
you can change these bits yourself if you want to make different sectors. the config xram does not have an option to do so. Some simple tasks you will not find a config for. especial when a setting is specific to a chip. _________________ Mark |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You cannot download files in this forum
|
|