Search found 14 matches

by zamek
Tue May 03, 2016 7:29 pm
Forum: STM32 Support
Topic: event driven serial, event is late
Replies: 6
Views: 3630

Re: event driven serial, event is late

Hi Giovanni,

I found my mistake, everything is working well:)

Thank you for your patient,

Zamek
by zamek
Mon May 02, 2016 7:05 am
Forum: STM32 Support
Topic: event driven serial, event is late
Replies: 6
Views: 3630

Re: event driven serial, event is late

Yes, you are right, it works with TIME_IMMEDIATE.
Unfortunately there is a new problem:

I sent 64 byte ordered data. When I get a CHN_AVAILABLE event I can read about 0x18-0x1a bytes from serial port. It is coming correct order. After I finished the first part of data reading, I get the next event ...
by zamek
Sun May 01, 2016 7:52 am
Forum: STM32 Support
Topic: event driven serial, event is late
Replies: 6
Views: 3630

Re: event driven serial, event is late

Hi Giovanni,
Thx for your reply. I made some debugging and I saw the following:

When I send a packet I get event CHN_INPUT_AVAILABLE. I call the handle_serial function. This function calls
int bytes_read = chnRead(&SD1, read_buffer, READ_BUFFER_SIZE);
this function is blocked.

read_buffer is a ...
by zamek
Sat Apr 30, 2016 9:56 am
Forum: STM32 Support
Topic: event driven serial, event is late
Replies: 6
Views: 3630

event driven serial, event is late

Hi All,

I would like to use event driven serialdriver. I made a test environment:
hw: I connected TxD to RxD to receive my sent characters.
sw: I sent only one 73 bytes length package with a console command. (7 bytes framing, 64 bytes data with incremental contents and 2 bytes of crc.)
HAL ...
by zamek
Sat Apr 23, 2016 4:09 pm
Forum: STM32 Support
Topic: SerialDriver event on Stm32F4Discovery board
Replies: 8
Views: 3671

Re: SerialDriver event on Stm32F4Discovery board

Hi,
>>You need to answer to my previous advice, assertions, pins assignment duplication etc.
You are right, because it was an unnecessary palSetPadMode(GPIOB, 7, PAL_MODE_INPUT_PULLUP); after palSetPadMode(GPIOB, 7, PAL_MODE_ALTERNATE(7));

That was the reason why rx didn't works.

thx a lot,
Zamek
by zamek
Sat Apr 23, 2016 8:40 am
Forum: STM32 Support
Topic: SerialDriver event on Stm32F4Discovery board
Replies: 8
Views: 3671

Re: SerialDriver event on Stm32F4Discovery board

Hi Giovanni,

I made a test environment which has two discovery board connected to each other. First board is sending frames as a transmitter and second is the receiver. I checked it with oscilloscope. Transmitted data is on transmitter PB6 which is connected to receiver PB7.
I'm sure that, the ...
by zamek
Fri Apr 22, 2016 8:12 pm
Forum: STM32 Support
Topic: SerialDriver event on Stm32F4Discovery board
Replies: 8
Views: 3671

Re: SerialDriver event on Stm32F4Discovery board

Hi Giovanni,

thx, for your replay, I try to set all event flags like this:

chEvtRegisterMaskWithFlags(chnGetEventSource(&SD1), &serial_listener,
EVENT_MASK(1),
CHN_INPUT_AVAILABLE|SD_PARITY_ERROR|SD_FRAMING_ERROR|SD_OVERRUN_ERROR|SD_NOISE_ERROR|SD_BREAK_DETECTED);


but unfortunately it doesn ...
by zamek
Fri Apr 22, 2016 4:43 pm
Forum: STM32 Support
Topic: SerialDriver event on Stm32F4Discovery board
Replies: 8
Views: 3671

SerialDriver event on Stm32F4Discovery board

Hello All,

I would like to use serial driver on an stm32f4 discovery board.
I use SD1 in PB6 and PB7 bits. SerialDriver config is:

static const SerialConfig serial_config ={
921600,
0,
USART_CR2_STOP1_BITS | USART_CR2_LINEN,
0
};


Init code is:

palSetPadMode(GPIOB, 6, PAL_MODE ...
by zamek
Mon Nov 30, 2015 3:17 pm
Forum: STM32 Support
Topic: Weird USB behavior on Linux
Replies: 2
Views: 1881

Re: Weird USB behavior on Linux

I found the problem,

There was an installed Modem Manager, which checks every serial ports after connect, whether is it a modem?

apt-get purge modem-manager can solve the problem.

Zamek
by zamek
Mon Nov 30, 2015 9:27 am
Forum: STM32 Support
Topic: Weird USB behavior on Linux
Replies: 2
Views: 1881

Weird USB behavior on Linux

Hi All,

After a board reset, there is an approximately 30s timeout, during the port is (/dev/ttyACM0) is exist, but I cannot connect it. The gtkterm said: device or resource is busy. After 30s, I can connect it and everything is ok.

I use: Linux zamek 4.2.0-1-686-pae #1 SMP Debian 4.2.6-1 (2015 ...