tridge/SiK — pull request #13 by joeman155 (2013-12-04 10:38:58+00:00)
Title: radio.c update - TX

Hello,
Ignore the commit to serial.c. The pull request is being sent because of changes to radio.c

I've found that I got TX errors without the suggested changes. (I was sending large packets of data...132 byte x-modem packets)

I noticed comments about how the FIFO was 'sensitive' about how fast data was put in...so this is why I tried making changes here...thought we might still be pushing it a bit too much.

I thought I'd try and guess what was going on. Perhaps the issue might be be related to the fact that it jumps from 60 to 64 and somehow...it can't deal with numbers that require 7th bit. So rather than trying to reduce the almost full threshold...I thought I'd increment by one...so it gets to 61 (and never reaches 64) and THEN the radio starts transmitting.

NOTE: The docs :
http://www.silabs.com/Support%20Documents/TechnicalDocs/Si1000.pdf
(page 264) says:-

"When the data being filled into the TX FIFO crosses this threshold limit,an interrupt to the microcontroller is generated so the chip can enter TX mode to transmit the contents of the TX FIFO."

Note the word 'crosses'. i.e. Being at 60 does not trigger it. So if we pile in enough data quickly...we get it up to 64.

Anyhow, I'll leave it at that. It 'seems' to resolve issues...but I can't explain it.