rtel wrote on Friday, January 23, 2009:
> 1. configTICK_RATE_HZ = 50
> - the LCD is updated every second (like in error cases), but
> with "Pass 1", "Pass2", …
The delay periods are defined at the top of the file using:
#define mainNO_ERROR_PERIOD ( 3000 / portTICK_RATE_MS )
#define mainERROR_PERIOD ( 500 )
The second definition should really be:
#define mainERROR_PERIOD ( 500 / portTICK_RATE_MS )
With a tick of 1KHz portTICK_RATE_MS is 1000 / 1000 = 1.
With a tick rate of 50Hz portTICK_RATE_MS is 1000 / 50 = 20.
> - the LCD line-switch does not work properly (If the
> BlockTime-Task was not removed, their supervising fires errors)
The block time task takes various measurements and flags an error if it finds these to be outside of what it considers to be an acceptable threshold. Changing the tick frequency will change what the thresholds are so it is not unexpected for the block time task to complain. It is nothing to worry about.
The timer is setup to generate the tick interrupt using:
const unsigned portLONG ulCompareMatch = ( (configPERIPHERAL_CLOCK_HZ / portTIMER_PRESCALE) / configTICK_RATE_HZ ) - 1;
With a tick rate of 1000 ulCompareMatch will be 4999.
With a tick rate of 50 ulCompareMatch will be 99999 - which is greater than a 16bit value hence the timing error you are seeing. To use such a low value you will have to change the portTIMER_PRESCALE setting (it is 8 by default).
> 2. configTICK_RATE_HZ = 20
> - "Error: Int queue" is shown permanent
No surprising as per my previous comment regarding the block time task.
> - but sometimes (very rarely) the "E" is missuing and You see
> "rror: Int queue"
> - the LCD line-switch does not work properly
I would guess just timing problems when writing to the LCD.
#define lcdSHORT_DELAY ( 4 / portTICK_RATE_MS )
#define lcdLONG_DELAY ( 15 / portTICK_RATE_MS )
Are both going to eval to 0 with such a large portTICK_RATE_MS value.