2014-10-20 11:53 PM
I creat new USB CDC project and add new IN Endpoint (0x83). I correct USBD_CDC_TransmitPacket for new Endpoint (0x83). Yet data transfer not working.
What should I do
to my IN Endpoint (0x83) worked? #stm32cube #usb2014-10-21 12:56 AM
Hi,
Are there any changes that impact the descriptor ? Have you made any modifications on the descriptor ?With any STM32Cube FW package are you working ?Regards,Heisenberg.2014-10-21 01:12 AM
I add new endpoint in descriptor (
function
USBD_CDC_CfgFSDesc) andinitialized
endpoint in USBD_CDC_Initfunction
.I replaced the CDC_IN_EP for a new IN endpoint (0x83)
infunction
USBD_LL_Transmit (inside USBD_CDC_TransmitPacket). I use 1.3.0 version FW.2014-10-21 07:24 AM
Hi,
Can you provide your usbd_conf.c file, the CDC class modified files, and also your main.c file, to have enough insight into what specifically you are doing, and how.Regards,Heisenberg.2014-10-21 10:50 PM
I just
changed the
function
USBD_CDC_TransmitPacket.uint8_t USBD_CDC_TransmitPacket(USBD_HandleTypeDef *pdev, uint8_t ep_num)
{
USBD_CDC_HandleTypeDef *hcdc = pdev->pClassData;
if(pdev->pClassData != NULL)
{
if(hcdc->TxState == 0)
{
/* Tx Transfer in progress */
hcdc->TxState = 1;
/* Transmit next packet */
USBD_LL_Transmit(pdev,
ep_num,//CDC_IN_EP
hcdc->TxBuffer,
hcdc->TxLength);
/* Tx Transfer in progress */
// hcdc->TxState = 1;
return USBD_OK;
}
else
{
return USBD_BUSY;
}
}
else
{
return USBD_FAIL;
}
}
If you call ep_num
=0x81, the transmission
operates. If
ep_num=0x82 (or 0x83),
the transmission
does not work
. https://my.st.com/public/STe2ecommunities/mcu/Lists/STM32Java/Attachments/1751/files.7z ________________ Attachments : files.7z : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006HzSz&d=%2Fa%2F0X0000000bME%2FNADvGkWiUyzgQ6DK4ie.J5L2zqeRPaaff0f3hKx_uoI&asPdf=false