Monday, April 20, 2009

Spinning into control

After completing the changes from semaphors to spinlocks, the driver seems to have gained much stability. The locking mechanism is based off of the pl2302 driver. Currently the device will lose data if under heavy load. The other driver also made me realize (assuming its done correctly!) that I don't need to lock nearly as much as I thought I did. To help testing, I am making a serial program that can work with shell scripts. The only two command line programs that I know that work with serial are screen and minicom, neither of which is for automated use.
During this upgrade, additional register accesses were decoded into human readable defines and a few translation errors I had made earlier were fixed. These were due to the baud rate latch divisor multiplexing. Basically, if a certain register had a special value on the chip, it causes register addresses to actually write to different data.
As things develop, I will lock the code more properly. Currently you could easily generate unexpected output on the serial port due to a number of race conditions from multiple users. A prime example is the issues arrising from the divisor multiplexing. Future revisions will lock these as it is found to be safe and necessary. However, any locking errors right now will not result in system instabiility, just unexpected results on the serial port.

45 comments:

  1. good~ keep sharing with us, please....I will waiting your up date everyday!! Have a nice day........................................

    ReplyDelete
  2. 我又來看你囉~加油^^ 祝你天天順利開心..............................

    ReplyDelete
  3. 一個人的價值,應該看他貢獻了什麼,而不是他取得了什麼..................................................

    ReplyDelete
  4. Where can I download your driver?

    ReplyDelete
  5. Quality is better than quantity..................................................................                           

    ReplyDelete
  6. 向著星球長驅直進的人,反比踟躕在峽路上的人,更容易達到目的。............................................................

    ReplyDelete
  7. 喜歡看大家的文章,每篇都是一個故事,都是一種心情~~祝大家開心愉快............................................................

    ReplyDelete
  8. 唯有學習不已的老師,才能認真的教,唯有燃燒自己,才能點亮他人的燈............................................................

    ReplyDelete
  9. You should disable comments for this post.

    ReplyDelete