artem
Advanced Member level 4
ucos avr port
The context switching time was seen little bit long . It took about 80 usec to
make it .
Approximate measuring was done as :
spi_sendbyte(INT8U byte)
{
SPDR = byte
OSSemPend(spi_IsrSemaphore);
PORTB &= ~(0x80);
}
spi_UcosSpiIsrHandler(void)
{
PORTB |= 0x80;
OSSemPend(spi_IsrSemaphore);
}
SPI speed was set to highest so it took 2 usec to complete transfer .
Highest priority task was invoking the spi_sendbyte() and then .
Portb is set when SPI transfer complete is generated and reset after task resume when OSSemPend is returned .
UCOS works on Atmega128 Freq 16 MHz , external 64 SRAM .
Did somene measure UCOS context switch time and is it usual to have 80-100usec context switch under AVR ?
The context switching time was seen little bit long . It took about 80 usec to
make it .
Approximate measuring was done as :
spi_sendbyte(INT8U byte)
{
SPDR = byte
OSSemPend(spi_IsrSemaphore);
PORTB &= ~(0x80);
}
spi_UcosSpiIsrHandler(void)
{
PORTB |= 0x80;
OSSemPend(spi_IsrSemaphore);
}
SPI speed was set to highest so it took 2 usec to complete transfer .
Highest priority task was invoking the spi_sendbyte() and then .
Portb is set when SPI transfer complete is generated and reset after task resume when OSSemPend is returned .
UCOS works on Atmega128 Freq 16 MHz , external 64 SRAM .
Did somene measure UCOS context switch time and is it usual to have 80-100usec context switch under AVR ?