USB CDC on STM32F746 with ChibiOS 16.1

ChibiOS public support forum for topics related to the STMicroelectronics STM32 family of micro-controllers.

Moderator: RoccoMarco

rew
Posts: 383
Joined: Sat Jul 19, 2014 12:59 pm
Has thanked: 2 times
Been thanked: 14 times

Re: USB CDC on STM32F746 with ChibiOS 16.1

Post by rew »

Korken wrote:* If I do not send any data at all, there is no halt.
* If I do not send data until after I have opened the port (wait with sending until a character has been received), there is no halt.
You should not send data if the port is not opened. This overflows the buffer inside chibios and eventually halts your process, or in your case causes a "panic". It might be nice to have a flag say: "not really imporant, if the computer doesn't read this data, forget about it"...
User avatar
Giovanni
Site Admin
Posts: 14893
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 997 times

Re: USB CDC on STM32F746 with ChibiOS 16.1

Post by Giovanni »

The problem is that it should not panic, simply the writer should get MSG_RESET.

Panics cannot be a normal reaction to an externally-triggered event.

Giovanni
rew
Posts: 383
Joined: Sat Jul 19, 2014 12:59 pm
Has thanked: 2 times
Been thanked: 14 times

Re: USB CDC on STM32F746 with ChibiOS 16.1

Post by rew »

In my case the important: "measure something (Debug: print measurement) do something " thread stopped. But I can imagine that e.g. a thread not processing data trhown at it would cause another thread to crash. On the other hand, IIRC there are traces that indicate that this is happing in the thread that is printing things to the USB port, right?
User avatar
Korken
Posts: 270
Joined: Wed Apr 02, 2014 4:09 pm
Has thanked: 5 times
Been thanked: 6 times

Re: USB CDC on STM32F746 with ChibiOS 16.1

Post by Korken »

Have you had any success with this problem?
The workaround seems to be working good for those wondering.
User avatar
Giovanni
Site Admin
Posts: 14893
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 997 times

Re: USB CDC on STM32F746 with ChibiOS 16.1

Post by Giovanni »

Hi,

I tried using CuteCom on Mint 18 and it works using trunk code on an STM32F746-Discovery board.

I get the prompt and the OS executes the commands.

Enabling/disabling handshake and parity on CuteCom makes no difference, am I missing some fundamental step?

Giovanni
User avatar
Korken
Posts: 270
Joined: Wed Apr 02, 2014 4:09 pm
Has thanked: 5 times
Been thanked: 6 times

Re: USB CDC on STM32F746 with ChibiOS 16.1

Post by Korken »

Hmm, seems to be the correct procedure.
I will create a small example where I get the error.
User avatar
Giovanni
Site Admin
Posts: 14893
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 997 times

Re: USB CDC on STM32F746 with ChibiOS 16.1

Post by Giovanni »

Is it possible you have some backgroud process writing on com ports that triggers the problem?

I have a clean Mint Cinnamon install.

Giovanni
Post Reply