Tuesday, October 6, 2009

INTERRUPT SERVICE ROUTINE (IRQ)

******************INTERRUPT SERVICE ROUTINE (IRQ) **************

IRQ Driver:::::::: I2C
MASTER ::::::: LPC2368 (ARM 7)

Do’s & Don’ts of ISR: 1. The variables declared inside an Interrupt should be declared using "volatile" Keyword . Only after declaring "volatile" , user may get the desired output . for eg : global var declaration area : volatile unsigned char MasterBuff[23] = {0}; __irq void I2C_IRQHnadler(void) { ...................... ...................... MasterBuff[Index] = I21DAT ; } 2. Before the termination of ISR block , please clear the I2C Interrupt Flag and Acknowledge the Interrupt like shown below . eg : __irq void I2C_IRQHnadler(void) { ..................................... ..................................... I21CONCLR=0x08; /*Clear Interrupt Flag */ VICVectAddr = 0; /*Acknowledge Interrupt */ } 3. Always Clear the I2C Interrupt Registers before Initializing it to some desired value . 4. While Initializing I2C Interrupt follow this order, First Set the Priority of the ISR '1' is Highest Priority and '15' is lowest priority , then Enable the specific Vector Address bit for powering on the desired ISR(like UART,Timer,I2C,etc.,) block . 5.Considering the I2C IRQ , it is basically a state machine where we have unique states for generating repeated start , read/write operation etc.,So under each states we have to follow the desired protocol for setting values in I2C Interrupt Registers as in the data sheet . 6. Always make sure before using any registers that belong to I2C , clear everything in the main() routine.

7. Do not Call any function inside an IRQ , this will result in malfunctioning of the whole routine . Let the IRQ be as small as possible .

Please feel free to add comments and suggestions on the above issues of Interrupts .

Adidos !Regards,
Samjith.***************************************

Friday, October 31, 2008

IPaddress blocking in HTTPD for FC8

In FC8 system comment the code for following line
"check for the host is not IP address" in both the files
1. /etc/httpd/modsecurity.d/blocking/modsecurity_crs_21_protocol_anomolies.conf
2. /etc/httpd/modsecurity.d/modsecurity_crs_21_protocol_anomolies.conf

This will disable the bolcking of IP Address in browsing to view the php pages.

Tuesday, April 1, 2008

Postgresql Installation Error


Installation Error for postgresql 8.1.0
Error Message : Failed to get system.metric service terminal : 87

This error can occur when the windows doesn't support the old postgresql version
please try to install the lastest postgresql version


postgresql 8.3.0 commands

cmd to take database dump
#pg_dump -U postgres -c -f dbdump_name.sql dbname


cmd to load the dump
# psql -U postgres -d dbname -f dbdump_name.sql