AnsweredAssumed Answered

Simultaneous use of USB CDC and HID on stm32f7 Disco  gives "Hard Fault"

Question asked by Milton Cram on Nov 24, 2017

I am attempting to help a friend add CDC capability to a working F7 application.  I have modified the code using the example applications (Dual Core/Standalone--HID + MSC), replacing the MSC code with CDC code.  The modified code builds and loads without problem.  However, when the code calls USHB_CDC_Transmit, a "Hard Fault" is encountered.

 

The F7 Discovery board is connected to another board.  The second board is using an Arduino UNO.  The original code on the F7 communicates with the UNO via UART.  We want to replace the UART code with CDC code.  The UNO already supports a Virtual Comm Port for communications with a PC.  Or hope is to replace the PC with the Disco board.

The HID code can be configured to use either the FS or HS port on the Disco board.  Works with either port for HID. This should indicate that the GPIO is correctly configured.  Just need to get the CDC to use one of the ports and the HID to use the other. (Using keyboard/mouse on the HID).

 

Help and suggestions are much appreciated.

Outcomes