-
Path: news-archive.icm.edu.pl!news.rmf.pl!agh.edu.pl!news.agh.edu.pl!news.onet.pl!new
s.nask.pl!news.nask.org.pl!news.unit0.net!feeder3.cambriumusenet.nl!feed.tweakn
ews.nl!209.197.12.242.MISMATCH!nx01.iad01.newshosting.com!newshosting.com!newsf
eed.neostrada.pl!unt-exc-02.news.neostrada.pl!unt-spo-a-02.news.neostrada.pl!ne
ws.neostrada.pl.POSTED!not-for-mail
Date: Fri, 14 May 2010 08:21:56 +0200
From: SM <b...@k...com.pl>
User-Agent: Thunderbird 2.0.0.24 (Windows/20100228)
MIME-Version: 1.0
Newsgroups: pl.misc.elektronika
Subject: STM32 i problem z wielkoscia bufora USB
Content-Type: text/plain; charset=ISO-8859-2; format=flowed
Content-Transfer-Encoding: 8bit
Lines: 37
Message-ID: <4becec00$0$2596$65785112@news.neostrada.pl>
Organization: Telekomunikacja Polska
NNTP-Posting-Host: 83.27.187.56
X-Trace: 1273818112 unt-rea-a-02.news.neostrada.pl 2596 83.27.187.56:1388
X-Complaints-To: a...@n...neostrada.pl
Xref: news-archive.icm.edu.pl pl.misc.elektronika:588427
[ ukryj nagłówki ]Witam,
Wróciłem do zabawy z STM32F103. Kończę swoją obsługę USB
i trafiłem w PDFie Referene Manual RM0008 do STM32F...
na takie zdanie:
"Reception memory buffer locations are written starting from the address
contained in the
ADDRn_RX for a number of bytes corresponding to the received data packet
length, CRC
included (i.e. data payload length + 2), or up to the last allocated
memory location, as
defined by BL_SIZE and NUM_BLOCK, whichever comes first. In this way,
the USB
peripheral never writes beyond the end of the allocated reception memory
buffer area. If the
length of the data packet payload (actual number of bytes used by the
application) is greater
than the allocated buffer, the USB peripheral detects a buffer overrun
condition. in this case,
a STALL handshake is sent instead of the usual ACK to notify the problem
to the host, no
interrupt is generated and the transaction is considered failed."
Czy z tego mogę wnioskować, że jeśli mam bufor odbioru danych o
wielkości 64 bajty (zdefiniowane poprzez BL_SIZE i NUM_BLOCK),
to gdy odbiorę:
1. więcej niż 64 bajty danych (data payload > 64) => mam błąd i będzie
STALL
2. mam 64 bajty danych (data payload = 64) => nie mam błędu, w buforze
mam wszystkie 64 bajty
3. mam 63 bajty danych (data payload = 63) => nie mam błędu, w buforze
mam 63 bajty danych + 1 bajt CRC
4. mam 62 lub mniej bajtów danych (data payload <= 62) => nie mam błędu,
w buforze mam odebrane bajty danych + 2 bajty CRC
SM
Następne wpisy z tego wątku
- 14.05.10 17:22 SM
Najnowsze wątki z tej grupy
- Wybuchające pagery
- Jak shakować windę
- Sterowanie bezprzewodowe do wbudowania
- NC vs NO
- Jak dzięki mojemu pomysłowi amerykańce z Google przyspieszyli TV
- Jak dzięki mojemu pomysłowi amerykańce z Google przyspieszyli TV
- Żyrandol w wersji ze ściemnianiem.
- Napięcie w gniazdku na wszystkich żyłach po wyłączeniu bezpieczników - zgłaszać do elektrowni?
- Elektryczna łapka i szerszeń
- moduł dtmf
- 0.5V
- Odbiór SDR na mikrokontrolerach
- Taki uziom....
- Nałożnica?
- ładowanie akku
Najnowsze wątki
- 2024-09-16 zapora Stronie Slaskie
- 2024-09-16 powodz
- 2024-09-16 Aple ma przycisk APARATU. SERIO? Tyle lat im to zajęło?
- 2024-09-15 Mulitisim
- 2024-09-15 Jaki telefon dla "SENIORA"? ;-)
- 2024-09-18 Co z 7 miejsc w leasingu dla fizycznych?
- 2024-09-17 Kultura zapie....ania
- 2024-09-17 Gdańsk się skończył dla mnie.
- 2024-09-16 Elektryki z południa lecą do ciepłych krajów :)
- 2024-09-16 Re: Wolkswagen szantażuje rząd aby powróciły dotacje do elektryków
- 2024-09-17 Wybuchające pagery
- 2024-09-18 szukam speca od mini-remontow (w w-wie)
- 2024-09-18 Warszawa => Spedytor międzynarodowy <=
- 2024-09-18 Kraków => Java Full Stack Developer (Angular/React) <=
- 2024-09-18 Warszawa => Projektant/Programista React Native <=