??? 08/30/10 16:31 Read: times Msg Score: +2 +2 Informative |
#178412 - Public Apology Responding to: ???'s previous message |
Well, I must publicly apologize to my IIC driver for the slanderous accusations which I brought against it.
The problem was in the initialization code of my UART driver. In working with the TCP/IP module from Silabs, to which I don't have the source, I discovered that it claims timer 0 and sets the CKCON register to a certain value. Somewhere along the way I mistakenly removed the initialization of CKCON from my UART driver, which uses Timer 1, because it was getting initialized somewhere in the TCP/IP code. Everything appeared to work for some time, but when I changed the initialization sequence of my network task, all of a sudden, the UART stopped working. The bottom line line is that really achieving module separation with the 8051 architecture is generally difficult, especially when you have to start dealing with close source modules, and no compiler or design methodology can completely prevent you from accidentally introducing bugs into your own code. I did follow the advise of only using one register bank for equal priority interrupts. Originally, I had arbitrarily decided that some interrupts would use one bank and others would use another, while the main code always used 0. Upon inspection, this was a completely unnecessary design decision. Now all of my interrupts use bank 1 while the main program uses bank 0. I never call functions from interrupts, so that was not a concern. Thanks for the feedback! --David |
Topic | Author | Date |
IIC tramples UART0 routine | 01/01/70 00:00 | |
no need for multiple banks | 01/01/70 00:00 | |
Possibilities | 01/01/70 00:00 | |
Use RegSet 1 for Interrupts | 01/01/70 00:00 | |
Public Apology | 01/01/70 00:00 | |
"Everything appeared to work (sic) for some time" | 01/01/70 00:00 | |
Indeed!![]() | 01/01/70 00:00 |