2018-03-02 02:30 AM
After some days investigation and debugging, I found bug at HAL definition.
Project was generated with CubeX v4.24, STM32L4 package version 1.11.0
@file stm32l4xx_hal_pcd.h
#if 1 //darius
#define PCD_SET_EP_DBUF1_CNT(USBx, bEpNum, bDir, wCount) { \ if((bDir) == PCD_EP_DBUF_OUT)\ {/* OUT endpoint */ \ PCD_SET_EP_RX_CNT((USBx), (bEpNum),(wCount)); \ } \ else if((bDir) == PCD_EP_DBUF_IN)\ {/* IN endpoint */ \ *PCD_EP_RX_CNT((USBx), (bEpNum)) = (uint32_t)(wCount); \ } \ } /* SetEPDblBuf1Count */#else// error her below#define PCD_SET_EP_DBUF1_CNT(USBx, bEpNum, bDir, wCount) { \ if((bDir) == PCD_EP_DBUF_OUT)\ {/* OUT endpoint */ \ PCD_SET_EP_RX_CNT((USBx), (bEpNum),(wCount)); \ } \ else if((bDir) == PCD_EP_DBUF_IN)\ {/* IN endpoint */ \ *PCD_EP_TX_CNT
((USBx), (bEpNum)) = (uint32_t)(wCount); \ } \ } /* SetEPDblBuf1Count */#endifNote:
Not found this bug at stm32L0 HAL at file stm32l0xx_hal_pcd.h ! Its Ok her and same like my correction.
#define PCD_SET_EP_DBUF1_CNT(USBx, bEpNum, bDir, wCount) { \
if(bDir == PCD_EP_DBUF_OUT)\ /* OUT endpoint */ \ {PCD_SET_EP_RX_CNT(USBx, bEpNum,wCount);}\ else if(bDir == PCD_EP_DBUF_IN)\ /* IN endpoint */\ *PCD_EP_RX_CNT(USBx, bEpNum) = (uint32_t)wCount; \ } /* SetEPDblBuf1Count */I hope, then in next release this bug will be corrected in all packages.
BR
Darius Babrauskas
Solved! Go to Solution.
2018-03-07 09:50 AM
Hi
pavel_a
,This was also reported When an issue is highlighted on a Cube package, allother packages are also reviewed.
Thank you both for your feedback. This helps us to enhance the quality of our resources.
Khouloud.
2018-03-07 05:46 AM
Hello
sqlsql
,Thanks for bringing this point to our attention. I have highlighted it internally and I will get back to you with any further update.
Best regards,
Khouloud.
2018-03-07 07:47 AM
Same in F0 library, ver, 1.9.0
STM32Cube_FW_F0_V1.9.0\Drivers\STM32F0xx_HAL_Driver\Inc\stm32f0xx_hal_pcd.h, line 776
--pa
2018-03-07 09:50 AM
Hi
pavel_a
,This was also reported When an issue is highlighted on a Cube package, allother packages are also reviewed.
Thank you both for your feedback. This helps us to enhance the quality of our resources.
Khouloud.