2016-12-15 09:16 AM
Dear Sirs
File : stm32l1xx_ll_spi.hVery ugly BUG !!!!
__STATIC_INLINE void LL_GPIO_ResetOutputPin(GPIO_TypeDef *GPIOx, uint32_t PinMask)
{!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
&sharpif defined(GPIO_BRR_BR_0) !!!!!!! Correct :(GPIO_BRR) !!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
WRITE_REG(GPIOx->BRR, PinMask);
&sharpelse WRITE_REG(GPIOx->BSRR, (PinMask << 16));&sharpendif /* GPIO_BRR_BR_0 */}OpenSTM32 rise a warning :
arm-none-eabi-gcc -mcpu=cortex-m3 -mthumb -mfloat-abi=soft -D__weak=__attribute__((weak)) -D__packed=__attribute__((__packed__)) -DUSE_HAL_DRIVER -DSTM32L100xC
stm32l1xx_ll_spi.h:1137:3: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
__STATIC_INLINE void LL_SPI_TransmitData16(SPI_TypeDef *SPIx, uint16_t TxData)
{ *((__IO uint16_t *)&SPIx->DR) = TxData;}This code compiled without warning :
__STATIC_INLINE void LL_SPI_TransmitData8(SPI_TypeDef *SPIx, uint8_t TxData)
{ *((__IO uint8_t *)&SPIx->DR) = TxData;}Thanks
Tibor Kiss
#stm32l1xx_ll_spi.h-warning2016-12-20 08:44 AM
Dear
Kiss.Tibor
,Please note that yourreported issueis tracked internally. It will bechecked andcome back to you.
All your feedback are welcome in order to improve our solutions.
Sorry for any inconvenience this may cause andThank you for your contribution.
Best Regards
-Imen-
2017-03-13 06:42 AM
Hi,
After deep check in the firmware package, there is no issue faced with the GPIO_BRR_BR_0 definition.
Could you please explain your issue and the reason for giving your proposal?
Imen