[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Pcmcia card speed

Just to correct a misconception in the test below. The
change of speed that is done in the CSR module by the OpenBT
stack is done in a temporary way, so it is not a failure that
you see it start at 115200 again after a restart. The reason
for this is that we want to be sure at startup that the module
speaks at the same speed as we do without the need to do a lot
of probing of different speeds. This means that there is always
two speeds involved, the initial speed (specified using the -i
option to btdm) and the running speed (specified using -s).
Thus, if you change the initial speed using pstool, you have
to specify that speed using -i when you later start btdm. We
do not recommend to change the initial speed, as it only leads
to confusion.


> -----Original Message-----
> From: Ulrich Müller [mailto:muelleru@xxxxxxx.de]
> Sent: 27 October 2001 12:51
> To: bluetooth-dev@xxxxxxx.com
> Cc: jt@xxxxxxx.com
> Subject: Re: Pcmcia card speed
> Hi Jean,
> > 	Yes, I agree 100% with you. I was reading the doc of the
> > 16C950 yesterday and staring at the driver, and I came to the same
> > conclusion.
> [...]
> > Now, I'm thinking that Brainboxes uses the default 1.8432MHz
> > clock by default, and that you need to play with 'CKS' to 
> get what you
> > need. I would like those friends at Brainboxes to tell us the trick
> > ;-)
> Nice to see that I am not the only one struggeling to get 
> these cards to 
> work at full speed. I have also tried to modify the CPR 
> register. Maybe 
> I should have noted that there is already a kernel patch at 
> sourceforge 
> (http://sourceforge.net/projects/serial/). But I couldn't guess the 
> right register settings so far.
> When the speed of the CSR chip is changed, it keeps the 
> setting in its 
> internal flash memory. That is why you have to return the card to 
> factory after setting a baudrate that is not supported by the 
> UART. When 
> starting OpenBT with a certain baudrate (e.g. 460800), OpenBT first 
> initializes the serial interface with 115200 to do some 
> startup commands 
> (e.g. reading the HCI buffer sizes), then sets the baud rate 
> of the CSR 
> chip and finally changes the baud rate of the serial line. 
> The fact that 
> you can do this more than once shows that OpenBT actually fails to 
> change the baud rate of the CSR chip (at least, for me).
> So I have changed the baud rate of the CSR chip of my cards with 
> Brainboxes Windows programm PSTool to 921600. As expected, 
> OpenBT is now 
> unable to access the cards even at the startup phase. Before playing 
> with the UART, you should take at look at this.
> Using Windows, I have to set the UART to a baud rate of 921600 before 
> the Windows tools can access the cards. So the Windows 
> drivers seem to 
> be able to set the UART to 921600. I have had a closer look 
> at this and 
> found out that BB uses the default windows drivers. The setup routine 
> adds the value "ClockFrequency, 0xe10000" to the registry, 
> that is used 
> for 14.745.600 MHz. So do the cards have a clock of this 
> frequency? I am 
> not sure, because that UART should be set to full speed (CPR=1, so 
> TCS=16 and divisor=1 lead to 921600 baud) after a chip reset. 
> Maybe the 
> trick of BB's UART is that it initializes the CPR with a 
> value of 8. I 
> will check this again on Monday.
> br, Ulrich