Size: a a a

2020 May 20

AZ

Aleksander Zholtkovs... in Embedded Group
Dima Leonov
Если по простому, то кинуть байт и ждать байт в ответ
не пойдёт. Со стороны хоста будет тупо отладочный терминал.
Надо без интерактива
источник

T

Thorn in Embedded Group
Aleksander Zholtkovskii
Вопрос про USB CDC.
Есть ли способ у device узнать открыт ли ком порт на host-е ?
вероятно, копать в этом направлении:
>When a userland process is opening a serial device like /dev/ttyS0 or /dev/ttyACM0, linux will raise the DTR/RTS lines by default
https://unix.stackexchange.com/questions/446088/how-to-prevent-dtr-on-open-for-cdc-acm
источник

AZ

Aleksander Zholtkovs... in Embedded Group
SET_CONTROL_LINE_STATE host отправляет, но никаких данных с этом командой не передаёт.
Может не туда смотрю? Или может  в дескрипторах надо указать что всякие DTR/RTS поддерживаются ?
источник

T

Thorn in Embedded Group
я не помню спецификацию наизусть, но по-моему данные должны быть в setup пакете в одном из полей
источник

D

Dr Zlo in Embedded Group
Aleksander Zholtkovskii
SET_CONTROL_LINE_STATE host отправляет, но никаких данных с этом командой не передаёт.
Может не туда смотрю? Или может  в дескрипторах надо указать что всякие DTR/RTS поддерживаются ?
In the SET_CONTROL_LINE_STATE request (22h), the host tells the device how to set the RS-232 control signals RTS and DTR. The host sends the control-line states in the third byte of the Setup transaction. Bit 0 is the state of DTR, and bit 1 is the state of RTS. Device firmware detects the request, accepts the data, and implements any changes to the bits. The IN transaction is the Status stage. The device indicates success by returning a ZLP.
источник

AZ

Aleksander Zholtkovs... in Embedded Group
Dr Zlo
In the SET_CONTROL_LINE_STATE request (22h), the host tells the device how to set the RS-232 control signals RTS and DTR. The host sends the control-line states in the third byte of the Setup transaction. Bit 0 is the state of DTR, and bit 1 is the state of RTS. Device firmware detects the request, accepts the data, and implements any changes to the bits. The IN transaction is the Status stage. The device indicates success by returning a ZLP.
спасибо. Пойду искать
источник

AZ

Aleksander Zholtkovs... in Embedded Group
нашёл. Байтик меняется. Должно подойти.
источник

AZ

Aleksander Zholtkovs... in Embedded Group
Работает.
Надо ещё для полного счастья добавить проверку наличия USB кабеля.
источник

D-

Dmitriy - in Embedded Group
Добрый день. Собирал кто-нибудь Libqmi? Хочу использовать в своём проекте, но стандартный мануал засыпает ошибками:sojunhan-saram@sojunhansaram-PC:~/PETR/libqmi$ ./configure CC=c99 CFLAGS=-g LIBS=-lposix
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether UID '1000' is supported by ustar format... yes
checking whether GID '1000' is supported by ustar format... yes
checking how to create a ustar tar archive... gnutar
checking whether to enable maintainer-specific portions of Makefiles... yes
checking whether make supports nested variables... (cached) yes
checking for gcc... c99
checking whether the C compiler works... no
configure: error: in `/home/sojunhan-saram/PETR/libqmi':
configure: error: C compiler cannot create executables
See `config.log' for more details
sojunhan-saram@sojunhansaram-PC:~/PETR/libqmi$
источник

EP

Evgeniy Partizan in Embedded Group
ну так See `config.log' for more details
источник

DG

Denis Gabidullin in Embedded Group
Последняя лекция курса "FPGA для начинающих" только что началась:
https://www.twitch.tv/maksimtolkachev
источник

u

uis in Embedded Group
Кто занимался stm32f0?
источник

u

uis in Embedded Group
Я запускаю dma с spi.
1) SPI init
2) rx DMA init
3) tx DMA init
С пошаговой отладкой всё норм.
С работой до бп в буфер приёма ничего не пишется.
источник

u

uis in Embedded Group
Отправка работает всегда
источник

u

uis in Embedded Group
void preinitDma(){
   DMA1_Channel2->CPAR=(volatile uint32_t)&SPI1->DR;
   DMA1_Channel3->CPAR=(volatile uint32_t)&SPI1->DR;
//  NVIC->ISER[0]=(0b1<<10);
}
void sendMsg2(uint32_t size, uint8_t* tx, uint8_t* rx){
 DMA1_Channel2->CMAR=rx;
 DMA1_Channel2->CNDTR=size;
 DMA1_Channel2->CCR=DMA_CCR_MINC
     |DMA_CCR_TCIE
     |DMA_CCR_EN;

   SCB->SCR=SCB_SCR_SLEEPONEXIT_Msk;
 GPIOA->BSRR=GPIO_BSRR_BR_4;

 DMA1_Channel3->CMAR=tx;
 DMA1_Channel3->CNDTR=size;
 DMA1_Channel3->CCR=DMA_CCR_MINC
     |DMA_CCR_DIR
     |DMA_CCR_EN;
   __asm volatile("wfi");
}
источник

u

uis in Embedded Group
attribute((interrupt("IRQ"))) void DMA1_Channel2_3_IRQHandler(){
 SCB->SCR=0;

 DMA1->IFCR=DMA_IFCR_CTCIF2;

 DMA1_Channel3->CCR=0;
 DMA1_Channel2->CCR=0;

 GPIOA->BSRR=GPIO_BSRR_BS_4;
}
источник

u

uis in Embedded Group
SPI1->CR2=SPI_CR2_FRXTH
|SPI_CR2_RXDMAEN|SPI_CR2_TXDMAEN;

SPI1->CR1=SPI_CR1_MSTR|SPI_CR1_SSM|SPI_CR1_SSI|SPI_CR1_SPE;
источник

u

uis in Embedded Group
stm32f030f4p6
источник

u

uis in Embedded Group
TCIF везде выставляется
источник

u

uis in Embedded Group
Но как было пусто, так и осталось
источник